/*
 * Oilers 50/50 Gameshow - hand-written styles. No build step.
 * Design language follows the Edmonton Oilers 50/50 Admin Console
 * (50-50.edmontonoilers.com, public/css/oilers-theme.css): navy/blue brand
 * gradient, glass cards, orange primary actions, Space Grotesk headings,
 * Manrope body text.
 * Class list is fixed by docs/SPEC.md. Pages must not edit this file;
 * page-specific rules go in @push('styles').
 */

:root {
    /* Brand palette. The console's names; --oil-* are the SPEC's names for the same colours. */
    --oilers-blue: #003974;
    --oilers-orange: #FF4C00;
    --oilers-orange-light: #FF6A22;
    --oilers-navy: #001B33;
    --oilers-light: #F6F9FF;
    --oil-navy: var(--oilers-navy);
    --oil-orange: var(--oilers-orange);
    --brand-gradient:
        radial-gradient(circle at 12% 18%, rgba(255, 76, 0, 0.55), transparent 48%),
        radial-gradient(circle at 85% 12%, rgba(0, 57, 116, 0.55), transparent 52%),
        linear-gradient(135deg, #00142A 0%, #002F5F 42%, #003974 68%, #001B33 100%);
    --chrome-gradient: linear-gradient(135deg, #001B33 0%, #002A56 60%, #003974 100%);

    --bg: var(--oilers-light);
    --surface: #FFFFFF;
    --glass: rgba(255, 255, 255, 0.9);
    --text: #0B1A2C;
    --muted: #4A5A72;
    --link: var(--oilers-blue);
    --border: rgba(0, 27, 51, 0.12);
    --border-strong: #7A8BA3;
    --stripe: rgba(0, 57, 116, 0.045);
    --tint: rgba(0, 57, 116, 0.08);
    --success-bg: #E5F5EA;
    --success-text: #135C2E;
    --info-bg: var(--oilers-blue);
    --info-text: #FFFFFF;
    --danger: #B42318;
    --danger-bg: #FDECEA;
    --warning-bg: #FFF4E5;
    --warning-text: #7A3A00;
    --danger-text: #8A1C12;
    --shadow: 0 10px 30px rgba(0, 22, 51, 0.08);
    --shadow-lg: 0 20px 50px rgba(0, 22, 51, 0.16);
    --glow: 0 10px 24px rgba(255, 76, 0, 0.28);

    /* Surface text tokens, captured here so surfaces can restore them inside
       the public gradient scope below (which overrides --text/--muted/--link). */
    --ink: var(--text);
    --ink-muted: var(--muted);
    --ink-link: var(--link);

    --radius: 12px;
    --radius-lg: 24px;
    --gutter: 16px;
    --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Space Grotesk", "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #00101F;
        --surface: #0A1E38;
        --glass: rgba(6, 24, 46, 0.9);
        --text: #E9EEF6;
        --muted: #A6B4C8;
        --link: #FF8A55;
        --border: rgba(255, 255, 255, 0.12);
        --border-strong: rgba(255, 255, 255, 0.32);
        --stripe: rgba(255, 255, 255, 0.035);
        --tint: rgba(255, 255, 255, 0.07);
        --success-bg: #0F3320;
        --success-text: #9BE3B4;
        --info-bg: rgba(120, 170, 240, 0.18);
        --info-text: #C4DCFF;
        --danger-bg: #3A1210;
        --warning-bg: #3A2208;
        --warning-text: #FFD2A8;
        --danger-text: #F6B4AC;
        --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
    }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    overflow-wrap: break-word;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 0.5em;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--oilers-orange); outline-offset: 2px; }
/* enter-code.js moves focus to the celebration heading after an inline swap: announced, not outlined. */
[data-enter-stage] h1[tabindex="-1"]:focus { outline: none; }

::selection { background: rgba(255, 76, 0, 0.28); }

img { max-width: 100%; height: auto; }

/* Public pages sit on the brand gradient. Bare text on it uses on-dark
   tokens; .card, .kpi and .table-wrap restore the surface tokens. */
.page-public {
    --text: #F6F9FF;
    --muted: #C9D6EA;
    --link: #FFB08A;
    background-color: var(--oilers-navy);
    background-image: var(--brand-gradient);
    background-repeat: no-repeat;
}

/* Layout */
.container,
.container-wide {
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--gutter);
}
.container { max-width: 720px; }
.container-wide { max-width: 1200px; }

