/* Stravax cookie banner and preference centre.
   Pairs with consent-banner.js. Spec section 3.1: Accept and Reject carry the same
   size, contrast and weight and sit next to each other in the reading order. That is
   a compliance requirement, not a style choice, so .sxc-btn is one class used by both
   and neither is allowed a variant that outweighs the other.

   Each site overrides the palette by setting these five variables on :root. The
   defaults below are the stravax.ai dark palette. ponytail: five variables, no build
   step, no per-site fork of this file. */

/* Declared on :root, never on .sxc, so a site stylesheet loaded after this file can
   override any of the five by redeclaring them on :root. */
:root {
  --sxc-bg: #0E0E11;
  --sxc-ink: #FAFAF9;
  --sxc-dim: rgba(250, 250, 249, .66);
  --sxc-line: rgba(250, 250, 249, .16);
  --sxc-accent: #FFC94D;
  --sxc-on-accent: #111;
}

.sxc {
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--sxc-ink);
}

.sxc-banner {
  position: fixed;
  z-index: 2147483000;
  inset: auto 0 0 0;
  padding: 16px;
  outline: none;
}

.sxc-card {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 22px;
  background: var(--sxc-bg);
  border: 1px solid var(--sxc-line);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}

.sxc-h { margin: 0 0 8px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.sxc-p { margin: 0 0 16px; color: var(--sxc-dim); }
.sxc a { color: var(--sxc-accent); text-decoration: underline; }

.sxc-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Accept and Reject: identical box, identical contrast, identical weight. */
.sxc-btn {
  flex: 0 0 auto;
  min-width: 132px;
  padding: 11px 20px;
  font: inherit;
  font-weight: 600;
  color: var(--sxc-on-accent);
  background: var(--sxc-accent);
  border: 1px solid var(--sxc-accent);
  border-radius: 8px;
  cursor: pointer;
}
.sxc-btn:hover { filter: brightness(1.08); }

/* Manage is not a choice, so it is allowed to look secondary. */
.sxc-ghost { color: var(--sxc-ink); background: transparent; border-color: var(--sxc-line); }

.sxc :focus-visible { outline: 2px solid var(--sxc-accent); outline-offset: 3px; }

/* Preference centre */
.sxc-modal { position: fixed; inset: 0; z-index: 2147483001; display: flex; align-items: center; justify-content: center; padding: 16px; }
/* QC loop 1 FAIL: author display:flex above ties with the UA [hidden] rule on
   specificity, and author beats user-agent on a tie, so setting the `hidden`
   attribute never actually hid this element - the backdrop kept blocking the
   page after Escape/Save. This selector out-specifies .sxc-modal so [hidden]
   wins again. */
.sxc-modal[hidden] { display: none; }
.sxc-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .62); }
.sxc-panel-card { position: relative; width: 100%; max-width: 620px; max-height: 86vh; overflow-y: auto; }
.sxc-x { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; font-size: 20px; line-height: 1; color: var(--sxc-ink); background: transparent; border: 1px solid var(--sxc-line); border-radius: 8px; cursor: pointer; }

.sxc-rows { margin: 0 0 18px; }
.sxc-row { padding: 13px 0; border-top: 1px solid var(--sxc-line); }
.sxc-toggle { display: flex; align-items: center; gap: 10px; }
.sxc-toggle input { width: 17px; height: 17px; accent-color: var(--sxc-accent); }
.sxc-toggle label { font-weight: 600; cursor: pointer; }
.sxc-toggle input[disabled] + label { cursor: default; }
.sxc-always { margin-left: 6px; font-size: 12px; font-weight: 400; color: var(--sxc-dim); }
.sxc-note { margin: 6px 0 0 27px; color: var(--sxc-dim); font-size: 13px; }

.sxc-locked { overflow: hidden; }

@media (max-width: 560px) {
  .sxc-btn { flex: 1 1 100%; }
  .sxc-card { padding: 18px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .sxc *, .sxc *::before, .sxc *::after { transition: none !important; animation: none !important; }
}
