/* ============================================================
   STELAAH — Consent UI (styles/consent.css)
   Brand-matched to the marketing system. Uses the shared tokens from
   stelaah.css (--bg, --ink, --ink-2/3, --border, --accent, --font-mono).
   Apple-vibe: soft surfaces, radius <= 26px, no gradients, no left borders.
   ============================================================ */

.sc-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 2147483000;              /* above nav, motion layers, dock */
  display: flex; justify-content: flex-start;   /* corner card, keeps the hero CTA clear */
  padding: clamp(14px, 3vw, 26px);
  pointer-events: none;             /* let clicks through the gutter, not the card */
}
.sc-card {
  pointer-events: auto;
  width: 100%; max-width: 430px;
  background: var(--bg, #fdfcfc);
  color: var(--ink, #1b1b1f);
  border: 1px solid var(--border, rgba(20,20,25,0.1));
  border-radius: 22px;
  padding: clamp(18px, 2.4vw, 24px);
  box-shadow: 0 1px 2px rgba(20,20,25,0.05), 0 24px 60px -24px rgba(20,20,25,0.32);
  transform: translateY(14px);
  opacity: 0;
  transition: transform .42s cubic-bezier(.22,1,.36,1), opacity .32s ease;
}
.sc-banner.show .sc-card { transform: translateY(0); opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .sc-card { transition: opacity .2s ease; transform: none; }
}

.sc-title {
  margin: 0 0 8px;
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ink, #1b1b1f);
}
.sc-body {
  margin: 0 0 16px;
  font-size: 13.5px; line-height: 1.55;
  color: var(--ink-2, #4a4a52);
}

.sc-actions {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center;
}
.sc-actions .sc-btn.ghost { margin-right: auto; }   /* Manage sits on the left */

.sc-btn {
  appearance: none; -webkit-appearance: none;
  font: inherit; font-size: 13px; font-weight: 500; line-height: 1;
  padding: 10px 15px; border-radius: 12px;
  border: 1px solid var(--border-strong, rgba(20,20,25,0.16));
  background: transparent;
  color: var(--ink, #1b1b1f);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .12s ease, color .18s ease;
}
.sc-btn:hover { background: color-mix(in srgb, var(--ink, #1b1b1f) 6%, transparent); }
.sc-btn:active { transform: translateY(1px); }
.sc-btn:focus-visible { outline: 2px solid var(--accent, #4a6b52); outline-offset: 2px; }
.sc-btn.primary {
  background: var(--ink, #1b1b1f);
  color: var(--bg, #fdfcfc);
  border-color: var(--ink, #1b1b1f);
}
.sc-btn.primary:hover { background: color-mix(in srgb, var(--ink, #1b1b1f) 86%, #fff); }
.sc-btn.ghost {
  border-color: transparent;
  color: var(--ink-2, #4a4a52);
  padding-inline: 6px;
}
.sc-btn.ghost:hover { background: transparent; color: var(--ink, #1b1b1f); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- manage panel ---------- */
.sc-panel {
  position: fixed; inset: 0; z-index: 2147483100;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(14px, 4vw, 32px);
  background: color-mix(in srgb, #141417 42%, transparent);
  backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .22s ease;
}
.sc-panel.show { opacity: 1; }
.sc-panel-card {
  position: relative;
  width: 100%; max-width: 520px;
  max-height: min(88vh, 720px); overflow: auto;
  background: var(--bg, #fdfcfc);
  color: var(--ink, #1b1b1f);
  border: 1px solid var(--border, rgba(20,20,25,0.1));
  border-radius: 24px;
  padding: clamp(22px, 3vw, 30px);
  box-shadow: 0 40px 90px -30px rgba(20,20,25,0.5);
  transform: translateY(10px) scale(.99);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.sc-panel.show .sc-panel-card { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .sc-panel, .sc-panel-card { transition: opacity .18s ease; transform: none; }
}

.sc-panel-close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid transparent; border-radius: 11px;
  background: transparent; color: var(--ink-3, #7a7a82); cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.sc-panel-close:hover { background: color-mix(in srgb, var(--ink, #1b1b1f) 7%, transparent); color: var(--ink, #1b1b1f); }
.sc-panel-close:focus-visible { outline: 2px solid var(--accent, #4a6b52); outline-offset: 2px; }

.sc-panel-title {
  margin: 0 0 8px; padding-right: 40px;
  font-size: 20px; font-weight: 600; letter-spacing: -0.02em;
}
.sc-panel-body {
  margin: 0 0 20px;
  font-size: 13.5px; line-height: 1.55; color: var(--ink-2, #4a4a52);
}

.sc-cat-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 22px; }
.sc-cat {
  padding: 15px 2px;
  border-top: 1px solid var(--border-subtle, rgba(20,20,25,0.06));
}
.sc-cat:first-child { border-top: 0; }
.sc-cat-head { display: flex; align-items: center; gap: 10px; }
.sc-cat-name { font-size: 14px; font-weight: 550; color: var(--ink, #1b1b1f); }
.sc-cat-badge {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3, #7a7a82);
  border: 1px solid var(--border, rgba(20,20,25,0.1));
  border-radius: 999px; padding: 2px 8px;
}
.sc-cat-desc { margin: 7px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-3, #7a7a82); max-width: 46ch; }

/* switch */
.sc-switch { position: relative; margin-left: auto; display: inline-flex; flex: none; width: 42px; height: 25px; cursor: pointer; }
.sc-switch.locked { cursor: default; }
.sc-switch-input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: inherit; }
.sc-switch-knob {
  position: absolute; inset: 0;
  background: color-mix(in srgb, var(--ink, #1b1b1f) 16%, transparent);
  border-radius: 999px; transition: background .2s ease;
}
.sc-switch-knob::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 19px; height: 19px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(20,20,25,0.35);
  transition: transform .22s cubic-bezier(.22,1,.36,1);
}
.sc-switch-input:checked + .sc-switch-knob { background: var(--accent, #4a6b52); }
.sc-switch-input:checked + .sc-switch-knob::after { transform: translateX(17px); }
.sc-switch.locked .sc-switch-knob { background: color-mix(in srgb, var(--accent, #4a6b52) 55%, transparent); }
.sc-switch-input:focus-visible + .sc-switch-knob { outline: 2px solid var(--accent, #4a6b52); outline-offset: 2px; }

.sc-panel-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

@media (max-width: 560px) {
  .sc-banner { justify-content: center; }
  .sc-card { max-width: none; }
}
@media (max-width: 520px) {
  .sc-actions, .sc-panel-actions { justify-content: stretch; }
  .sc-actions .sc-btn, .sc-panel-actions .sc-btn { flex: 1 1 auto; text-align: center; }
  .sc-actions .sc-btn.ghost { flex-basis: 100%; margin-right: 0; order: 3; }
}

/* footer trigger link — matches the other footer legal links */
.sc-privacy-link { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; }
.sc-privacy-link:hover { text-decoration: underline; text-underline-offset: 3px; }
