/* Theme tokens. Keep in step with Components/Layout/DriveInTheme.cs (MudBlazor) and with marketing.css. The light or
   dark values apply from theme.js, which follows the visitor's OS/browser setting. The static pages (account, Invite,
   Error) can't use MudBlazor's palette variables, so they use these; static.css builds their components from them. */
:root, [data-theme="light"] {
    --di-bg: #eceff6;
    --di-surface: #ffffff;
    --di-ink: #14172b;
    --di-muted: #4b5070;
    --di-line: #d5d9e6;
    --di-line-strong: #a9afc4;
    --di-primary: #c8283b;
    --di-on-primary: #ffffff;
    --di-accent: #0b7a8a;
    --di-accent-hover: #075c69;
    --di-bulb: #ffd66b;
    --di-night: #0a0d1f;
    --di-appbar: #0a0d1f;
    --di-danger: #c62828;
    --di-success: #1f7a4d;
    --di-info: #1565c0;
    --di-warning: #8a5a00;

    --font-body: Barlow, system-ui, -apple-system, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
    --di-bg: #0a0d1f;
    --di-surface: #151a38;
    --di-ink: #efedf6;
    --di-muted: #a8a6bd;
    --di-line: #2a2f52;
    --di-line-strong: #4a5080;
    --di-primary: #ff5468;
    --di-on-primary: #0a0d1f;
    --di-accent: #5ef2ff;
    --di-accent-hover: #a6f7ff;
    --di-appbar: #070918;
    --di-danger: #ff6b6b;
    --di-success: #3fbf7f;
    --di-info: #5ec8ff;
    --di-warning: #ffd66b;
}

html, body {
    font-family: var(--font-body);
    background: var(--di-bg);
    color: var(--di-ink);
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--di-accent);
    outline-offset: 2px;
}

.app-appbar { border-bottom: 1px solid rgba(255, 214, 107, 0.16); }

