/* Demo-mode chrome: the countdown badge and the expiry overlay.
 *
 * This file used to also hide the controls the demo cannot back — the table
 * picker, referee QR, API-key toggles, shoot-out panel, player-stats and
 * tournament modals. Those rules are gone because the markup is gone: the page
 * is now generated by demo/build_demo_html.py, which removes those features
 * outright rather than hiding a public page's code behind display:none.
 *
 * Scoped to html.demo-mode, which demo-shim.js sets before the page's own
 * script runs. */

/* ── Demo badge ────────────────────────────────────────────────────────── */

.demo-badge {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font: 600 14px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
    letter-spacing: 0.02em;
    backdrop-filter: blur(6px);
    pointer-events: none;
    white-space: nowrap;
}

.demo-badge__label {
    text-transform: uppercase;
    font-size: 11px;
    opacity: 0.65;
}

.demo-badge__time {
    font-variant-numeric: tabular-nums;
    min-width: 4ch;
    text-align: right;
}

/* Last 60 seconds. */
.demo-badge--urgent {
    background: rgba(140, 20, 20, 0.85);
    border-color: rgba(255, 120, 120, 0.4);
}

/* ── Expiry overlay ────────────────────────────────────────────────────── */

.demo-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    /* Translucent, so the visitor's own final score stays readable behind it —
       that scoreline is the most persuasive thing on the page. */
    background: rgba(6, 10, 8, 0.82);
    backdrop-filter: blur(3px);
}

.demo-overlay__card {
    max-width: 460px;
    width: 100%;
    padding: 32px 28px;
    border-radius: 16px;
    background: #10231a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    color: #f2f6f4;
    text-align: center;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.demo-overlay__title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 700;
}

.demo-overlay__text {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.55;
    opacity: 0.82;
}

.demo-overlay__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.demo-overlay__btn {
    display: block;
    padding: 13px 20px;
    border: 0;
    border-radius: 10px;
    font: 600 15px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
    text-decoration: none;
    cursor: pointer;
}

.demo-overlay__btn--primary {
    background: #2fae6a;
    color: #06170f;
}

.demo-overlay__btn--secondary {
    background: transparent;
    color: #cfe5da;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

@media (max-width: 480px) {
    .demo-badge { font-size: 12px; padding: 5px 11px; }
    .demo-overlay__card { padding: 26px 20px; }
}
