/* ============================================================================
   Eventra dark theme — the pages below <main>

   qf-theme-dark.css flips the design-system tokens, which carries the header,
   footer and every qf-* component. The buyer pages are Tailwind with no dark
   variants, so this file reaches them instead:

   - The neutral ramps (gray, slate, neutral, zinc) are redefined. Tailwind 4
     emits every utility as var(--color-*), so text-gray-900 turns pale and
     bg-gray-50 turns to a dark tint at once, the same inversion the DS applies
     to its own ink ramp.
   - White is NOT redefined: text-white sits on green buttons and must stay
     white. bg-white is remapped by class instead.
   - Brand green is unreadable as text on a dark page, so text-primary takes
     the 40% tint, as --text-brand does in the DS dark.

   Every rule keys on :root[data-theme="dark"]. The layout always stamps the
   attribute (from the stored choice, else the OS), so no media-query copies.

   Visual language: green only. The DS dark uses orange for link hover and
   yellow for the switch's sun; both are replaced here.
   ============================================================================ */

:root[data-theme="dark"] {
    --color-gray-50: #1A1E1D;
    --color-gray-100: #202523;
    --color-gray-200: #2E3331;
    --color-gray-300: #3A403E;
    --color-gray-400: #6B706F;
    --color-gray-500: #8C908F;
    --color-gray-600: #A3A7A6;
    --color-gray-700: #B4B7B6;
    --color-gray-800: #D4D6D5;
    --color-gray-900: #ECEDEC;
    --color-gray-950: #F5F6F5;

    --color-slate-50: #1A1E1D;  --color-slate-100: #202523;  --color-slate-200: #2E3331;
    --color-slate-300: #3A403E; --color-slate-400: #6B706F;  --color-slate-500: #8C908F;
    --color-slate-600: #A3A7A6; --color-slate-700: #B4B7B6;  --color-slate-800: #D4D6D5;
    --color-slate-900: #ECEDEC;

    --color-neutral-50: #1A1E1D;  --color-neutral-100: #202523;  --color-neutral-200: #2E3331;
    --color-neutral-300: #3A403E; --color-neutral-400: #6B706F;  --color-neutral-500: #8C908F;
    --color-neutral-600: #A3A7A6; --color-neutral-700: #B4B7B6;  --color-neutral-800: #D4D6D5;
    --color-neutral-900: #ECEDEC;

    --color-zinc-50: #1A1E1D;  --color-zinc-100: #202523;  --color-zinc-200: #2E3331;
    --color-zinc-300: #3A403E; --color-zinc-400: #6B706F;  --color-zinc-500: #8C908F;
    --color-zinc-600: #A3A7A6; --color-zinc-700: #B4B7B6;  --color-zinc-800: #D4D6D5;
    --color-zinc-900: #ECEDEC;

    /* Status tints: the pale backgrounds go deep, the dark text goes light. */
    --color-red-50: #2A1414;   --color-red-100: #3A1A1A;  --color-red-200: #5C2424;
    --color-red-600: #F28B82;  --color-red-700: #F6A59D;  --color-red-800: #F9C0BA;
    --color-green-50: #11241D; --color-green-100: #163026; --color-green-200: #1F4535;
    --color-green-600: #6ECEB2; --color-green-700: #8AD9C2; --color-green-800: #A8E4D2;
    --color-emerald-50: #11241D; --color-emerald-100: #163026;
    --color-emerald-600: #6ECEB2; --color-emerald-700: #8AD9C2;
    --color-blue-50: #121C2A;  --color-blue-100: #172438;
    --color-blue-600: #8AB4F8; --color-blue-700: #A8C7FA;

    /* Green, not the DS's orange, on hover. */
    --text-link-hover: #8AD9C2;
}

/* The page and its cards. */
:root[data-theme="dark"] body,
:root[data-theme="dark"] .qf-page { background-color: var(--surface-page); }
:root[data-theme="dark"] .qf-main .bg-white { background-color: var(--surface-card); }
:root[data-theme="dark"] .qf-main .text-black { color: var(--qf-ink); }

/* Brand green as text: the 40% tint. As a fill (buttons) it stays Sidra green. */
:root[data-theme="dark"] .qf-main .text-primary,
:root[data-theme="dark"] .qf-main .hover\:text-primary:hover { color: var(--qf-sidra-green-40); }
:root[data-theme="dark"] .qf-main .border-primary { border-color: var(--qf-sidra-green-40); }

/* Form fields Tailwind leaves to the browser. */
:root[data-theme="dark"] .qf-main :where(input, select, textarea):not([type="checkbox"], [type="radio"], [type="range"]) {
    background-color: var(--surface-card);
    color: var(--qf-ink);
}

/* The switch's sun, which the DS paints yellow. */
:root[data-theme="dark"] .qf-theme .qf-theme-dark { color: var(--qf-sidra-green-40); }

/* ---- Contrast, from the dark sweep of 21 Oct 2026 ---- */

/* Lighter steps for the two greys that carry small text (labels, step names). */
:root[data-theme="dark"] {
    --color-gray-300: #343A38;
    --color-gray-400: #838887;
    --color-gray-500: #9CA09F;
}

