/* ===============================
   RESULTS PAGE
================================= */

.results-controls {
    margin-bottom: 15px;
}

#session-selector {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* reuse standings styles */

.fl-badge {
    background: #8B3DFF; 
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    margin-left: 6px;
    border-radius: 3px;
    font-weight: 600;
}

/* ===============================
   PREMIUM DROPDOWN
================================= */

.results-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.dropdown-wrapper {
    position: relative;
    width: 100%;
}

.premium-dropdown {
    width: 100%;
    padding: 10px 40px 10px 14px;

    border: 1px solid #2a2a2a;   /* darker border */
    border-radius: 25px;

    background: #1c1c1c;         /* 🔥 dark background */
    color: #ffffff;              /* 🔥 white text */

    font-size: 14px;
    font-weight: 600;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    cursor: pointer;
    transition: all 0.2s ease;
}

/* Hover */
.premium-dropdown:hover {
    border-color: #339967;
}

/* Focus */
.premium-dropdown:focus {
    outline: none;
    border-color: #339967;
    box-shadow: 0 0 0 2px rgba(51,153,103,0.15);
}

/* Dropdown arrow */
.dropdown-icon {
    color: #aaa;  /* lighter for dark bg */
}

.premium-dropdown option {
    color: #000; /* keep readable in system dropdown */
}

/* Optional: animate rotate on open (limited support) */
.premium-dropdown:focus + .dropdown-icon {
    transform: translateY(-50%) rotate(180deg);
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed; /* 🔥 IMPORTANT */
}

.standings-table th:nth-child(1),
.standings-table td:nth-child(1) {
    width: 6%;
}

.standings-table th:nth-child(2),
.standings-table td:nth-child(2) {
    width: 16%;
}

.standings-table th:nth-child(3),
.standings-table td:nth-child(3) {
    width: 18%;
}

.standings-table th:nth-child(4),
.standings-table td:nth-child(4) {
    width: 22%;
}

.standings-table th:nth-child(5),
.standings-table td:nth-child(5) {
    width: 26%;
}

.standings-table th:nth-child(6),
.standings-table td:nth-child(6) {
    width: 14%;
}

.standings-table td.pos {
    font-weight: 700;
    color: #339967; /* ✅ your green */
    font-size: 15px;
}

.driver-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.standings-table th,
.standings-table td {
    padding: 12px 10px;
}

/* Qualifying specific */
.qualifying-table th:nth-child(4),
.qualifying-table td:nth-child(4),
.qualifying-table th:nth-child(5),
.qualifying-table td:nth-child(5),
.qualifying-table th:nth-child(6),
.qualifying-table td:nth-child(6) {
    width: 14%;
}

.team-logo {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    object-fit: contain;
}

.team-logo-wrapper {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #2a2a2a;
    overflow: hidden;
    flex-shrink: 0; /* 🔥 ADD THIS */
}

/* ===============================
   PRACTICE TABLE (ISOLATED)
================================= */

.practice-table th:nth-child(1),
.practice-table td:nth-child(1) {
    width: 6%;
}

.practice-table th:nth-child(2),
.practice-table td:nth-child(2) {
    width: 24%;
}

.practice-table th:nth-child(3),
.practice-table td:nth-child(3) {
    width: 26%;
}

.practice-table th:nth-child(4),
.practice-table td:nth-child(4) {
    width: 20%;
}

.practice-table th:nth-child(5),
.practice-table td:nth-child(5) {
    width: 14%;
}

/* ===============================
   RACE TABLE (ISOLATED)
================================= */

/* POS */
.race-table th:nth-child(1),
.race-table td:nth-child(1) {
    width: 6%;
}

/* DRIVER (tight) */
.race-table th:nth-child(2),
.race-table td:nth-child(2) {
    width: 23%;
}

/* TEAM */
.race-table th:nth-child(3),
.race-table td:nth-child(3) {
    width: 26%;
}

/* LAPS */
.race-table th:nth-child(4),
.race-table td:nth-child(4) {
    width: 12%;
}

/* TIME / STATUS (important → bigger) */
.race-table th:nth-child(5),
.race-table td:nth-child(5) {
    width: 15%;
}

/* POINTS */
.race-table th:nth-child(6),
.race-table td:nth-child(6) {
    width: 8%;
}

/* ===============================
   QUALIFYING TABLE (ISOLATED)
================================= */

/* POS */
.qualifying-table th:nth-child(1),
.qualifying-table td:nth-child(1) {
    width: 6%;
}

/* DRIVER */
.qualifying-table th:nth-child(2),
.qualifying-table td:nth-child(2) {
    width: 16%;
}

/* TEAM */
.qualifying-table th:nth-child(3),
.qualifying-table td:nth-child(3) {
    width: 16%;
}