.app-brand {
    font-family: "Bungee", system-ui, sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    color: var(--di-bulb);
    text-decoration: none;
    white-space: nowrap;
}
.app-brand:hover { color: #fff0bd; }
.app-brand-drawer { color: var(--di-primary); }

.app-links, .app-user { align-items: center; gap: 0.25rem; }
.app-links { margin-left: 1.5rem; }

.app-link {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    border: 0;
    border-radius: 6px;
    background: none;
    color: #d9d6ea;
    font: inherit;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}
.app-link:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.app-link.active { color: #fff; box-shadow: inset 0 -2px 0 var(--di-bulb); border-radius: 6px 6px 0 0; }

.app-signout { margin: 0; }

.app-drawer-links { display: flex; flex-direction: column; padding: 0.5rem; }
.app-drawer-links .app-link { color: var(--mud-palette-drawer-text); padding: 0.75rem 1rem; }
.app-drawer-links .app-link:hover { background: var(--mud-palette-action-default-hover); color: var(--mud-palette-drawer-text); }
.app-drawer-links .app-link.active { color: var(--di-primary); box-shadow: none; font-weight: 700; }

.skip-link {
    position: absolute;
    left: 0.5rem;
    top: -4rem;
    z-index: 2000;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    background: var(--di-bulb);
    color: var(--di-night);
    font-weight: 600;
}
.skip-link:focus { top: 0.5rem; }

main:focus { outline: none; }


.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKS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OTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Blazor's error bar: hidden until the framework shows it. */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ---------- Lot maps (LotMap.razor): a drive-in at night ---------- */

.lot-map {
    display: block;
    width: 100%;
    max-height: 80vh;
    background: #0a0d1f;
    border-radius: 0.5rem;
}

.lot-map text {
    text-anchor: middle;
    dominant-baseline: central;
    font-family: system-ui, sans-serif;
}

.lot-ground { fill: #1d2240; }
.lot-screen { fill: #f8f9fa; }
.lot-screen-name { fill: #ffd66b; font-size: 13px; font-weight: 600; }
.lot-link { text-decoration: underline; cursor: pointer; }
.lot-row-label { fill: #9aa3c7; font-size: 11px; font-weight: 600; }
.lot-spot { fill: #353c66; stroke: #5d6699; stroke-width: 1; }
.lot-spot-label { fill: #e9ecef; font-size: 8.5px; }
.lot-empty { fill: #9aa3c7; font-size: 12px; font-style: italic; }
.lot-building rect { fill: #ffd66b; }
.lot-building text { fill: #0a0d1f; font-size: 13px; font-weight: 600; }

/* Spot states on a showing's seat map (SeatMap.razor). The map is always the night lot, whatever the page's palette, so
   these don't change with light or dark. Labels are at least 4.5:1 against their spot. Held spots are hatched and sold
   ones crossed out, so no state rests on color alone. */
.lot-clickable { cursor: pointer; }
.lot-clickable:hover .lot-spot { stroke: #ffd66b; stroke-width: 2.5; }
/* Keyboard focus (lot-map.js moves it with the arrow keys), on any spot, available or not: a ring no state uses. */
.lot-map [data-spot]:focus { outline: none; }
.lot-map [data-spot]:focus-visible .lot-spot { stroke: #74c0fc; stroke-width: 3.5; }
.spot-available .lot-spot { fill: #1a6b43; stroke: #3fbf7f; }
.spot-held .lot-spot { fill: #6b5a1e; stroke: #b39a3a; }
.spot-held .lot-spot-label { fill: #efe6c0; }
.spot-sold .lot-spot { fill: #2a2d40; stroke: #3b3f57; }
.spot-sold .lot-spot-label { fill: #9aa3c7; }
.spot-mine .lot-spot { fill: #ffd66b; stroke: #fff; stroke-width: 2.5; }
.spot-mine .lot-spot-label { fill: #0a0d1f; font-weight: 700; }
.lot-mark { fill: none; stroke-linecap: round; pointer-events: none; }
.lot-mark-cross { stroke: #6c7293; stroke-width: 1.5; }
.lot-mark-hatch { stroke: #b39a3a; stroke-width: 1.5; opacity: 0.7; }
/* Spots that take large vehicles carry an "L"; with a large vehicle chosen, the others can't be picked. */
.lot-large-mark { fill: #ffd66b; font-size: 8px; font-weight: 700; }
.spot-mine .lot-large-mark { fill: #0a0d1f; }
.spot-sold .lot-large-mark { fill: #9aa3c7; }
.spot-unfit .lot-spot { fill: #262b4a; stroke: #3b4270; stroke-dasharray: 3 2; }
.spot-unfit .lot-spot-label { fill: #9aa3c7; }
.spot-marked .lot-spot { fill: #2f4a7a; stroke: #ffd66b; stroke-width: 1.5; }

/* Checkout card entry (CardFields): the test card form is plain inputs Blazor never reads; Stripe's Element mounts in .stripe-card. */
.test-card label { display: block; font-size: 0.875rem; color: var(--di-muted); margin: 0.5rem 0 0.25rem; }
.test-card input {
    width: 100%; box-sizing: border-box; padding: 0.55rem 0.75rem; font: inherit; color: var(--di-ink);
    background: var(--di-surface); border: 1px solid var(--di-line-strong); border-radius: 4px;
}
.test-card input:focus { outline: 2px solid var(--di-accent); outline-offset: 0; border-color: var(--di-accent); }
.test-card-row { display: flex; gap: 0.75rem; }
.test-card-row > div { flex: 1 1 0; min-width: 0; }
.stripe-card { min-height: 3rem; }

.spot-legend { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.875rem; margin-top: 0; }
.spot-legend li::before {
    content: ""; display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: 3px;
    margin-right: 0.35rem; vertical-align: -0.1rem; border: 1px solid;
}
.spot-legend .spot-available::before { background: #1a6b43; border-color: #3fbf7f; }
.spot-legend .spot-held::before {
    background: repeating-linear-gradient(-45deg, #6b5a1e 0 3px, #b39a3a 3px 4.5px); border-color: #b39a3a;
}
.spot-legend .spot-sold::before {
    content: "\2715"; background: #2a2d40; border-color: #3b3f57; color: #9aa3c7;
    font-size: 0.6rem; text-align: center; line-height: 0.9rem;
}
.spot-list { min-width: 12rem; max-width: 18rem; }
.spot-legend .spot-mine::before { background: #ffd66b; border-color: #0a0d1f; }
.spot-legend .spot-unfit::before { background: #262b4a; border: 1px dashed #3b4270; }
.spot-legend .spot-large::before {
    content: "L"; background: #1d2240; border-color: #1d2240; color: #ffd66b;
    font-size: 0.65rem; font-weight: 700; text-align: center; line-height: 0.9rem;
}

.ticket-qr { width: 240px; max-width: 100%; height: auto; image-rendering: pixelated; }

/* The 4-character gate code on tickets and at the gate. */
.gate-code { font-family: Menlo, Consolas, monospace; font-size: 2rem; font-weight: 700; letter-spacing: 0.3em; }

/* The notification bell's menu (NotificationBell). */
.notification-menu { width: min(22rem, 90vw); }
.notification-unread { font-weight: 600; }
