/* Consent banner + preferences dialog — loads after tokens.css/base.css/components.css.
   Uses design tokens only; light/dark via [data-theme] inheritance.
   Z-index stack (actual values, see components.css): scroll-top 200 <
   mode-toggle--fixed 1050 < consent FAB 1100 < banner 1200 < nav/drawer 1300
   (drawer is modal — above the non-modal banner/FAB) < consent dialog 1550 <
   age-gate 1600 (topmost blocking interstitial) < skip-link 2000.
   FAB is bottom-left, scroll-top bottom-right — no overlap.
   Banner covers FAB + scroll-top until dismissed (by design); the FAB is
   hidden (not just covered) while the banner or dialog is visible. */
.consent-banner {
  position: fixed; inset-inline: var(--space-4); bottom: var(--space-4);
  z-index: 1200; max-width: 56rem; margin-inline: auto;
  background: var(--bg-elevated, #111); color: var(--text-primary, #fff);
  border: 1px solid var(--border-subtle, #333); border-radius: var(--radius-lg, .75rem);
  box-shadow: 0 12px 40px rgba(0,0,0,.45); padding: var(--space-5);
}
.consent-banner[hidden], .consent-dialog[hidden] { display: none; }
.consent-banner__inner { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; justify-content: space-between; }
.consent-banner__text { margin: 0; flex: 1 1 20rem; font-size: var(--text-sm); line-height: 1.5; }
.consent-banner__text a { color: inherit; text-decoration: underline; }
.consent-banner__actions, .consent-dialog__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
/* Equal prominence: Accept and Reject share size, padding and weight (no dark pattern). */
.consent-btn {
  font: inherit; font-size: var(--text-sm); font-weight: var(--font-weight-bold);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-md);
  cursor: pointer; border: 1px solid transparent; min-width: 8rem;
}
.consent-btn--primary { background: var(--accent-primary, #00D4FF); color: #000; border-color: var(--accent-primary, #00D4FF); }
.consent-btn--secondary { background: transparent; color: inherit; border-color: currentColor; }
.consent-btn--ghost { background: transparent; color: inherit; border: none; text-decoration: underline; }
.consent-btn:focus-visible { outline: 3px solid var(--focus-ring, #7cc4ff); outline-offset: 2px; }
.consent-fab:focus-visible, .consent-cat input:focus-visible { outline: 3px solid var(--focus-ring, #7cc4ff); outline-offset: 2px; }
/* Checkbox target: native ~13px fails WCAG 2.5.8 (24px AA); label row is 44px. */
.consent-cat input[type="checkbox"] { width: 1.5rem; height: 1.5rem; min-width: 1.5rem; accent-color: var(--accent-primary, #00D4FF); }
.consent-cat label { min-height: 44px; }
/* Age gate (z 1600, topmost) is a blocking interstitial: keep banner/FAB
   hidden while it is open so they appear only after the gate is dismissed. */
body:has(#ageGate:not([hidden]), #ageGateLocked:not([hidden])) .consent-banner,
body:has(#ageGate:not([hidden]), #ageGateLocked:not([hidden])) .consent-fab { display: none; }
.consent-dialog {
  position: fixed; inset: 0; z-index: 1550; display: grid; place-items: center;
  background: rgba(0,0,0,.55); padding: var(--space-4);
}
.consent-dialog__panel {
  max-width: 34rem; width: 100%; max-height: 90vh; overflow: auto;
  background: var(--bg-elevated, #111); color: var(--text-primary, #fff);
  border: 1px solid var(--border-subtle, #333); border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.consent-dialog__panel h2 { margin-top: 0; font-size: var(--text-xl); }
.consent-cat { border-top: 1px solid var(--border-subtle, #333); padding: var(--space-4) 0; }
.consent-cat label { display: flex; gap: var(--space-3); align-items: center; font-weight: var(--font-weight-semibold); cursor: pointer; }
.consent-cat p { margin: var(--space-2) 0 0; font-size: var(--text-xs); line-height: 1.55; opacity: .85; }
.consent-dialog__actions { margin-top: var(--space-5); }
.consent-fab {
  position: fixed; left: var(--space-4); bottom: var(--space-4); z-index: 1100;
  font: inherit; font-size: var(--text-xs); padding: var(--space-2) var(--space-4);
  min-height: 44px; /* WCAG 2.5.5 target size */
  background: var(--bg-elevated, #111); color: var(--text-primary, #fff);
  border: 1px solid var(--border-subtle, #333); border-radius: var(--radius-full); cursor: pointer;
}
.consent-fab[hidden] { display: none; }
@media (max-width: 40rem) {
  .consent-banner { inset-inline: var(--space-3); bottom: var(--space-3); }
  .consent-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .consent-banner, .consent-dialog { transition: none; } }

/* :has() fallback (Chrome 105+/FF 121+/Safari 15.4+): JS adds body.age-gate-open in entry-check.js open()/lock() */
@supports not selector(:has(*)) {
  body.age-gate-open .consent-banner, body.age-gate-open .consent-fab { display: none; }
}

/* MOBILE (<=767px): the floating privacy button sat on top of the hero's bottom control row
   (left arrow and first dot). Lift it above that row and make it a 48px target. */
@media (max-width: 767px) {
  .consent-fab { bottom: 4.5rem; min-height: 48px; }
}