.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack > * { margin-top: 0; margin-bottom: 0; }

.row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.row > * { min-width: 0; }
form.row { align-items: flex-end; }

/* minmax(0, ...) so a wide table inside a grid cell scrolls instead of widening the page */
.grid-2,
.grid-4 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }

@media (min-width: 640px) {
    .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
    .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Layout chrome (used by the two layouts only) */
.site-header {
    position: relative;
    background: var(--chrome-gradient);
    color: #FFFFFF;
    border-bottom: 3px solid var(--oilers-orange);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.site-header .container,
.site-header .container-wide {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.page-admin .site-header .container-wide { max-width: none; }

/* Brand lockup: white EOCF 50/50 mark + two-line wordmark (the admin layout keeps the OEG mark) */
.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #FFFFFF;
    text-decoration: none;
}
.brand-logo {
    flex: 0 0 auto;
    width: auto;
    height: 38px;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
}
.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    font-family: var(--font-display);
    line-height: 1.1;
    text-transform: uppercase;
}
.brand-title { font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.08em; }
.brand-subtitle { font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.15em; color: rgba(255, 255, 255, 0.75); }

@media (min-width: 640px) {
    .brand-logo { height: 42px; }
    .brand-title { font-size: 1.0625rem; }
    .brand-subtitle { font-size: 0.75rem; }
}

.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; }
.site-nav a,
.site-nav button {
    padding: 0.5rem 0.125rem;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    color: rgba(255, 255, 255, 0.8);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: #FFFFFF; border-bottom-color: var(--oilers-orange); }
.site-nav form { margin: 0; }
.site-nav button {
    padding: 0.375rem 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
}
.site-nav button:hover { background: rgba(255, 255, 255, 0.22); }
.site-nav a.nav-pill {
    padding: 0.375rem 0.875rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--oilers-orange);
    color: var(--oilers-navy);
}
.site-nav a.nav-pill:hover { background: var(--oilers-orange-light); color: var(--oilers-navy); }

.site-main { flex: 1 0 auto; padding: 1.5rem 0 3rem; }
.site-footer { padding: 1.5rem 0 2rem; color: var(--muted); font-size: 0.875rem; }
.page-public .site-footer { text-align: center; }

@media (min-width: 640px) {
    .page-public .site-main { padding-top: 3rem; }
}

/* Admin: navy sidebar like the console's nav, flat light canvas for dense tables */
.admin-shell { flex: 1 0 auto; display: flex; flex-direction: column; }

.admin-sidebar {
    background: linear-gradient(180deg, #001B33 0%, #00264D 100%);
    padding: 0 var(--gutter);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.admin-sidebar nav { display: flex; gap: 0.25rem; }
.admin-sidebar a {
    display: block;
    padding: 0.75rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}
.admin-sidebar a:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.08); }
.admin-sidebar a[aria-current="page"] { color: #FFFFFF; box-shadow: inset 0 -3px 0 var(--oilers-orange); }
.admin-sidebar-note { margin: 1rem 0 0; padding: 0 0.75rem; color: rgba(255, 255, 255, 0.55); font-size: 0.75rem; }

.admin-main { flex: 1; min-width: 0; padding: 1.5rem var(--gutter) 3rem; }

@media (min-width: 900px) {
    .admin-shell { flex-direction: row; }
    .admin-sidebar { flex: 0 0 232px; padding: 1.25rem 0.75rem 1.25rem 0; }
    .admin-sidebar nav { position: sticky; top: 1.25rem; flex-direction: column; }
    .admin-sidebar a { padding: 0.75rem 1rem 0.75rem 1.5rem; border-radius: 0 10px 10px 0; }
    .admin-sidebar a[aria-current="page"] { background: rgba(255, 255, 255, 0.1); box-shadow: inset 3px 0 0 var(--oilers-orange); }
    .admin-main { padding: 2rem 2.5rem 3rem; }
}

/* Surfaces: translucent glass over the gradient, soft border, large shadow */
.card,
.kpi,
.table-wrap {
    --text: var(--ink);
    --muted: var(--ink-muted);
    --link: var(--ink-link);
    color: var(--text);
}

.card {
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 60%), var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.25rem;
}
/* Home page: the EOCF 50/50 logo above the hero card (artwork carries its own outline) */
.hero-logo { display: flex; justify-content: center; }
.hero-logo img {
    width: min(100%, 320px);
    height: auto;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

/* Home page hero: the console's login-card orange glow in the top corner */
.card-hero {
    background:
        radial-gradient(circle 260px at 100% 0, rgba(255, 76, 0, 0.24), transparent),
        linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 60%),
        var(--glass);
}
@media (min-width: 640px) {
    .card { padding: 2rem; }
}

