#eecc-track-records {
    max-width: 1200px;
    margin: auto;
    font-family: inherit;
    font-size: 14px;
    color: #000;
    background: #e6e6e6;
}

.eecc-filter {
    margin-bottom: 15px;
}

#eecc-class-filter {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

#eecc-table {
    width: 100%;
    border-collapse: collapse;
}

/* Smooth transitions */
#eecc-table tr {
    transition: background 0.2s ease, color 0.2s ease;
}

#eecc-table td a {
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

#eecc-table th {
    background: #828282;
    color: #fff;
    padding: 8px;
    text-align: left;
}

#eecc-table td {
    padding: 8px;
    /* border-bottom: 1px solid #eee; */
}

#eecc-table tbody tr.odd:not(.leader):not(.recentpb) {
    background: #ffffff;
}

#eecc-table tbody tr.even:not(.leader):not(.recentpb) {
    background: #f2f2f2;
}

/* Row hover */
#eecc-table tr:hover {
    background: #c8c8c8;
}

/* Driver links */
#eecc-table td a {
    color: #000;
    text-decoration: none;
}

/* Link colour on row hover 
#eecc-table tr:hover td a {
    color: #fff;
}*/

/* Underline on link hover */
#eecc-table td a:hover {
    text-decoration: underline;
}

/* Leader row */
#eecc-table tr.leader {
    background: #009133;
    color: #fff;
}

/* Recent personal best */
#eecc-table tr.recentpb {
    background: #0066ff;
    color: #fff;
}

/* Ensure links stay visible in highlighted rows */
#eecc-table tr.leader td a,
#eecc-table tr.recentpb td a {
    color: #fff;
}

/* Combined leader + recent */
#eecc-table tr.leader.recentpb {
    background: #005bb5;
    color: #fff;
}

@media (max-width: 768px) {
    #eecc-track-records {
        overflow-x: auto;
    }

    #eecc-table {
        min-width: 700px;
    }
}

@media (max-width: 768px) {
    #eecc-table th,
    #eecc-table td {
        padding: 6px;
        font-size: 13px;
    }
}
    /* Hide Avg + Fastest */
/*
@media (max-width: 768px) {
    #eecc-table th:nth-child(5),
    #eecc-table td:nth-child(5),
    #eecc-table th:nth-child(6),
    #eecc-table td:nth-child(6) {
        display: none;
    }
}
*/

@media (max-width: 768px) {
    #eecc-table td a {
        display: inline-block;
        padding: 4px 0;
    }
}

@media (max-width: 768px) {
    #eecc-class-filter {
        width: 100%;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    #eecc-table th {
        position: sticky;
        top: 0;
        z-index: 2;
    }
}

@media (max-width: 768px) {

    /* Default: show overall, hide class pos */
    #eecc-table th:nth-child(2),
    #eecc-table td:nth-child(2) {
        display: none;
    }

    /* When filtered: swap visibility */
    #eecc-table.filtered th:nth-child(1),
    #eecc-table.filtered td:nth-child(1) {
        display: none;
    }

    #eecc-table.filtered th:nth-child(2),
    #eecc-table.filtered td:nth-child(2) {
        display: table-cell;
    }
}

#eecc-driver-table {
    max-width: 1200px;
    margin: auto;
    font-family: inherit;
    font-size: 14px;
    color: #000;
    background: #e6e6e6;
}

#eecc-driver-table th {
    background: #828282;
    color: #fff;
    padding: 8px;
    text-align: left;
}

#eecc-driver-table td {
    padding: 8px;
}

/* Hover */
#eecc-driver-table tr:hover {
    background: #c8c8c8;
}

/* Links (if you add any later) */
#eecc-driver-table td a {
    color: #000;
    text-decoration: none;
}

#eecc-driver-table tr:hover td a {
    color: #000;
    text-decoration: underline;
}

#eecc-driver-table td a:hover {
    text-decoration: underline;
}

/* Zebra striping */
#eecc-driver-table tbody tr:nth-child(odd) {
    background: #ffffff;
}

#eecc-driver-table tbody tr:nth-child(even) {
    background: #f2f2f2;
}

th[data-sort]::after {
    content: " ↕";
    font-size: 12px;
}

#lapChart,
#lapPieChart {
    width: 100%;
    max-height: 300px;
    height: 300px;
}
.eecc-chart-wrap {
    max-width: 100%;
    height: 300px;
    position: relative;
}

.eecc-charts {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.eecc-chart {
    flex: 1 1 48%;
    height: 300px;
    position: relative;
}

/* Mobile stack */
@media (max-width: 768px) {
    .eecc-chart {
        flex: 1 1 100%;
    }
}

/* ===============================
   DRIVER SUMMARY MOBILE
=============================== */
@media (max-width: 768px) {
    #eecc-day-filter {
        width: 100%;
        font-size: 14px;
    }
}

@media (max-width: 768px) {

    #eecc-driver-table th:nth-child(6),
    #eecc-driver-table td:nth-child(6) {
        display: none; /* Class */
    }

    #eecc-driver-table th:nth-child(7),
    #eecc-driver-table td:nth-child(7) {
        display: none; /* Day */
    }

    /* Slightly tighter padding */
    #eecc-driver-table td,
    #eecc-driver-table th {
        padding: 6px;
        font-size: 13px;
    }

    /* Make table scroll if needed */
    .eecc-driver-summary {
        overflow-x: auto;
    }
}

#eecc-driver-table td:nth-child(2) {
    white-space: nowrap;
}

