/* TTC Holzwickede Statistiken Plugin Styles */

.ttc-stats-mannschaften,
.ttc-stats-mannschaft-stats,
.ttc-stats-spieler-stats,
.ttc-stats-letzte-spiele,
.ttc-stats-top-spieler,
.ttc-stats-ttr-verlauf,
.ttc-stats-mannschaft-uebersicht {
    margin: 20px 0;
}

.ttc-stats-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
    margin: 15px 0;
    font-family: Arial, sans-serif;
}

.ttc-stats-table th {
    background-color: #f5f5f5;
    color: #333;
    font-weight: bold;
    padding: 12px 8px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    border-right: 1px solid #ddd;
}

.ttc-stats-table th:last-child {
    border-right: none;
}

.ttc-stats-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
}

.ttc-stats-table td:last-child {
    border-right: none;
}

.ttc-stats-table tr:hover {
    background-color: #f9f9f9;
}

.ttc-stats-table tr:nth-child(even) {
    background-color: #fafafa;
}

/* Ergebnis-Styling */
.ttc-gewonnen {
    color: #4CAF50;
    font-weight: bold;
}

.ttc-verloren {
    color: #f44336;
    font-weight: bold;
}

/* Ersatzspieler-Styling */
.ttc-ersatz {
    color: #ff9800;
    font-weight: bold;
    font-style: italic;
}

/* Status-Styling */
.ttc-aktiv {
    color: #4CAF50;
    font-weight: bold;
}

.ttc-inaktiv {
    color: #999;
    font-style: italic;
}

/* TTR-Verlauf Styling */
.ttc-ttr-plus {
    color: #4CAF50;
    font-weight: bold;
}

.ttc-ttr-minus {
    color: #f44336;
    font-weight: bold;
}

/* Statistik-Grid */
.ttc-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.ttc-stat-item {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ttc-stat-number {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #2c5282;
    margin-bottom: 5px;
}

.ttc-stat-label {
    display: block;
    font-size: 0.9em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Info-Box Styling */
.ttc-stats-info-box {
    background-color: #e8f4f8;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.ttc-stats-info-box p {
    margin: 8px 0;
}

.ttc-stats-info-box strong {
    color: #2c5282;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ttc-stats-table {
        font-size: 0.9em;
    }
    
    .ttc-stats-table th,
    .ttc-stats-table td {
        padding: 8px 6px;
    }
    
    .ttc-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .ttc-stat-number {
        font-size: 1.5em;
    }
    
    .ttc-stat-label {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .ttc-stats-table {
        font-size: 0.8em;
    }
    
    .ttc-stats-table th,
    .ttc-stats-table td {
        padding: 6px 4px;
    }
    
    /* Horizontales Scrollen für kleine Bildschirme */
    .ttc-stats-table-wrapper {
        overflow-x: auto;
    }
}

/* Überschriften */
.ttc-stats-mannschaft-stats h3,
.ttc-stats-ttr-verlauf h4 {
    color: #2c5282;
    border-bottom: 2px solid #2c5282;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

/* Platzierung in Top-Spieler Tabelle */
.ttc-stats-top-spieler .ttc-stats-table tr:first-child td:first-child {
    background-color: #ffd700;
    font-weight: bold;
}

.ttc-stats-top-spieler .ttc-stats-table tr:nth-child(2) td:first-child {
    background-color: #c0c0c0;
    font-weight: bold;
}

.ttc-stats-top-spieler .ttc-stats-table tr:nth-child(3) td:first-child {
    background-color: #cd7f32;
    font-weight: bold;
}

/* Loading Animation */
.ttc-stats-loading {
    text-align: center;
    padding: 20px;
}

.ttc-stats-loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2c5282;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.ttc-stats-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

/* Success Message */
.ttc-stats-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}