.card-title {
    margin: 0 0 0.75rem;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
h1.card-title { font-size: clamp(1.5rem, 6vw, 2rem); letter-spacing: 0.04em; line-height: 1.1; }

.lead { font-size: 1.0625rem; }

/* Buttons. Primary = orange with navy text: 5.2:1 (#FF4C00) to 6.1:1 (#FF6A22), AA. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.5rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled,
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-primary {
    background: linear-gradient(120deg, var(--oilers-orange), var(--oilers-orange-light));
    color: var(--oilers-navy);
    box-shadow: var(--glow);
}
.btn-primary:hover { background: var(--oilers-orange-light); color: var(--oilers-navy); box-shadow: 0 14px 30px rgba(255, 76, 0, 0.4); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--oilers-orange); }
.btn-danger { background: var(--danger); color: #FFFFFF; }
.btn-danger:hover { background: #912018; }
.btn-block { display: flex; width: 100%; min-height: 52px; font-size: 1.0625rem; }
.table .btn { min-height: 36px; padding: 0.375rem 0.875rem; font-size: 0.875rem; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 0.375rem; }
.field label { font-weight: 600; font-size: 0.9375rem; }

.input {
    width: 100%;
    min-height: 48px;
    padding: 0.625rem 0.875rem;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder { color: var(--ink-muted); opacity: 0.75; }
.input:focus {
    border-color: var(--oilers-orange);
    outline: 2px solid transparent;
    box-shadow: 0 0 0 4px rgba(255, 76, 0, 0.22);
}

/* Fits XXXX-XXXX-XXXX on one line down to a 320px phone; >= 20px so iOS never zooms. */
.input-code {
    font-family: var(--font-mono);
    font-size: clamp(1.25rem, 6.4vw, 2rem);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-indent: 0.15em;
    text-transform: uppercase;
    text-align: center;
}
.input.input-code { min-height: 60px; padding-left: 0.5rem; padding-right: 0.5rem; }
/* On a non-input (confirm and success pages) it shows the code as a ticket stub */
.input-code:not(input) {
    padding: 0.875rem 0.5rem;
    background: rgba(255, 76, 0, 0.07);
    border: 2px dashed rgba(255, 76, 0, 0.6);
    border-radius: var(--radius);
    color: var(--text);
    overflow-wrap: anywhere;
}

.checkbox { display: flex; align-items: flex-start; gap: 0.625rem; }
.field .checkbox { font-weight: 500; }
.checkbox input { width: 1.25rem; height: 1.25rem; margin: 0.15rem 0 0; flex: 0 0 auto; accent-color: var(--oilers-orange); }

.help { color: var(--muted); font-size: 0.875rem; }
.error { color: var(--danger-text); font-size: 0.875rem; font-weight: 600; }

/* Alerts */
.alert {
    padding: 0.875rem 1rem;
    border: 1px solid;
    border-left-width: 4px;
    border-radius: var(--radius);
    font-weight: 600;
}
.alert-success { background: var(--success-bg); color: var(--success-text); border-color: currentColor; }
.alert-error { background: var(--danger-bg); color: var(--danger-text); border-color: currentColor; }
.alert-warning { background: var(--warning-bg); color: var(--warning-text); border-color: var(--oilers-orange); }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.1875rem 0.625rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--tint);
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.badge-active { background: var(--success-bg); color: var(--success-text); border-color: transparent; }
.badge-redeemed { background: var(--info-bg); color: var(--info-text); border-color: transparent; }
.badge-void { background: var(--danger-bg); color: var(--danger-text); border-color: transparent; }

