/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* ───── Value-chips input (product option values) ───── */
.vc-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  cursor: text;
}
.vc-input {
  flex: 1 1 8rem;
  min-width: 8rem;
  border: 0;
  outline: 0;
  padding: 4px 2px;
  font-size: inherit;
  background: transparent;
}
.vc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 10px;
  background: rgb(238 242 255); /* indigo-50 */
  color: rgb(49 46 129);        /* indigo-900 */
  border-radius: 9999px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}
.vc-chip .vc-label { font-weight: 500; }
.vc-chip button {
  width: 20px; height: 20px;
  border: 0;
  background: transparent;
  color: rgb(100 116 139);
  border-radius: 9999px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.vc-chip button:hover {
  background: rgb(254 226 226); /* rose-100 */
  color: rgb(190 18 60);
}
.vc-chip .vc-swatch {
  width: 16px; height: 16px;
  border-radius: 9999px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
  flex-shrink: 0;
}

/* ───── iOS-style toggle switch ───── */
.toggle-row {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}
/* Hide the real checkbox without removing it from the accessibility
   tree or breaking the label association. Don't use .sr-only here so
   we don't depend on Tailwind's preflight being compiled. */
.toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}
.toggle-track {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background: rgb(203 213 225); /* slate-300 */
  border-radius: 9999px;
  transition: background 180ms ease;
  margin-top: 1px;
}
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 180ms ease;
}
.toggle-input:checked + .toggle-track {
  background: rgb(79 70 229); /* indigo-600 */
}
.toggle-input:checked + .toggle-track .toggle-thumb {
  transform: translateX(20px);
}
.toggle-input:focus-visible + .toggle-track {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35);
}
.toggle-input:disabled + .toggle-track {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ───── Sticky save bar (for long settings forms) ───── */
html { scroll-behavior: smooth; }
/* Section anchors get a small top margin so the heading isn't flush
   against the viewport top after a jump. */
.scroll-mt-4 { scroll-margin-top: 1rem; }

.sticky-save-bar {
  position: sticky;
  bottom: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgb(226 232 240); /* slate-200 */
  box-shadow: 0 -2px 8px rgba(15, 23, 42, 0.04);
}
.sticky-save-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  max-width: 64rem;
  margin: 0 auto;
}