/* Q1 */
.qualifying-table th:nth-child(4),
.qualifying-table td:nth-child(4) {
    width: 15%;
}

/* Q2 */
.qualifying-table th:nth-child(5),
.qualifying-table td:nth-child(5) {
    width: 15%;
}

/* Q3 */
.qualifying-table th:nth-child(6),
.qualifying-table td:nth-child(6) {
    width: 15%;
}

/* LAPS */
.qualifying-table th:nth-child(7),
.qualifying-table td:nth-child(7) {
    width: 7%;
}

/* ===============================
   RESULTS PAGE ONLY FIXES
================================= */

/* Give more space to team column (ONLY results page) */
.results-table td.team-cell {
    min-width: 140px;
}

/* Prevent logo from shrinking */
.results-table .team-logo-wrapper {
    flex-shrink: 0;
}

/* Force larger logo ONLY on results page */
.results-table .team-logo-wrapper.large-logo {
    width: 34px;
    height: 34px;
}


/* ONLY enlarge problematic logos */
.results-table .team-logo-wrapper.team-mercedes.large-logo .team-logo,
.results-table .team-logo-wrapper.team-haas.large-logo .team-logo,
.results-table .team-logo-wrapper.team-astonmartin.large-logo .team-logo,
.results-table .team-logo-wrapper.team-racingbulls.large-logo .team-logo {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    transform: scale(1.5); /* 🔥 adjust this */
}

.results-table .team-logo-wrapper.team-ferrari.large-logo .team-logo,
.results-table .team-logo-wrapper.team-alpine.large-logo .team-logo,
.results-table .team-logo-wrapper.team-audi.large-logo .team-logo,
.results-table .team-logo-wrapper.team-cadillac.large-logo .team-logo,
.results-table .team-logo-wrapper.team-redbullracing.large-logo .team-logo,
.results-table .team-logo-wrapper.team-mclaren.large-logo .team-logo,
.results-table .team-logo-wrapper.team-williams.large-logo .team-logo {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    transform: scale(1.05); /* 🔥 adjust this */
}

.team-logo-wrapper.large-logo img {
    overflow: visible;
}

.team-link {
    white-space: nowrap;   /* 🔥 KEY FIX */
}

.team-name {
    white-space: nowrap;
    flex-shrink: 0;   /* 🔥 prevents squeezing */
}

.driver-name {
    font-weight: 600;
    font-size: 13px;
    color: #000000;
}

/* ONLY enlarge problematic logos */
.qualifying-table .team-logo-wrapper.team-mercedes.large-logo .team-logo,
.qualifying-table .team-logo-wrapper.team-haas.large-logo .team-logo,
.qualifying-table .team-logo-wrapper.team-astonmartin.large-logo .team-logo,
.qualifying-table .team-logo-wrapper.team-racingbulls.large-logo .team-logo {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    transform: scale(1.5); /* 🔥 adjust this */
}

.qualifying-table .team-logo-wrapper.team-ferrari.large-logo .team-logo,
.qualifying-table .team-logo-wrapper.team-alpine.large-logo .team-logo,
.qualifying-table .team-logo-wrapper.team-audi.large-logo .team-logo,
.qualifying-table .team-logo-wrapper.team-cadillac.large-logo .team-logo,
.qualifying-table .team-logo-wrapper.team-redbullracing.large-logo .team-logo,
.qualifying-table .team-logo-wrapper.team-mclaren.large-logo .team-logo,
.qualifying-table .team-logo-wrapper.team-williams.large-logo .team-logo {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    transform: scale(1.05); /* 🔥 adjust this */
}

/* ONLY enlarge problematic logos */
.practice-table .team-logo-wrapper.team-mercedes.large-logo .team-logo,
.practice-table .team-logo-wrapper.team-haas.large-logo .team-logo,
.practice-table .team-logo-wrapper.team-astonmartin.large-logo .team-logo,
.practice-table .team-logo-wrapper.team-racingbulls.large-logo .team-logo {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    transform: scale(1.5); /* 🔥 adjust this */
}

.practice-table .team-logo-wrapper.team-ferrari.large-logo .team-logo,
.practice-table .team-logo-wrapper.team-alpine.large-logo .team-logo,
.practice-table .team-logo-wrapper.team-audi.large-logo .team-logo,
.practice-table .team-logo-wrapper.team-cadillac.large-logo .team-logo,
.practice-table .team-logo-wrapper.team-redbullracing.large-logo .team-logo,
.practice-table .team-logo-wrapper.team-mclaren.large-logo .team-logo,
.practice-table .team-logo-wrapper.team-williams.large-logo .team-logo {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    transform: scale(1.05); /* 🔥 adjust this */
}