/* Tables */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.card .table-wrap { box-shadow: none; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table th,
.table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.table thead th { background: var(--tint); }
.table tbody tr:nth-child(even) { background: var(--stripe); }
.table tbody tr:hover { background: var(--tint); }
.table tbody tr:last-child > * { border-bottom: 0; }

/* KPI tiles */
.kpi {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 1.125rem 1.25rem;
}
.kpi::before {
    content: "";
    display: block;
    width: 2rem;
    height: 4px;
    margin-bottom: 0.75rem;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--oilers-orange), var(--oilers-orange-light));
}
.kpi-value { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-label { margin-top: 0.25rem; color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

/* Pagination (Bootstrap 4 markup, see AppServiceProvider) */
.pagination { display: flex; flex-wrap: wrap; gap: 0.375rem; list-style: none; margin: 1rem 0 0; padding: 0; }
.pagination .page-link {
    display: block;
    min-width: 2.5rem;
    padding: 0.4rem 0.8rem;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}
.pagination a.page-link:hover { border-color: var(--oilers-orange); }
.pagination .active .page-link {
    background: linear-gradient(120deg, var(--oilers-orange), var(--oilers-orange-light));
    border-color: transparent;
    color: var(--oilers-navy);
    box-shadow: var(--glow);
}
.pagination .disabled .page-link { opacity: 0.5; }

/* Utilities */
.muted { color: var(--muted); }
.text-center { text-align: center; }
.mono { font-family: var(--font-mono); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
    .btn:active { transform: none; }
}

/* Report line chart */
:root {
    --chart-entries: var(--oilers-orange);
    --chart-signups: var(--oilers-blue);
}
@media (prefers-color-scheme: dark) {
    :root { --chart-signups: #6FA8FF; }
}
.chart-legend { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0 0 0.75rem; padding: 0; list-style: none; font-size: 0.875rem; font-weight: 700; }
.chart-legend li { display: flex; align-items: center; gap: 0.5rem; }
.legend-swatch { width: 1.5rem; height: 4px; border-radius: 2px; }
.legend-entries { background: var(--chart-entries); }
.legend-signups { background: var(--chart-signups); }
.chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.25rem; }
.line-chart { display: block; min-width: 560px; width: 100%; height: auto; overflow: visible; }
.line-chart text { fill: var(--muted); font-family: var(--font); font-size: 12px; font-variant-numeric: tabular-nums; }
.line-chart .grid-line { stroke: var(--border); stroke-width: 1; }
.line-chart line,
.line-chart polyline { vector-effect: non-scaling-stroke; }
.line-chart circle { stroke: var(--surface); stroke-width: 1; }
.line-entries { stroke: var(--chart-entries); }
.line-signups { stroke: var(--chart-signups); }
.dot-entries { fill: var(--chart-entries); }
.dot-signups { fill: var(--chart-signups); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Cursor pager + filter bar */
.filter-bar { align-items: flex-end; }
.filter-bar > a { display: inline-flex; align-items: center; min-height: 48px; }
.counts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 1rem 0; color: var(--muted); }
.counts strong { color: var(--ink); }
.cursor-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1rem; }
.cursor-nav .pagination { margin: 0; }

/* Code input + celebration */
/* Home code field (public/js/code-input.js). The hint line keeps its height so
   the button never jumps; the check mark is a data URI (no external image). */
.input-code[data-code-input] { letter-spacing: 0.12em; text-indent: 0.12em; }
[data-code-input] ~ .help { min-height: 1.3em; margin: 0; }
.input-code.is-complete {
    border: 2px solid var(--oilers-orange);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%23FF4C00'/%3E%3Cpath d='M6.8 12.4l3.4 3.4 7-7' fill='none' stroke='%23FFFFFF' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: clamp(14px, 4.4vw, 22px);
}
/* "My entries" card: a code never breaks at its dashes; the date wraps instead. */
#my-entries td.mono { white-space: nowrap; }

/* Success page (public/js/celebrate.js). Without the script, or with reduced
   motion: the resting siren halo, the stamp in place and the final count. */
.goal-lamp {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 1000;
    pointer-events: none;
    background-color: rgba(220, 30, 30, 0);
    background-image: linear-gradient(100deg, transparent 40%, rgba(255, 220, 205, 0.5) 50%, transparent 60%);
    background-size: 250% 100%;
    background-repeat: no-repeat;
    animation: goal-lamp 600ms ease-out both;
}
@keyframes goal-lamp {
    0% { background-color: rgba(220, 30, 30, 0); background-position: 150% 0; }
    15% { background-color: rgba(220, 30, 30, 0.55); }
    35% { background-color: rgba(220, 30, 30, 0.08); }
    55% { background-color: rgba(220, 30, 30, 0.55); }
    100% { background-color: rgba(220, 30, 30, 0); background-position: -50% 0; }
}
.celebrate-canvas { position: fixed; top: 0; left: 0; z-index: 1001; pointer-events: none; }

/* Siren: a red revolving light behind the card. The halo (::after) hugs the card and is always softly
   lit; the beams (::before) are a soft-edged conic disc, larger than the card, that turns while the
   celebration runs. The light paints in the root stacking context's negative layer: behind the header
   and both cards, above the page gradient (the body propagates it to the canvas). So no ancestor of
   .siren may create a stacking context: no transform, filter, opacity < 1, isolate or z-index on main,
   .container or body. Frequencies stay under 3 Hz (WCAG 2.3.1): two beams pass per turn, 1.67 Hz fast
   and 0.83 Hz slow; the halo breathes at 0.83 Hz, then 0.42 Hz; 4.8 s in all. */
.siren { position: relative; }
.siren > .card { position: relative; }
.siren::before,
.siren::after { content: ""; position: absolute; z-index: -1; pointer-events: none; }
.siren::after {
    inset: 0;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 48px 10px rgba(255, 32, 32, 0.45);
    opacity: 0.55;
    transition: opacity 1s ease;
}
.siren::before {
    display: block;
    inset: -60% -35%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0 2%, rgba(255, 40, 40, 0.35) 9%, rgba(255, 40, 40, 0.8) 14%, rgba(255, 40, 40, 0.35) 19%, transparent 26%, transparent 52%, rgba(255, 40, 40, 0.35) 59%, rgba(255, 40, 40, 0.8) 64%, rgba(255, 40, 40, 0.35) 69%, transparent 76%);
    -webkit-mask-image: radial-gradient(closest-side, #000 45%, transparent 100%);
    mask-image: radial-gradient(closest-side, #000 45%, transparent 100%);
    will-change: transform;
    opacity: 0;
    transition: opacity 0.6s ease;
}
/* The rotated beam disc's box is scrollable overflow on both axes (the halo's box-shadow is not); clip makes
   no scroll container and no stacking context. Scoped with :has to the success page, so other pages keep
   their scroll behaviour; a browser without :has merely pans sideways for 4.8 s. The clip edge is the viewport
   edge horizontally and main's padding edge vertically, both behind opaque chrome (header, footer area). */
.site-main:has(.siren) { overflow: clip; }
.siren-fast::before { opacity: 1; animation: siren-spin 1.2s linear infinite; }
.siren-fast::after { opacity: 1; animation: siren-breathe 600ms ease-in-out infinite alternate; }
.siren-slow::before { opacity: 0.6; animation: siren-spin 2.4s linear infinite; }
.siren-slow::after { opacity: 0.8; animation: siren-breathe 1200ms ease-in-out infinite alternate; }
@keyframes siren-spin { to { transform: rotate(360deg); } }
@keyframes siren-breathe {
    from { box-shadow: 0 0 48px 10px rgba(255, 32, 32, 0.45); }
    to { box-shadow: 0 0 96px 32px rgba(255, 32, 32, 0.85); }
}

/* Ticket stub with an ENTERED stamp. 19.2px bold is large text: orange on the
   light ticket passes AA for large text. */
.ticket { position: relative; }
.stamp {
    position: absolute;
    top: -1.35rem;
    right: -0.25rem;
    padding: 0.05rem 0.45rem;
    border: 3px solid var(--oilers-orange);
    border-radius: 6px;
    background: transparent;
    color: var(--oilers-orange);
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-indent: 0;
    text-transform: uppercase;
    transform: rotate(-12deg);
}
.stamp-pending { opacity: 0; }
.stamp-in { animation: stamp-in 420ms cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
@keyframes stamp-in {
    0% { opacity: 0; transform: rotate(-12deg) scale(1.6); }
    60% { opacity: 1; transform: rotate(-12deg) scale(0.92); }
    100% { opacity: 1; transform: rotate(-12deg) scale(1); }
}

/* Scoreboard counter */
.scoreboard {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--oilers-navy);
    border-radius: var(--radius);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08), var(--glow);
}
.scoreboard-label { color: #C9D6EA; font-family: var(--font-display); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.scoreboard-digits { display: inline-flex; gap: 0.25rem; }
.scoreboard .digit {
    min-width: 1.5ch;
    padding: 0.1rem 0.3rem;
    background: #00142A;
    border-radius: 6px;
    color: var(--oilers-orange);
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 8px rgba(255, 76, 0, 0.55);
}
/* Goal-song speaker: a 40px badge on the success card's top-right corner,
   clear of the headline at phone width; the nudge pill sits 8 px higher still.
   Fades out when the track ends. */
.sound-toggle {
    position: absolute;
    top: -12px;
    right: -8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    background: var(--oilers-navy);
    color: #FFFFFF;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: opacity 0.4s ease, background-color 0.15s ease;
}
.sound-toggle svg { width: 22px; height: 22px; }
.sound-toggle .slash-gap { stroke: var(--oilers-navy); }
.sound-toggle[aria-pressed="true"] { background: var(--oilers-orange); color: var(--oilers-navy); }
.sound-toggle[aria-pressed="false"] .icon-on,
.sound-toggle[aria-pressed="true"] .icon-muted { display: none; }
.sound-toggle.is-done { opacity: 0; pointer-events: none; }
.sound-toggle[hidden] { display: none; }
/* Goal-song switch on the code forms (public/js/sound-switch.js): a full-width row with the speaker
   badge, shown only by the script. Off, the badge pulses twice, once per page and never again after the
   first tap (.is-touched). When the fan asked for sound but the browser refused it unmuted, the
   success-page speaker grows a "Tap for sound" pill that stays until tapped and pulses three times
   after the goal lamp (.is-nudge); with reduced motion the static pill is the cue. */
.sound-switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--tint);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.sound-switch[hidden] { display: none; }
.sound-switch-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    background: var(--oilers-navy);
    color: #FFFFFF;
}
.sound-switch-badge svg { width: 20px; height: 20px; }
.sound-switch .slash-gap { stroke: var(--oilers-navy); }
.sound-switch[aria-pressed="true"] { border-color: var(--oilers-orange); background: rgba(255, 76, 0, 0.1); }
.sound-switch[aria-pressed="true"] .sound-switch-badge { background: var(--oilers-orange); color: var(--oilers-navy); }
.sound-switch[aria-pressed="false"] .icon-on,
.sound-switch[aria-pressed="true"] .icon-muted { display: none; }
.sound-switch-text { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.sound-switch-hint { color: var(--muted); font-size: 0.875rem; }
@keyframes sound-pulse {
    from { box-shadow: 0 0 0 0 rgba(255, 76, 0, 0.7); }
    to { box-shadow: 0 0 0 12px rgba(255, 76, 0, 0); }
}
@keyframes sound-nudge {
    from { box-shadow: 0 0 0 0 rgba(255, 76, 0, 0.7), var(--shadow-lg); }
    to { box-shadow: 0 0 0 12px rgba(255, 76, 0, 0), var(--shadow-lg); }
}
.sound-switch:not(.is-touched)[aria-pressed="false"] .sound-switch-badge { animation: sound-pulse 1.4s ease-out 2 0.6s; }
.sound-toggle.is-nudge { animation: sound-nudge 1.2s ease-out 3 1.2s; }
.sound-toggle .sound-toggle-cue { display: none; }
.sound-toggle.is-nudge { top: -20px; width: auto; padding: 0 0.875rem 0 0.5rem; border-radius: 999px; gap: 0.375rem; }
.sound-toggle.is-nudge .sound-toggle-cue { display: inline; font-family: var(--font-display); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
    .goal-lamp,
    .celebrate-canvas { display: none; }
    .stamp-in { animation: none !important; }
    .siren::before { display: none !important; }
    .siren::after { animation: none !important; }
    .sound-switch-badge,
    .sound-toggle.is-nudge { animation: none !important; }
    .stamp-pending { opacity: 1; }
}

/* Account menu + push buttons */
/* Public header: one row down to 360px, the lockup on the left and the actions on the right. */
.page-public .site-header .container { flex-wrap: nowrap; }
.page-public .site-brand { min-width: 0; }
.page-public .site-nav { flex: 0 0 auto; flex-wrap: nowrap; }
/* Admin pill + circle at 360px: a smaller lockup keeps "Edmonton Oilers" on one line.
   Below 360px the title may wrap rather than overlap the actions. */
@media (max-width: 399.98px) {
    .page-public .site-brand { gap: 0.5rem; }
    .page-public .brand-logo { height: 32px; }
    .page-public .brand-title { font-size: 0.8125rem; }
}

/* Monogram circle opening a panel (resources/views/components/account-menu.blade.php,
   public/js/account-menu.js). The panel restores the surface tokens like .card. */
.account-menu { position: relative; }
.account-menu > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid var(--oilers-orange);
    border-radius: 50%;
    background: var(--oilers-navy);
    color: #FFFFFF;
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    list-style: none;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 2px; }
.account-panel {
    --text: var(--ink);
    --muted: var(--ink-muted);
    --link: var(--ink-link);
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 100;
    min-width: 220px;
    max-width: calc(100vw - 2 * var(--gutter));
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--text);
    text-align: left;
    animation: account-panel-in 140ms ease-out;
}
@keyframes account-panel-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}
.account-name { margin: 0; padding: 0 0.5rem; font-weight: 700; overflow-wrap: anywhere; }
.account-email { margin: 0.125rem 0 0; padding: 0 0.5rem; color: var(--muted); font-size: 0.8125rem; overflow-wrap: anywhere; }
.account-divider { margin: 0.625rem 0 0.375rem; border: 0; border-top: 1px solid var(--border); }
/* Quiet full-width text button; .site-nav button would make it a pill. */
.site-nav .account-logout {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 0.5rem;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--text);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: normal;
    text-align: left;
    text-transform: none;
}
.site-nav .account-logout:hover { background: var(--tint); }

