/* ── League landing page (/:leagueid/) ───────────────────────────────────────
   Components unique to the landing page: the quick-link cards, the two-column
   summary, the standings blocks and the season calendar rows.

   The hero, breadcrumb, auth block, toolbar and footer this page shares with
   every other league page live in /league_shell.css, which must be loaded
   first.

   Used by: html/league_home.html
   Served at: /league_home.css
   ───────────────────────────────────────────────────────────────────────── */


/* ── Quick-link cards ────────────────────────────────────────────────────── */

.lh-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 40px 0 56px;
}

@media (max-width: 900px) {
    .lh-cards { grid-template-columns: 1fr; }
}

.lh-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.lh-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 40px rgba(var(--primary-rgb, 46, 204, 113), 0.2);
}

.lh-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(var(--primary-rgb, 46, 204, 113), 0.12);
    border: 1px solid rgba(var(--primary-rgb, 46, 204, 113), 0.3);
    color: var(--primary-color);
}

/* Second and third cards take the theme's other two accents, mirroring the
   three-colour rhythm of the design */
.lh-card--neon .lh-card-icon {
    background: rgba(var(--neon-rgb, 0, 255, 136), 0.12);
    border-color: rgba(var(--neon-rgb, 0, 255, 136), 0.3);
    color: var(--neon-color);
}

.lh-card--deep .lh-card-icon {
    background: rgba(var(--primary-rgb, 46, 204, 113), 0.18);
    border-color: rgba(var(--primary-rgb, 46, 204, 113), 0.4);
    color: var(--primary-dark);
}

.lh-card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text-primary);
}

.lh-card-desc {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

/* Accent arrow beside the card title; slides right on hover. inline-block so
   the transform applies — transforms are ignored on inline elements. */
.lh-card-arrow {
    display: inline-block;
    color: var(--primary-color);
    transition: transform 0.2s ease;
}

.lh-card--neon .lh-card-arrow { color: var(--neon-color); }
.lh-card--deep .lh-card-arrow { color: var(--primary-dark); }

.lh-card:hover .lh-card-arrow { transform: translateX(5px); }

/* A signed-in driver already registered for this league gets this instead of
   a live link back into the register form — see applyRegisteredCardState() */
.lh-card--disabled {
    cursor: default;
    opacity: 0.6;
}

.lh-card--disabled:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}


/* ── Two-column summary ──────────────────────────────────────────────────── */

.lh-columns {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 32px;
    align-items: start;
}

@media (max-width: 800px) {
    .lh-columns { grid-template-columns: 1fr; }
}

.lh-column-heading {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px;
}

.lh-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
}

.lh-panel.lh-panel--padded { padding: 18px; }

/* Centred icon + message, used when there are no standings or no rounds yet */
.lh-panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 48px 32px;
}

.lh-panel-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #6a6a72;
}

/* Icons are authored at their in-context size (16px in a round row, 24px here) */
.lh-panel-empty-icon svg {
    width: 24px;
    height: 24px;
}

.lh-panel-empty p {
    margin: 0;
    max-width: 280px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Loading / failure text inside a panel */
.lh-panel-msg {
    margin: 0;
    padding: 24px;
    font-family: 'Rajdhani', sans-serif;
    color: var(--text-secondary);
}

.lh-panel-msg--error { color: #ff6b6b; }


/* ── Standings blocks ────────────────────────────────────────────────────────
   Prefixed lh-: css/admin.css defines its own .standings-class-block /
   .standings-mini-table family for the Admin and Stewarding Home dashboards,
   and admin.css is loaded on this page for the toolbar above.
   ───────────────────────────────────────────────────────────────────────── */

.lh-standings-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lh-standings-block {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 16px 18px;
}

.lh-standings-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.lh-standings-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
}

.lh-standings-table td {
    padding: 6px 0;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lh-standings-table tr:last-child td { border-bottom: none; }

.lh-standings-table td.lh-standings-pos {
    width: 28px;
    color: var(--text-secondary);
}

.lh-standings-table td.lh-standings-points {
    text-align: right;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}


/* ── Upcoming rounds ─────────────────────────────────────────────────────── */

.lh-round-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lh-round-row:last-child { border-bottom: none; }

.lh-round-row:nth-child(even) { background: rgba(255, 255, 255, 0.015); }

.lh-round-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(var(--primary-rgb, 46, 204, 113), 0.1);
    color: var(--primary-color);
}

/* Generated track icons declare their own width/height (24x24); pin the
   rendered size so they line up with the plain calendar glyph (16x16). */
.lh-round-icon svg {
    width: 20px;
    height: 20px;
}

.lh-round-name {
    flex: 1;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.lh-round-date {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Rounds already run: kept in the calendar for the full season picture, but
   dimmed and stripped of the accent colour so they read as done. */
.lh-round-row--past .lh-round-icon {
    background: rgba(255, 255, 255, 0.04);
    color: #5f5f66;
}

.lh-round-row--past .lh-round-name { color: #7f7f86; }

.lh-round-row--past .lh-round-date { color: #63636a; }


