/**
 * DARTABLES Public Styles
 */

/* Kontener tabeli ligowej */
.dartables-league-table-container {
    margin: 30px auto;
    width: 100%;
    text-align: center;
}

.dartables-league-name {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.dartables-league-description {
    margin-bottom: 20px;
    color: #555;
    line-height: 1.5;
}

/* Responsywny kontener tabeli */
.dartables-table-responsive {
    margin-bottom: 15px;
    text-align: center;
    display: flex;
    justify-content: center;
}

/* Tabela ligowa */
.dartables-league-table {
    width: 800px;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 12px !important;
    font-weight: bold;
    table-layout: fixed;
}

.dartables-league-table th,
.dartables-league-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.dartables-league-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.dartables-league-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.dartables-league-table tbody tr:hover {
    background-color: #f0f0f0;
}

/* Kolumny tabeli */
.dartables-position {
    width: 4%;
    font-weight: 600;
}

.dartables-player {
    text-align: center;
    font-weight: 500;
    width: 30%;
}

.dartables-points {
    font-weight: 600;
    background-color: #f5f5f5;
    width: 8%;
}

.dartables-legs-balance {
    font-weight: 500;
    width: 10%;
}

.dartables-played,
.dartables-won,
.dartables-drawn,
.dartables-lost {
    width: 8%;
}

.dartables-legs-won,
.dartables-legs-lost {
    width: 8%;
}

.dartables-referee,
.dartables-absence {
    width: 8%;
}

/* Legenda tabeli */
.dartables-table-legend {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
}

.dartables-legend-item {
    display: inline-block;
    margin-right: 15px;
}

/* Komunikaty */
.dartables-error {
    color: #d32f2f;
    padding: 10px;
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
}

/* Style dla zrezygnowanych graczy */
.dartables-player-resigned {
    opacity: 0.6;
    background-color: #f8f9fa !important;
}

.dartables-player-resigned:hover {
    background-color: #e9ecef !important;
}

.dartables-player-resigned .dartables-player {
    color: #6c757d;
}

.dartables-resigned-label {
    color: #999;
    font-style: italic;
    font-size: 0.9em;
    font-weight: normal;
}

/* Style dla terminarza */
.dartables-schedule-container {
    margin: 30px 0;
}

.dartables-season-name {
    font-size: 18px;
    margin-bottom: 10px;
    color: #666;
    font-weight: normal;
}

.dartables-schedule-rounds {
    margin-top: 20px;
}

.dartables-round-separator {
    background: transparent !important;
}

.dartables-round-separator:hover {
    background: transparent !important;
}

.dartables-round-separator td {
    border-bottom: none !important;
    padding: 0 !important;
}

.dartables-schedule-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e0e0e0;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 12px;
    margin-bottom: 0;
}

.dartables-schedule-table th,
.dartables-schedule-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.dartables-schedule-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.dartables-schedule-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.dartables-schedule-table tbody tr:hover {
    background-color: #f0f0f0;
}

/* Style dla kolumn sędziego i statusu */
.dartables-schedule-table .dartables-referee {
    text-align: center;
    color: #6c757d;
}

.dartables-schedule-table .dartables-status {
    text-align: center;
}

.dartables-status-played {
    color: #155724;
    font-weight: bold;
}

.dartables-status-pending {
    color: #721c24;
    font-style: italic;
}

.dartables-home-player,
.dartables-away-player {
    text-align: center;
    font-weight: 500;
    min-width: 120px;
}

.dartables-score {
    font-weight: 600;
    min-width: 80px;
}

.dartables-referee,
.dartables-status {
    width: 100px;
}

.dartables-match-result {
    font-weight: bold;
    color: #333;
}

.dartables-match-pending {
    color: #999;
    font-style: italic;
}

.dartables-no-referee {
    color: #999;
    font-style: italic;
}

.dartables-status-played {
    color: #28a745;
    font-weight: 600;
}

.dartables-status-pending {
    color: #6c757d;
}

.match-played {
    background-color: #f8f9fa;
}

.match-not-played {
    background-color: #fff;
}

.dartables-schedule-info {
    margin-top: 15px;
    font-size: 13px;
    color: #666;
}

.dartables-schedule-summary {
    margin: 0;
    font-weight: 500;
}

/* Style dla kontrolek terminarza */
.dartables-schedule-controls {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
}

.dartables-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.dartables-btn-primary {
    color: #fff;
    background: #2271b1;
    border-color: #2271b1;
}

.dartables-btn-primary:hover {
    background: #135e96;
    border-color: #135e96;
}

.dartables-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dartables-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    font-weight: 500;
}

.dartables-success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #b8dacc;
}

.dartables-error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* Style dla pól wyników */
.dartables-score-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.dartables-score-input {
    width: 40px;
    padding: 4px 6px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
}

.dartables-score-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.dartables-score-separator {
    font-weight: 600;
    color: #666;
    margin: 0 2px;
}

/* Style dla list rozwijanych sędziów */
.dartables-referee-select {
    width: 100%;
    max-width: 150px;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    background-color: #fff;
}

.dartables-referee-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* Style dla przycisków akcji */
.dartables-actions {
    width: 80px;
    text-align: center;
}

.dartables-clear-match {
    padding: 4px 8px;
    font-size: 12px;
    color: #dc3545;
    background-color: transparent;
    border: 1px solid #dc3545;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.dartables-clear-match:hover:not(:disabled) {
    color: #fff;
    background-color: #dc3545;
}

.dartables-clear-match:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #6c757d;
    border-color: #6c757d;
}

/* Responsywność */
@media screen and (max-width: 768px) {
    .dartables-league-table,
    .dartables-schedule-table {
        font-size: 11px !important;
    }
    
    .dartables-league-table th,
    .dartables-league-table td,
    .dartables-schedule-table th,
    .dartables-schedule-table td {
        padding: 8px 6px;
    }
}

@media screen and (max-width: 600px) {
    .dartables-league-table,
    .dartables-schedule-table {
        font-size: 10px !important;
    }
    
    .dartables-league-table th,
    .dartables-league-table td,
    .dartables-schedule-table th,
    .dartables-schedule-table td {
        padding: 6px 4px;
    }
    
    .dartables-legend-item {
        display: block;
        margin-bottom: 5px;
    }
    
    .dartables-score-input {
        width: 35px;
        font-size: 10px;
    }
    
    .dartables-referee-select {
        max-width: 120px;
        font-size: 10px;
    }
    
    .dartables-clear-match {
        padding: 3px 6px;
        font-size: 9px;
    }
}

@media screen and (max-width: 480px) {
    .dartables-league-table,
    .dartables-schedule-table {
        font-size: 9px !important;
    }
    
    .dartables-league-table th,
    .dartables-league-table td,
    .dartables-schedule-table th,
    .dartables-schedule-table td {
        padding: 4px 2px;
    }
}