/* Stili originali per il popup */
.tlm-match-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border: 2px solid #009879;
    border-radius: 5px;
    z-index: 999999 !important; /* Sopra tutto */
    max-width: 700px;
    width: 90%;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.tlm-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.tlm-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.tlm-popup-content {
    max-height: 70vh;
    overflow-y: auto;
}

.tlm-stats-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 15px 0;
}

.tlm-stat-group {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
}

.tlm-detail-btn {
    background: #009879;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.tlm-popup-overlay {
    z-index: 999998 !important;
}

/* Stile tabella della Classifica originale */
#tlm-ranking-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9em;
    font-family: sans-serif;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

#tlm-ranking-table thead tr {
    background-color: #009879;
    color: #ffffff;
    text-align: left;
}

#tlm-ranking-table th,
#tlm-ranking-table td {
    padding: 12px 15px;
    text-align: center;
}

#tlm-ranking-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

#tlm-ranking-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

#tlm-ranking-table tbody tr:last-of-type {
    border-bottom: 2px solid #009879;
}

#tlm-ranking-table tbody tr:hover {
    background-color: #f1f1f1;
}

.highlight-current-user {
    background-color: #fffacd !important;
    font-weight: bold;
}

.details-btn {
    background-color: #009879 !important;
    color: white !important;
    border: none !important;
    padding: 5px 10px !important;
    border-radius: 3px !important;
    cursor: pointer !important;
}

.details-btn:hover {
    background-color: #007f67 !important;
}

/* Nuovi stili per il form di iscrizione (aggiunti senza modificare gli esistenti) */
.tlm-form-group {
    margin-bottom: 15px;
}

.tlm-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.tlm-form-group input[type="text"] {
    width: 40%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 16px;
    box-sizing: border-box;
    text-transform: uppercase;
}

.tlm-success {
    color: #4F8A10;
    background: #DFF2BF;
    padding: 10px;
    border-radius: 3px;
    border: 1px solid #4F8A10;
    margin-top: 15px;
}

.tlm-error {
    color: #D8000C;
    background: #FFBABA;
    padding: 10px;
    border-radius: 3px;
    border: 1px solid #D8000C;
    margin-top: 15px;
}

/* Stili aggiuntivi per il form di iscrizione */
#tlm-join-league-form {
    margin-top: 20px;
}

#tlm-join-message {
    margin-top: 15px;
}
