/* Mobile-first. Works on a phone with two bars of signal in a field in Virginia. */

:root {
    --vchss-accent: #b3242b;
    --vchss-accent-soft: rgba(179, 36, 43, .1);
}

[data-bs-theme="dark"] {
    --vchss-accent: #ff6b6b;
    --vchss-accent-soft: rgba(255, 107, 107, .14);
}

body {
    font-feature-settings: "tnum" 1; /* Aligned digits: this site is mostly numbers. */
}

.navbar-brand-mark {
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--vchss-accent);
}

/* Stat tiles ------------------------------------------------------------- */

.stat-tile {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.stat-tile .stat-value {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    line-height: 1.1;
}

.stat-tile .stat-label {
    font-size: .8125rem;
    color: var(--bs-secondary-color);
}

/* Battle cards ----------------------------------------------------------- */

.battle-margin {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.battle-tied {
    color: var(--vchss-accent);
}

/* Position chips. Colour is never the only signal — the number carries it. */

.pos-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.9rem;
    padding: .1rem .35rem;
    border-radius: .35rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    background: var(--bs-secondary-bg);
}

.pos-chip-1 { background: #f2c14e; color: #241a00; }
.pos-chip-2 { background: #c9ccd1; color: #1c1e21; }
.pos-chip-3 { background: #cd8032; color: #200f00; }

/* Results tables --------------------------------------------------------- */

.table-results th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bs-body-bg);
}

.table-results td,
.table-results th {
    white-space: nowrap;
}

.table-results .col-name {
    white-space: normal;
    min-width: 10rem;
}

.numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* A non-scoring entry keeps its finishing position but earns nothing. Marked, not hidden. */
.row-nonscoring {
    opacity: .72;
}

@media print {
    .no-print { display: none !important; }
}

/* Loading overlay ------------------------------------------------------- */

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--bs-body-bg) 72%, transparent);
    backdrop-filter: blur(2px);
}

.loading-panel {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.5rem;
    border-radius: .5rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .15);
}

.loading-text {
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    .loading-overlay .spinner-border { animation: none; }
}
