.race-table {  
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    width: 100%; 
    border-collapse: collapse; 
}
#race-table .driver-col {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
.race-table a {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}
.race-row {
    display: grid;
    grid-template-columns:
        60px                  /* Pos */
        60px                  /* # */
        minmax(260px, 1.5fr)  /* Driver */
        1fr                   /* Entrant */
        1fr                   /* Chassis */
        80px                  /* Laps */
        130px                 /* Time */
        40px;                 /* Penalty */
    align-items: center;
}
.has-classes .race-row {
    grid-template-columns:
        60px                  /* Pos */
        90px                  /* Class */
        60px                  /* # */
        minmax(260px, 1.5fr)  /* Driver */
        1fr                   /* Entrant */
        1fr                   /* Chassis */
        80px                  /* Laps */
        130px                 /* Time */
        40px;                 /* Penalty */
}
.race-row.header {
    font-weight: 600;
    background: #f5f5f5;
    border-bottom: 2px solid #ddd;
}
.race-row1 {
    display: grid;
    grid-template-columns:
        60px                  /* Pos */
        minmax(260px, 1.5fr)  /* Driver */
        1fr                   /* Entrant */
        1fr                   /* Chassis */
        120px;                /* Time */
    align-items: center;
}
.race-row1.header {
    font-weight: 600;
    background: #f5f5f5;
    border-bottom: 2px solid #ddd;
}
.race-row1 .driver-col {
    min-width: 260px;
    white-space: normal;
}
.race-row1 .cell {
    padding: 6px 8px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.driver-col {
    min-width: 260px;
    white-space: normal;
}
.header { 
    font-weight: bold; 
    background: #f0f0f0; 
}
.cell {
    padding: 6px 8px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cell.center { text-align: center; }

.cell.no-col { 
    flex: 0 0 50px !important; 
    max-width: 50px; 
    min-width: 50px; 
}
.cell.pos-col { 
    flex: 0 0 85px !important; 
    max-width: 85px; 
    min-width: 85px; 
}
.cell.class-col { display: none; }                        
.cell.laps-col { flex: 0 0 40px; text-align: center; }
.cell.time-col { flex: 1 1 160px; text-align: center; }
.cell.penalty-col { 
    flex: 0 0 45px; 
    max-width: 45px;
    min-width: 45px;
    text-align: left; 
}
.race-table .row .hidden-xs.time-col {
    
    flex: 1 1 140px; 
    text-align: center;
}
.race-table .row .hidden-xs {
    flex: 3 1 220px; 
}

.race-table .row .cell.driver-col {
    flex: 4 1 330px; 
    display: flex;
    flex-wrap: nowrap; 
    align-items: center;
    white-space: nowrap;
    overflow-x: visible;
    padding-left: 14px;   
}
.race-table .row .cell.driver-col span {
    margin-right: 10px;
    white-space: nowrap;
}

.race-table.has-classes .cell.pos-col { 
    flex: 0 0 65px; 
    max-width: 65px;
    min-width: 65px;
    text-align: center;
}

.race-table.has-classes .cell.no-col { 
    flex: 0 0 50px; 
    max-width: 50px;
    min-width: 50px;
    text-align: center;
}

.race-table.has-classes .cell.class-col { 
    flex: 0 0 110px;
    max-width: 110px;
    min-width: 110px;
    text-align: center;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.race-table.has-classes .cell.laps-col { 
    flex: 0 0 35px; 
    text-align: center;
}

.race-table.has-classes .cell.time-col { 
    flex: 1 1 150px; 
    text-align: center;
}

.race-table.has-classes .cell.penalty-col { 
    flex: 0 0 45px;
    max-width: 45px;
min-width: 45px;
}

.race-table.has-classes .row .hidden-xs {
    flex: 2 1 220px; 
}
.race-table.has-classes .row .hidden-xs.time-col {
    flex: 1 1 150px; 
    text-align: center;
}
.race-table.has-classes .row .cell.driver-col {
    flex: 6 1 500px;  
    display: flex;
    flex-wrap: nowrap;  
    align-items: center;
    white-space: nowrap;
}

.race-table.has-classes .row .cell.driver-col span {
    margin-right: 10px;
    white-space: nowrap;
}

.race-table.has-classes .row .pos-col,
.race-table.has-classes .row .class-col {
    position: sticky;
    z-index: 2;
    background-color: #f8f8f8;
}

.race-table.has-classes .row .pos-col {
    left: 0;
}

.race-table.has-classes .row .class-col {
    left: 30px; 
}

.race-table.has-classes .header .class-col {
    background-color: #f0f0f0; 
}

.race-table.has-classes .row {
    min-width: max-content;
}

.race-table .row .pos-col {
    position: sticky;
    left: 0;
    z-index: 2; 
    background-color: #f8f8f8; 
}
.race-table .header .pos-col {
    background-color: #f0f0f0; 
}

.table-responsive {
    
    width: 100%; 
}
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}
.pull-left { float: left; }
.pull-right { float: right; }
.hidden-xs { display: none; }

.text-danger { color: red; }
.highlight { background-color: #D7D7D7; color: #FFF; font-weight: bold; font-size:12px; }
.btn-xs { padding: 2px 4px; font-size: 11px; border-radius: 3px; margin-right:2px; }
.btn-danger { background:red;color:#fff; }
.btn-success { background:green;color:#fff; }
.btn-primary { background:blue;color:#fff; }
.btn-grey { background:grey;color:#fff; }
.tip { cursor: help; }

@media (min-width: 768px) {
    .hidden-xs { display: flex; } 
}


.text-danger { color: red; }
.highlight { background-color: #D7D7D7; color: #FFF; font-weight: bold; font-size:12px; }
.btn-xs { padding: 2px 4px; font-size: 11px; border-radius: 3px; margin-right:2px; }
.btn-danger { background:red;color:#fff; }
.btn-success { background:green;color:#fff; }
.btn-primary { background:blue;color:#fff; }
.btn-grey { background:grey;color:#fff; }
.tip { cursor: help; }

@media (max-width: 768px) {
    .chart-container {
        height: 600px; 
    }

    canvas {
        width: 100% !important;
        height: 100% !important;
    }
}
.form-group {
        display: flex;
        flex-direction: column;
        gap: 20px;
        align-items: center;
        text-align: center;
    }

    .form-item {
        width: 100%;
        max-width: 300px;
    }

    
    .form-button {
        text-align: center;
    }

   
    @media (min-width: 768px) {
        .form-group {
            flex-direction: row;
            flex-wrap: wrap;
            justify-content: center;
            gap: 20px;
        }

        .form-item {
            flex: 1 1 auto; 
            max-width: 300px; 
        }

        .form-button {
            flex: 1 1 100%; 
            margin-top: 20px;
        }
    }
    .navegacion-carreras {
    display: flex;
    justify-content: space-between;
    width: 100%; 
    margin-bottom: 20px; 
    align-items: center; 
    padding: 0 15px;
}

.btn-navegacion {

    padding: 8px 12px; 
    background-color: #007bff; 
    color: white;
    text-decoration: none; 
    border-radius: 5px; 
    border: 1px solid #007bff;
    transition: background-color 0.3s, border-color 0.3s;

    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.btn-navegacion:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: white;
}

.btn-navegacion i.fa {
    margin: 0 5px;
}
@media (max-width: 576px) {
    .navegacion-carreras {
        flex-direction: column; 
        align-items: center; 
        padding: 0;
    }
    
    .btn-navegacion {
        width: 90%; 
        margin: 5px 0; 
        justify-content: center;
    }
}
@media (max-width: 767px) {

    .table-responsive {
        overflow-x: hidden; 
    }

    .race-table .row {
        padding: 2px 0;
    }

    .race-table .hidden-xs {
        display: none !important;
    }

    .race-table .pos-col,
    .race-table .class-col {
        position: static !important;
    }

    .race-table .cell.pos-col {
        flex: 0 0 42px !important;
        max-width: 42px;
        min-width: 42px;
        font-size: 12px;
        text-align: center;
    }

    .race-table .cell.no-col {
        flex: 0 0 38px !important;
        max-width: 38px;
        min-width: 38px;
        font-size: 12px;
        text-align: center;
    }

    .race-table .cell.driver-col {
        flex: 1 1 auto !important;
    min-width: 0;
    padding-left: 10px;
    font-size: 13px;

    white-space: normal; 
    overflow: visible;       
    text-overflow: unset; 
    }

    .race-table .cell.driver-col span {
        margin-right: 6px;
    }

    .race-table .cell.time-col,
    .race-table .hidden-xs.time-col {
        flex: 0 0 80px;
        max-width: 80px;
        min-width: 80px;
        font-size: 12px;
        text-align: center;
    }

    .race-table .cell.laps-col {
        flex: 0 0 36px;
        font-size: 12px;
    }

    .race-table .cell.penalty-col {
        flex: 0 0 26px;
        max-width: 26px;
        min-width: 26px;
        font-size: 12px;
    }
}
@media (max-width: 991px) {
    .race-table.has-classes .row {
        min-width: max-content;
    }
}