/* ==========================================================================
   Orbit — cookie consent notice
   W-01/A1 §5 (§6.5) · W-04 v1.1 §5.4 · W-06 P2-1, P2-6, P3-6, P3-7, P3-8, §6

   Non-modal. No dimming. No focus trap. No auto-dismiss. No timer.
   Accept all / Reject all / Manage preferences are identical controls.
   Version: 1.0.0
   ========================================================================== */

.consent {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: var(--z-consent);            /* above the a11y panel (W-06 §6.1) */
  background: var(--white);
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -12px 32px rgba(20,24,27,.10);
  /* Reserve the accessibility widget's corner (W-06 §6.2 — 120px). */
  padding: var(--s-5) var(--banner-clear) var(--s-5) var(--page-pad);
}
.consent[hidden] { display: none; }

@media (max-width: 768px) {
  .consent {
    bottom: 88px;                       /* clears the widget button */
    padding: var(--s-5) var(--page-pad);
    max-height: 70dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

.consent__inner {
  max-width: var(--container); margin-inline: auto;
  display: flex; flex-direction: column; gap: var(--s-4);
}

.consent__title { font-size: var(--t-h4); font-weight: 600; }
.consent__body { font-size: var(--t-small); max-width: 78ch; }

.consent__actions {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
}

/* The three actions are one control, three times. Identical min-height,
   width, border, background, colour and weight. A regulator looking only at
   this row must not be able to tell which one we would prefer. */
.consent__btn {
  min-height: 48px;
  width: 172px;
  padding: 0 var(--s-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-input);
  background: var(--white);
  color: var(--ink);
  font-size: var(--t-small);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.consent__btn:hover { background: var(--mist); }

/* W-06 P3-8 — full-width stack on mobile, as specified. */
@media (max-width: 768px) {
  .consent__actions { flex-direction: column; }
  .consent__btn { width: 100%; }
}

/* ---- Preferences panel — expands inline, never into a modal ------------ */
.consent__panel {
  border-top: 1px solid var(--line);
  padding-top: var(--s-5);
  display: grid; gap: var(--s-4);
}
.consent__panel[hidden] { display: none; }

.consent__row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--s-5);
  border: 1px solid var(--line); border-radius: var(--r-card);
  padding: var(--s-4);
}
.consent__row-text { display: grid; gap: var(--s-1); }
.consent__row-title { font-weight: 600; font-size: var(--t-small); }
.consent__row-desc { font-size: var(--t-small); color: var(--slate); max-width: 62ch; }

.consent__always {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--t-small); font-weight: 600; color: var(--slate);
  white-space: nowrap; padding-top: var(--s-1);
}

/* The switch. The real <input> stays in the label so :focus-within paints a
   visible ring on it (W-06 P2-1) — the previous design put a 1px clipped box
   under the only control on the site that records a legal decision. */
.switch {
  display: inline-flex; align-items: center; gap: var(--s-3);
  min-height: 64px; padding: 0 var(--s-2);
  cursor: pointer; user-select: none;
  border-radius: var(--r-input);
}
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }

.switch__state {
  /* min-width, never width — this word is the only non-colour carrier of
     state, so it must survive SC 1.4.12 text spacing (W-06 P2-6). */
  min-width: 3ch;
  font-size: var(--t-small); font-weight: 600; text-align: right;
}

.switch__track {
  position: relative; flex: none;
  width: 52px; height: 30px; border-radius: var(--r-pill);
  background: var(--white); border: 2px solid var(--line-strong);
  transition: background-color var(--d-micro) var(--ease),
              border-color var(--d-micro) var(--ease);
}
.switch__knob {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--line-strong);
  transition: transform var(--d-micro) var(--ease),
              background-color var(--d-micro) var(--ease);
}
.switch input:checked ~ .switch__track {
  background: var(--primary); border-color: var(--primary);
}
.switch input:checked ~ .switch__track .switch__knob {
  background: var(--white); transform: translateX(22px);
}

.consent__panel-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
@media (max-width: 768px) {
  .consent__panel-actions { flex-direction: column; }
  .consent__row { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .switch__track, .switch__knob { transition-duration: .01ms; }
}