/* Burgundy accent as text and outline: a light tint of it. Fills stay. */
:root[data-theme="dark"] .qf-main :is(.text-accent, .text-accent-dark) { color: #F2A7BC; }
:root[data-theme="dark"] .qf-main .border-accent { border-color: #F2A7BC; }

/* Green text this project paints itself (pue-chrome-overrides.css). */
:root[data-theme="dark"] .qf-page .qf-main .pue-textlink,
:root[data-theme="dark"] .qf-page .pue-cookie-link,
:root[data-theme="dark"] .qf-page .pue-cookie-btn-ghost { color: var(--qf-sidra-green-40); }
:root[data-theme="dark"] .qf-page .qf-main .pue-cta { background: var(--surface-card); color: var(--qf-sidra-green-40); }

/* Panels that sat on white: the cookie bar, the account menu, the a11y panel. */
:root[data-theme="dark"] .qf-page :is(.pue-cookie, .pue-acct-panel, .pue-a11y-panel) {
    background: var(--surface-card);
    color: var(--qf-ink);
}

/* The "artwork coming soon" plate: the same green-tinted gradient, mixed into
   the dark card instead of white. */
:root[data-theme="dark"] .qf-page .qf-main .pue-poster-plate {
    --plate-ink: var(--qf-sidra-green-40);
    background-color: color-mix(in srgb, var(--plate-ink) 6%, #161A19);
    background-image: linear-gradient(135deg,
        color-mix(in srgb, var(--plate-ink) 4%, #161A19) 0%,
        color-mix(in srgb, var(--plate-ink) 14%, #161A19) 100%);
}
:root[data-theme="dark"] .qf-page .qf-main .pue-poster-plate::after {
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .06) 50%, transparent 70%);
}
:root[data-theme="dark"] .qf-page .qf-main .pue-poster-plate__mark { background: #202523; }
:root[data-theme="dark"] .qf-page .qf-main .pue-poster-plate__label { color: var(--plate-ink); }

/* ---- Seat map (pages/seatmap.blade.php) ----
   Its panels and controls take the dark card. The map canvas itself stays
   light, like the DS keeps QR and artwork plates white: seat fills (white held,
   grey sold, pale blocked) and the ticket-type colours are drawn for it. */
:root[data-theme="dark"] .seatmap-page {
    --sm-card: #161A19;
    --sm-card-2: #1A1E1D;
    --sm-line: #2E3331;
    --sm-line-2: #262B29;
    --sm-ink: #ECEDEC;
    --sm-mute: #A3A7A6;
    --sm-green-soft: #163026;
    --sm-green-ink: var(--qf-sidra-green-40);
    --sm-notice: var(--qf-sidra-green-40);
    --sm-notice-soft: #163026;
    --sm-notice-ink: #ECEDEC;
}
:root[data-theme="dark"] .seatmap-page .sm-bar-alert {
    background: #2A1414;
    color: #F9C0BA;
    border-top-color: #F28B82;
}
:root[data-theme="dark"] .seatmap-page .sm-bar-alert.is-flash { animation-name: smAlertFlashDark; }
@keyframes smAlertFlashDark { 50% { background: #5C2424; } }
:root[data-theme="dark"] .seatmap-page .sm-hint.is-error { color: #F28B82; }

/* ---- Second sweep ---- */

:root[data-theme="dark"] .qf-page .pue-a11y-heading { color: var(--qf-sidra-green-40); }

/* Sign-in card (auth/login, pue-chrome-overrides.css "pue-otp"). The green head
   stays green; the white body below it goes dark. Fields already follow the
   form-field rule above. */
:root[data-theme="dark"] .pue-otp { background: var(--surface-card); border-color: #2E3331; }
:root[data-theme="dark"] .pue-otp .pue-otp-label { color: var(--qf-ink); }
:root[data-theme="dark"] .pue-otp :is(.pue-otp-points li, .pue-otp-foot) { color: var(--qf-ink-70); }
:root[data-theme="dark"] .pue-otp .pue-otp-field > svg { color: var(--qf-ink-50); }
:root[data-theme="dark"] .pue-otp :is(.pue-otp-input, .pue-otp-digit) { border-color: #3A403E; }
:root[data-theme="dark"] .pue-otp :is(.pue-otp-input, .pue-otp-digit):focus,
:root[data-theme="dark"] .pue-otp .pue-otp-digit.is-filled { border-color: var(--qf-sidra-green-40); }
:root[data-theme="dark"] .pue-otp .pue-otp-error { color: #F28B82; }
:root[data-theme="dark"] .qf-main .pue-otp .pue-otp-digits.is-error .pue-otp-digit { border-color: #F28B82; background: #2A1414; color: #F9C0BA; }
:root[data-theme="dark"] .qf-main .pue-otp .pue-otp-digits.is-success .pue-otp-digit { border-color: var(--qf-sidra-green); background: var(--qf-sidra-green); color: #fff; }

/* ---- Header lockup and phone switch ---- */

/* Phone emblem (pue-chrome-overrides.css, "Header logo"): white tree in dark. */
@media (max-width: 700px) {
    :root[data-theme="dark"] .qf-header-logo .qf-emblem-light { display: none; }
    :root[data-theme="dark"] .qf-header-logo .qf-emblem-dark { display: block; }
}

/* Phone: pue-chrome-overrides.css hides every header action at 700px and below
   except a11y and the cart, which took the theme switch with it, so a phone on
   a light OS could never reach dark. Keep it beside the cart. This rule is not
   dark-only: the switch has to be there in light mode to get out of it. */
@media (max-width: 700px) {
    .pue-js .qf-page .qf-header-actions > .qf-theme-form { display: inline-flex; align-items: center; margin-inline-end: 8px; }
}

/* Ticket card: the surface follows the dark card colour; the notches are a
   mask, so the page shows through them with no extra rule. */
:root[data-theme="dark"] .pue-ticket { --tk-surface: var(--surface-card); }
:root[data-theme="dark"] .pue-ticket__head { background: #023126; }
:root[data-theme="dark"] .pue-ticket__seat dd { color: var(--qf-mint, #6ECEB2); }
