/* Cookie banner + preferences. Loads after components.css; uses the shared colour and motion tokens.
   Non-blocking by design (no overlay, no focus trap): the Site works while the banner is open. */

#vc-consent {
  position: fixed; z-index: 90; left: 20px; bottom: 20px; width: min(440px, calc(100vw - 40px));
  max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain;
  padding: 24px; border-radius: 16px; background: var(--ink-700); color: var(--white);
  border: 1px solid var(--border-inverse);
  box-shadow: 0 2px 6px rgba(6, 16, 26, .18), 0 18px 44px rgba(6, 16, 26, .34);
  transform-origin: 0 100%;
  transition: opacity var(--dur-base) var(--ease-sweep), transform var(--dur-base) var(--ease-sweep);
}
#vc-consent[hidden] { display: none; }
#vc-consent.is-entering { opacity: 0; transform: translateY(14px) scale(.98); }
#vc-consent.is-leaving { opacity: 0; transform: translateY(10px) scale(.98); pointer-events: none; }

.cc-title { margin: 0 0 10px; font-family: "Orbitron", sans-serif; font-weight: 600; font-size: 16px; letter-spacing: .02em; }
.cc-text { margin: 0; font-size: 14px; line-height: 1.6; color: #E4E8EC; }
.cc-text + .cc-text { margin-top: 8px; color: var(--text-on-inverse-muted); }
.cc-text a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.cc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.cc-btn {
  min-height: 46px; padding: 0 16px; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 500;
  cursor: pointer; border: 1px solid transparent;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.cc-btn:active { transform: scale(.97); }
/* Accept and Reject are one and the same style, so neither is steered */
.cc-accept, .cc-reject { background: var(--white); color: var(--ink-800); }
.cc-custom, .cc-save { grid-column: 1 / -1; background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .5); }
@media (hover: hover) and (pointer: fine) {
  .cc-accept:hover, .cc-reject:hover { background: var(--steel-200); }
  .cc-custom:hover, .cc-save:hover { background: rgba(255, 255, 255, .1); border-color: var(--white); }
}
.cc-btn:focus-visible, .cc-switch input:focus-visible + .cc-track, #vc-consent a:focus-visible {
  outline: 2px solid var(--focus-ring); outline-offset: 3px;
}

.cc-panel[hidden] { display: none; }
.cc-cats { display: grid; gap: 10px; margin-top: 16px; }
.cc-cat { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--ink-600); }
.cc-cat strong { font-weight: 500; font-size: 15px; }
.cc-cat p { grid-column: 1; margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-on-inverse-muted); }
.cc-switch { grid-column: 2; grid-row: 1 / span 2; position: relative; display: inline-flex; }
.cc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.cc-switch input:disabled { cursor: not-allowed; }
.cc-track { width: 44px; height: 26px; border-radius: 13px; background: var(--ink-400); position: relative; transition: background-color var(--dur-fast) var(--ease-out); }
.cc-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--white);
  transition: transform var(--dur-base) var(--ease-sweep);
}
.cc-switch input:checked + .cc-track { background: var(--blue-500); }
.cc-switch input:checked + .cc-track::after { transform: translateX(18px); }
.cc-switch input:disabled + .cc-track { opacity: .55; }
.cc-panel .cc-actions { grid-template-columns: 1fr; margin-top: 16px; }

/* footer trigger: a button that looks like its sibling legal links */
.legal-links .cc-open {
  padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .legal-links .cc-open:hover { color: #fff; } }
.legal-links .cc-open:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

@media (max-width: 560px) {
  #vc-consent { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  #vc-consent, .cc-track, .cc-track::after, .cc-btn { transition: none; }
}

@media (max-width: 860px), (pointer: coarse) {
  .legal-links .cc-open { padding-block: 12px; margin-block: -12px; }   /* 44 px tall to tap, layout unchanged */
}
