/* ============================================================
   sc-select.css — premium dropdowns for every <select>
   ------------------------------------------------------------
   Pairs with /site/assets/sc-select.js. The script keeps the real <select> in the page (forms, validation and
   existing scripts keep working) and puts this control on top of it. Without the script, nothing here applies and
   the browser's normal dropdown is shown. Opt a select out with data-native.
   ============================================================ */

.scs, .scs-panel {
  --scs-brand: #00aff0;
  --scs-brand-2: #0091c8;
  --scs-brand-ink: #007bb0;
  --scs-fg: var(--sc-foreground, #0b1220);
  --scs-muted: var(--sc-muted-foreground, #64748b);
  --scs-border: var(--sc-input, #e3e9ee);
  --scs-bg: #fff;
  --scs-hover: #f2f9fd;
  --scs-selected: rgba(0, 175, 240, 0.12);
}

/* ── the field you see ─────────────────────────────────────── */
.scs { position: relative; display: block; width: 100%; max-width: 100%; box-sizing: border-box; }
.scs.scs--fit { display: inline-block; width: auto; }
.scs *, .scs *::before, .scs *::after { box-sizing: border-box; }

/* the real select stays in the page for forms and scripts, but is invisible and not clickable */
select.scs-native {
  position: absolute !important; left: 0 !important; bottom: 0 !important;
  width: 1px !important; height: 1px !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important;
  border: 0 !important; opacity: 0 !important; overflow: hidden !important; pointer-events: none !important;
  clip: rect(0 0 0 0) !important; box-shadow: none !important;
}

.scs button.scs-trigger {
  -webkit-appearance: none; appearance: none;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; min-height: 41px; margin: 0; padding: 0 12px 0 14px;
  font-family: inherit; font-size: 0.85rem; font-weight: 500; line-height: 1.25; letter-spacing: normal; text-align: left; text-transform: none;
  color: var(--scs-fg); background: var(--scs-bg);
  border: 1px solid var(--scs-border); border-radius: 11px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  cursor: pointer; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.scs button.scs-trigger:hover { border-color: #b9d9e8; box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08); }
.scs button.scs-trigger:focus-visible,
.scs.is-open button.scs-trigger {
  border-color: var(--scs-brand);
  box-shadow: 0 0 0 4px rgba(0, 175, 240, 0.16), 0 1px 2px rgba(16, 24, 40, 0.05);
}
.scs button.scs-trigger.is-invalid { border-color: #dc2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12); }
.scs button.scs-trigger.is-placeholder .scs-val { color: var(--scs-muted); font-weight: 400; }
.scs button.scs-trigger:disabled { cursor: not-allowed; background: #f6f8fb; color: var(--scs-muted); box-shadow: none; }
.scs .scs-val { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.scs .scs-chev { flex: none; width: 16px; height: 16px; color: var(--scs-muted); transition: transform .18s ease, color .15s ease; }
.scs.is-open .scs-chev { transform: rotate(180deg); color: var(--scs-brand); }

/* ── the list ─────────────────────────────────────────────── */
.scs-panel {
  position: fixed; z-index: 2147483600; display: flex; flex-direction: column;   /* above the cookie banner and sticky headers */
  width: max-content; max-width: min(460px, calc(100vw - 16px));
  padding: 6px; background: var(--scs-bg); color: var(--scs-fg);
  border: 1px solid #e3e8f1; border-radius: 15px;
  box-shadow: 0 18px 40px -12px rgba(16, 24, 40, 0.22), 0 6px 14px -6px rgba(16, 24, 40, 0.10);
  font-family: inherit; font-size: 0.85rem; line-height: 1.3;
  transform-origin: top center; animation: scs-in .14s cubic-bezier(.2, .8, .2, 1);
}
.scs-panel[data-side="top"] { transform-origin: bottom center; }
.scs-panel *, .scs-panel *::before, .scs-panel *::after { box-sizing: border-box; }
@keyframes scs-in { from { transform: translateY(-4px) scale(.98); } to { transform: none; } }   /* no fade: a paused animation must never leave the list invisible */
.scs-panel[data-side="top"] { animation-name: scs-in-up; }
@keyframes scs-in-up { from { transform: translateY(4px) scale(.98); } to { transform: none; } }

.scs-panel .scs-search { position: relative; flex: none; margin: 0 0 6px; }
.scs-panel .scs-search svg { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; color: var(--scs-muted); pointer-events: none; }
.scs-panel .scs-search input.scs-q {
  -webkit-appearance: none !important; appearance: none !important;
  display: block !important; width: 100% !important; height: 36px !important; margin: 0 !important; padding: 0 12px 0 33px !important;
  font: inherit !important; font-size: 0.84rem !important; color: var(--scs-fg) !important;
  background: #f5f7fb !important; border: 1px solid transparent !important; border-radius: 9px !important;
  box-shadow: none !important; outline: none !important;
  transition: background-color .15s ease, border-color .15s ease;
}
.scs-panel .scs-search input.scs-q::placeholder { color: #94a3b8; }
.scs-panel .scs-search input.scs-q:focus { background: #fff !important; border-color: var(--scs-brand) !important; box-shadow: 0 0 0 3px rgba(0, 175, 240, 0.14) !important; }
.scs-panel .scs-search input.scs-q::-webkit-search-cancel-button { display: none; }

.scs-panel .scs-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.scs-panel .scs-list::-webkit-scrollbar { width: 8px; }
.scs-panel .scs-list::-webkit-scrollbar-thumb { background: #d3dae6; border-radius: 8px; border: 2px solid #fff; }

.scs-panel .scs-grp { padding: 10px 10px 4px; font-size: 0.66rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--scs-muted); }
.scs-panel .scs-opt {
  display: flex; align-items: center; gap: 10px; min-height: 40px; margin: 1px 0; padding: 6px 10px;
  border-radius: 10px; cursor: pointer; color: var(--scs-fg); font-weight: 500;
  transition: background-color .08s ease;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.scs-panel .scs-opt.is-active { background: var(--scs-hover); }
.scs-panel .scs-opt[aria-selected="true"] { background: var(--scs-selected); color: var(--scs-brand-ink); font-weight: 600; }
.scs-panel .scs-opt[aria-selected="true"].is-active { background: rgba(0, 175, 240, 0.18); }
.scs-panel .scs-opt[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.scs-panel .scs-lab { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scs-panel .scs-meta { flex: none; font-size: 0.74rem; font-weight: 500; color: var(--scs-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.scs-panel .scs-opt[aria-selected="true"] .scs-meta { color: var(--scs-brand-ink); opacity: .75; }
.scs-panel .scs-tick { flex: none; width: 16px; height: 16px; color: var(--scs-brand); opacity: 0; transform: scale(.7); transition: opacity .12s ease, transform .12s ease; }
.scs-panel .scs-opt[aria-selected="true"] .scs-tick { opacity: 1; transform: none; }
.scs-panel .scs-ph { flex: none; width: 32px; height: 32px; }
.scs-panel .scs-empty { padding: 18px 10px; text-align: center; color: var(--scs-muted); font-size: 0.82rem; }

/* ── audio sample play / pause ───────────────────────────── */
.scs-play {
  --p: 0;
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; margin: 0; padding: 3px; border: 0; border-radius: 50%;
  background: transparent;
  color: #fff; cursor: pointer; transition: transform .15s ease;
  -webkit-tap-highlight-color: transparent; outline: none; box-sizing: border-box;
}
.scs-play > i {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%;
  font-style: normal; color: #fff;
  background: linear-gradient(135deg, var(--scs-brand, #00aff0), var(--scs-brand-2, #0091c8));
  box-shadow: 0 2px 6px -1px rgba(0, 175, 240, 0.5);
}
.scs-play > i { transition: transform .18s ease; }
/* while a sample plays, a ring fills around the button to show how far along it is */
.scs-play[data-state="playing"] { background: conic-gradient(var(--scs-brand-2, #0091c8) calc(var(--p) * 1%), #d7e2fb 0); }
.scs-play[data-state="playing"] > i, .scs-play[data-state="loading"] > i { transform: scale(.82); }
.scs-play svg { width: 14px; height: 14px; display: block; }
.scs-play .i-play { margin-left: 1px; }
.scs-play .i-pause { display: none; }
.scs-play[data-state="playing"] .i-play, .scs-play[data-state="loading"] .i-play { display: none; }
.scs-play[data-state="playing"] .i-pause { display: block; }
.scs-play[data-state="loading"] > i { animation: scs-pulse .9s ease-in-out infinite; }
.scs-play[data-state="loading"] .i-pause { display: block; opacity: .55; }
.scs-play[data-state="error"] > i { background: #ef4444; box-shadow: 0 2px 6px -1px rgba(239, 68, 68, 0.5); }
.scs-play:hover { transform: scale(1.08); }
.scs-play:active { transform: scale(.94); }
.scs-play:focus-visible { outline: 2px solid var(--scs-brand, #00aff0); outline-offset: 2px; }
@keyframes scs-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

@media (max-width: 640px) {
  .scs-panel .scs-opt { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .scs-panel, .scs-panel[data-side="top"] { animation: none; }
  .scs .scs-chev, .scs button.scs-trigger, .scs-play, .scs-panel .scs-tick { transition: none; }
}

/* ── SubsGrow sizing per area ─────────────────────────────── */
.scs-panel { font-family: inherit; }
.scs-panel .scs-opt { font-size: .9rem; }
/* customer dashboard (/app): match .sg-input fields */
.sg .scs button.scs-trigger { min-height: 46px; padding: 0 12px 0 14px; font-size: 15px; font-weight: 400; border-radius: 6px; border-color: var(--sg-line, #e3e9ee); box-shadow: none; }
.sg .scs button.scs-trigger:hover { border-color: #b9d9e8; }
.sg .scs.is-open button.scs-trigger, .sg .scs button.scs-trigger:focus-visible { border-color: var(--scs-brand); box-shadow: 0 0 0 3px rgba(0, 175, 240, 0.16); }
/* public pages (contact etc.): match the 46px rounded fields */
.mk-site .scs button.scs-trigger { min-height: 46px; font-size: .98rem; font-weight: 400; border-radius: 10px; }
/* compact selects inside admin tables (e.g. order status) */
.admin-table .scs button.scs-trigger { min-height: 34px; font-size: .8rem; border-radius: 8px; padding: 0 8px 0 10px; }
.sg .sg-legacy .scs button.scs-trigger { border-radius: 8px; }
