/**
 * RaceForge: Public League Results Page Styles (Standalone, Complete Version)
 */

/* =================================================================== */
/* ==   1. Main Structure (from iRacing Leaderboard)                == */
/* =================================================================== */

.telemetry-wrapper {
    width: 100%;
    max-width: 910px;
    margin: 2.5rem auto 0; /* 2.5rem on top, center horizontal, 0 on bottom */
}
.telemetry-fade-in {
    animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.timing-deck {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 20px;
    min-height: 400px;
}

.deck-header {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}
.deck-title {
    color: var(--text-primary);
    font-size: 1.4rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    margin: 0;
}
.deck-metadata {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--accent-blue);
    letter-spacing: 2px;
}
.deck-header .deck-title .sim-tag {
    font-size: 0.9rem;
    letter-spacing: 1px;
    padding: 5px 10px;
    border-radius: 4px;
    background-color: rgba(0, 170, 255, 0.1);
}

/* =================================================================== */
/* ==   2. Session Tab Styles                                       == */
/* =================================================================== */

.layout-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}
.selector-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
}
.layout-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.layout-btn {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%, 0 calc(100% - 8px));
    transition: all 0.2s;
}
.layout-btn:hover {
    color: #fff;
    background: rgba(0, 170, 255, 0.05);
}
.layout-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #000;
    font-weight: bold;
}
.session-content {
    display: none;
}
.session-content.active {
    display: block;
}


/* =================================================================== */
/* ==   3. Timing Grid Layout                                       == */
/* =================================================================== */

.timing-grid {
    width: 100%;
}
.grid-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 40px;
    padding: 5px 10px;
    font-size: 0.85rem;
}
.grid-row:hover:not(.grid-head) {
    background: rgba(0, 170, 255, 0.04);
}
.grid-head {
    color: var(--accent-blue);
    font-weight: bold;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.02);
}
.grid-empty {
    text-align: center;
    font-family: var(--font-mono);
    padding: 4rem 1rem;
    color: var(--text-secondary);
}

/* --- Column Definitions --- */
.g-pos { flex: 0 0 40px; font-family: var(--font-mono); }
.g-driver { flex: 3; color: var(--text-primary); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-car { flex: 2.5; font-size: 0.8rem; opacity: 0.7; padding: 0 10px; }
.g-time { flex: 1.2; text-align: right; font-family: var(--font-mono); font-weight: bold; color: var(--accent-blue); }
.g-int { flex: 0.8; text-align: center; opacity: 0.8; } /* For Laps */
.g-incidents { flex: 0.8; text-align: center; font-weight: bold; font-family: var(--font-mono); } /* For Incidents */
