/* Styling for Il Corridore Leaderboard */
.ilcorridore-leaderboard-container {
    overflow-x: auto !important;
    margin: 20px 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.ilcorridore-leaderboard-table {
    width: 100% !important;
    border-collapse: collapse !important;
    min-width: 800px !important;
    background-color: #fff !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.ilcorridore-leaderboard-table thead {
    background-color: #e53935 !important;
    /* Rosso acceso del corridore */
    color: #ffffff !important;
}

.ilcorridore-leaderboard-table th {
    padding: 12px 15px !important;
    text-align: left !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    font-size: 14px !important;
    letter-spacing: 0.5px !important;
    border-bottom: 2px solid #b71c1c !important;
    white-space: nowrap !important;
    color: #ffffff !important;
}

.ilcorridore-leaderboard-table tr {
    height: auto !important;
}

.ilcorridore-leaderboard-table td {
    padding: 12px 15px !important;
    height: auto !important;
    line-height: 1.5 !important;
    color: #333333 !important;
    font-size: 14px !important;
    border-bottom: 1px solid #eeeeee !important;
    text-align: left !important;
    vertical-align: middle !important;
}

.ilcorridore-leaderboard-table tbody tr.even {
    background-color: #fcfcfc !important;
}

.ilcorridore-leaderboard-table tbody tr.odd {
    background-color: #ffffff !important;
}

.ilcorridore-leaderboard-table tbody tr:hover {
    background-color: #ffeaea !important;
    /* Hover con riflesso rosso leggero */
}

/* Specific Columns Styling */
.ilcorridore-leaderboard-table .col-pos,
.ilcorridore-leaderboard-table .col-pos- {
    font-weight: bold !important;
    color: #e53935 !important;
    text-align: center !important;
}

.ilcorridore-leaderboard-table th.col-pos,
.ilcorridore-leaderboard-table th.col-pos- {
    width: 60px !important;
    text-align: center !important;
}

.ilcorridore-leaderboard-table .col-punti {
    font-weight: bold !important;
    color: #111 !important;
}

.ilcorridore-leaderboard-table .col-cognome-nome {
    font-weight: 600 !important;
}

/* Mobile responsive */
@media screen and (max-width: 900px) {
    .ilcorridore-leaderboard-table {
        min-width: 100% !important;
    }

    .ilcorridore-leaderboard-table thead {
        display: none !important;
    }

    .ilcorridore-leaderboard-table tr {
        display: block !important;
        margin-bottom: 6px !important;
        border: 1px solid #eee !important;
        border-radius: 6px !important;
    }

    .ilcorridore-leaderboard-table td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: right !important;
        padding: 6px 12px !important;
        border-bottom: 1px solid #f5f5f5 !important;
    }

    .ilcorridore-leaderboard-table td::before {
        content: attr(data-label) !important;
        font-weight: bold !important;
        text-transform: uppercase !important;
        font-size: 12px !important;
        color: #777 !important;
        margin-right: 15px !important;
        text-align: left !important;
    }

    .ilcorridore-leaderboard-table td:last-child {
        border-bottom: 0 !important;
    }
}

/* Interactive row */
.ilcorridore-leaderboard-table .ilcorridore-standard-row {
    cursor: pointer !important;
    transition: background-color 0.2s ease, transform 0.1s !important;
}

.ilcorridore-leaderboard-table .ilcorridore-standard-row:hover {
    background-color: #fce4e4 !important;
    transform: scale(1.01) !important;
}

/* Positioning & Highlights */
.ilcorridore-leaderboard-table tr.ilcorridore-top-10 td {
    font-weight: 600 !important;
    background-color: #f1fdf1 !important;
    background-image: none !important;
    height: auto !important;
    line-height: 1.5 !important;
}

.ilcorridore-leaderboard-table tr.ilcorridore-top-10 .position-badge {
    color: #2e7d32 !important;
    font-weight: 700 !important;
}

/* Search Icon removed */

/* Modal Overlay */
.ilcorridore-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    z-index: 99999 !important;
    display: flex;
    /* DO NOT ADD !important HERE */
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(3px) !important;
}

.ilcorridore-modal-box {
    background: #fff !important;
    border-radius: 12px !important;
    width: 90% !important;
    max-width: 500px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
    overflow: hidden !important;
    animation: ilcorridoreModalShow 0.3s ease-out !important;
}

@keyframes ilcorridoreModalShow {
    from {
        opacity: 0 !important;
        transform: translateY(-20px) !important;
    }

    to {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

.ilcorridore-modal-header {
    background: #e53935 !important;
    color: #fff !important;
    padding: 15px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.ilcorridore-modal-header h3 {
    margin: 0 !important;
    font-size: 18px !important;
    color: #fff !important;
}

.ilcorridore-modal-close {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    font-size: 28px !important;
    cursor: pointer !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.ilcorridore-modal-close:hover {
    color: #ffcdd2 !important;
}

.ilcorridore-modal-body {
    padding: 20px !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
}

.ilcorridore-modal-body p {
    margin-top: 0 !important;
    color: #444 !important;
}

.ilcorridore-race-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.ilcorridore-race-list li {
    display: flex !important;
    justify-content: space-between !important;
    padding: 10px !important;
    border-bottom: 1px solid #eee !important;
    font-size: 14px !important;
}

.ilcorridore-race-list li:last-child {
    border-bottom: none !important;
}

.ilcorridore-race-list .race-name {
    color: #333 !important;
}

.ilcorridore-race-list .race-points {
    color: #e53935 !important;
}

/* Force Search Placeholder Color */
#ilcorridore-search-input::placeholder {
    color: #888888 !important;
    opacity: 1 !important;
}

#ilcorridore-search-input::-webkit-input-placeholder {
    color: #888888 !important;
    opacity: 1 !important;
}

#ilcorridore-search-input::-moz-placeholder {
    color: #888888 !important;
    opacity: 1 !important;
}

#ilcorridore-search-input:-ms-input-placeholder {
    color: #888888 !important;
    opacity: 1 !important;
}