/* chess-stats.css — styles for the chess module's Stats.razor component used on
   /achievements (per doc 24) and /profile/{username} (per doc 25). Mirrors
   bowling-stats.css / cubing-stats.css one-for-one with the .chess-* prefix swap so the
   three disciplines read with a single visual rhythm across the platform.

   Layout per event:
     - .chess-stats-event       per-event sub-card (border + drop shadow on dark inset bg).
     - .chess-stats-event-head  title row with the optional Provisional badge floated right.
     - .chess-stats-stats       primary horizontal auto-fit grid — six headline tiles
                                (Rating / Peak / Matches / Wins / Win rate / Streak).
     - .chess-stats-color       secondary horizontal auto-fit grid — color performance
                                tiles (As White / As Black), only rendered when there is
                                resolved color data so empty cards stay short.

   Mobile reshape: at ≤600px the primary tile row collapses to a 2-column grid (so six
   tiles lay out 2+2+2); the color row stays 2-column at every breakpoint. */

.chess-stats-empty {
    color: var(--mud-palette-text-secondary);
    text-align: center;
    padding: 1rem 0;
    margin: 0;
}

.chess-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chess-stats-event {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background-color: var(--hax-surface-page);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.chess-stats-event-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.chess-stats-event-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0;
}

/* Provisional rating flag. Lime fill at 18% opacity for a quiet "still calibrating" read —
   loud enough to register, quiet enough not to compete with the headline stats. */
.chess-stats-provisional {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background-color: rgba(163, 230, 53, 0.18);
    color: var(--hax-accent-lime, #A3E635);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.chess-stats-stats,
.chess-stats-color {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    align-items: start;
}

.chess-stats-stats > div,
.chess-stats-color > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
}

.chess-stats-stats dt,
.chess-stats-color dt {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
    margin: 0;
}

.chess-stats-stats dd,
.chess-stats-color dd {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin: 0;
    font-variant-numeric: tabular-nums;
}

/* Color row's "W–L · pct%" string is narrower than a single integer score, so let it
   read smaller than the headline tiles — keeps the visual hierarchy headline → detail. */
.chess-stats-color dd {
    font-size: 1.15rem;
}

@media (max-width: 600px) {
    .chess-stats-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .chess-stats-color {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .chess-stats-stats dd {
        font-size: 1.25rem;
    }
}