/* 3D push button (Josh Comeau's technique): a blurred shadow, a darker edge and the orange
   front lifted 5px; hover lifts it further, press sinks it. resources/views/components/push-button.blade.php */
.push {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    outline-offset: 4px;
    transition: filter 250ms;
    -webkit-tap-highlight-color: transparent;
}
.push-shadow,
.push-edge {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: 14px;
}
.push-shadow {
    background: rgba(0, 0, 0, 0.28);
    filter: blur(3px);
    transform: translateY(2px);
    transition: transform 600ms cubic-bezier(0.3, 0.7, 0.4, 1);
}
.push-edge { background: linear-gradient(to left, #8A2600 0%, #C43A00 8%, #C43A00 92%, #8A2600 100%); }
.push-front {
    display: block;
    position: relative;
    padding: 14px 24px;
    border-radius: 14px;
    background: var(--oilers-orange);
    color: var(--oilers-navy);
    font: inherit;
    font-weight: 800;
    font-size: 1.0625rem;
    letter-spacing: 0.02em;
    transform: translateY(-5px);
    transition: transform 600ms cubic-bezier(0.3, 0.7, 0.4, 1);
}
/* :not([disabled]) on hover and press alike, so press (same specificity, later) wins over hover. */
.push:hover:not([disabled]) { filter: brightness(1.08); }
.push:hover:not([disabled]) .push-front { transform: translateY(-7px); transition: transform 250ms cubic-bezier(0.3, 0.7, 0.4, 1.5); }
.push:hover:not([disabled]) .push-shadow { transform: translateY(4px); transition: transform 250ms cubic-bezier(0.3, 0.7, 0.4, 1.5); }
.push:active:not([disabled]) .push-front { transform: translateY(-1px); transition: transform 34ms; }
.push:active:not([disabled]) .push-shadow { transform: translateY(1px); transition: transform 34ms; }
.push:focus:not(:focus-visible) { outline: none; }
.push[disabled] { cursor: not-allowed; opacity: 0.7; }

@media (prefers-reduced-motion: reduce) {
    .account-panel { animation: none; }
    .push * { transition: none; }
}

/* Public footer: legal links, licence line and copyright on the dark gradient. body is already a
   flex column and .site-main grows, so margin-top: auto keeps it at the bottom of short pages. */
.page-public .site-footer {
    margin-top: auto;
    padding: 2rem 1rem 2.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8125rem;
    text-align: center;
}
.page-public .site-footer p { margin: 0.75rem 0 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.25rem; }
.footer-links a { display: inline-block; padding: 0.25rem 0; color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* Confirm page: "Not you? Log out" under "Entering as …" (a text button, 24px+ tap target) */
.not-you { margin: 0; font-size: 0.9375rem; }
.btn-link {
    display: inline-block;
    min-height: 24px;
    padding: 0.125rem 0.25rem;
    border: 0;
    background: none;
    color: var(--link);
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    cursor: pointer;
}
.btn-link:hover { text-decoration-thickness: 2px; }
