/**
 * css/tournament-tables.css - Tabellen-Styles für Turnier
 * Pfad: /css/tournament-tables.css
 * 
 * Funktionen:
 * - Alle Tabellen-Styles (Tournament, Results, Standings)
 * - Responsive Tabellen-Design
 * - Position-Highlighting (Gold, Silber, Bronze)
 * - Match-Status Styles
 */

/* ========================================
   BASIS TABELLEN-STYLES
======================================== */

.tournament-table, .result-table, .standings-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    margin-bottom: 2rem;
}

.tournament-table table, .result-table table, .standings-table table {
    margin: 0;
    width: 100%;
}

/* ========================================
   TABELLEN-HEADER
======================================== */

.tournament-table th, .result-table th, .standings-table th {
    background: linear-gradient(135deg, var(--tennis-blue-dark), var(--tennis-blue)) !important;
    color: white !important;
    border: none !important;
    padding: 1.2rem !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    position: relative;
    text-align: center;
}

.tournament-table th::after, .result-table th::after, .standings-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), #ffed4e, var(--gold));
}

/* ========================================
   TABELLEN-ZELLEN
======================================== */

.tournament-table td, .result-table td, .standings-table td {
    padding: 1rem 1.2rem !important;
    border-bottom: 1px solid #eee !important;
    vertical-align: middle !important;
    text-align: center;
}

/* ========================================
   SPEZIELLE ZELLEN-STYLES
======================================== */

.time-cell {
    font-weight: bold !important;
    background: linear-gradient(135deg, var(--gold-light), #fff9e6) !important;
    color: var(--tennis-blue-dark) !important;
    border-left: 4px solid var(--gold) !important;
    text-align: center !important;
}

.pause-row {
    background-color: #fff8e1 !important;
    font-style: italic !important;
    color: #666 !important;
}

.pause-row td {
    padding: 0.75rem 1.2rem !important;
    font-size: 0.9rem !important;
}

.match-cell {
    font-weight: 600 !important;
    color: var(--tennis-blue-dark) !important;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.match-cell:hover {
    background: rgba(255, 215, 0, 0.1) !important;
    transform: scale(1.02);
}

.match-finished {
    background: linear-gradient(135deg, #d4edda, #e8f5e9) !important;
    color: #155724 !important;
    border-left: 4px solid #28a745 !important;
}

.match-score {
    font-weight: bold !important;
    color: #28a745 !important;
    font-size: 1.1rem !important;
    display: block;
    margin-top: 0.25rem;
}

/* ========================================
   POSITION HIGHLIGHTING
======================================== */

.position-1 {
    background: var(--gold-metallic) !important;
    color: var(--tennis-blue-dark) !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
    animation: metallic-shine 4s infinite !important;
    background-size: 200% 100% !important;
}

.position-2 {
    background: var(--silver-metallic) !important;
    color: var(--tennis-blue-dark) !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
    animation: metallic-shine 4s infinite !important;
    background-size: 200% 100% !important;
}

.position-3 {
    background: var(--bronze-metallic) !important;
    color: var(--tennis-blue-dark) !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
    animation: metallic-shine 4s infinite !important;
    background-size: 200% 100% !important;
}

/* ========================================
   COMPACT TABELLEN
======================================== */

.compact-standings {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-height: calc(100vh - 200px);
}

.compact-standings table {
    margin: 0;
}

.compact-standings th {
    background: linear-gradient(135deg, var(--tennis-blue-dark), var(--tennis-blue));
    color: white;
    padding: 1rem;
    font-size: 1rem;
    position: relative;
}

.compact-standings th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold);
}

.compact-standings td {
    padding: 1rem;
    font-size: 1rem;
    border-bottom: 1px solid #eee;
}

.compact-standings .position-1,
.compact-standings .position-2,
.compact-standings .position-3 {
    font-weight: bold;
}

/* ========================================
   RESPONSIVE TABELLEN
======================================== */

@media (max-width: 1024px) {
    .tournament-table th, .result-table th, .standings-table th {
        padding: 1rem 0.75rem !important;
        font-size: 1rem !important;
    }
    
    .tournament-table td, .result-table td, .standings-table td {
        padding: 0.75rem 0.5rem !important;
        font-size: 0.9rem !important;
    }
    
    .time-cell {
        font-size: 0.85rem !important;
    }
    
    .match-score {
        font-size: 1rem !important;
    }
}

@media (max-width: 768px) {
    .tournament-table, .result-table, .standings-table {
        font-size: 0.8rem;
    }
    
    .tournament-table th, .result-table th, .standings-table th {
        padding: 0.75rem 0.5rem !important;
        font-size: 0.9rem !important;
    }
    
    .tournament-table td, .result-table td, .standings-table td {
        padding: 0.6rem 0.3rem !important;
        font-size: 0.8rem !important;
    }
}

/* ========================================
   PRINT OPTIMIERUNG
======================================== */

@media print {
    .tournament-table, .result-table, .standings-table {
        page-break-inside: avoid;
        box-shadow: none;
        border: 2px solid #333;
    }
    
    .tournament-table th, .result-table th, .standings-table th {
        background: #333 !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .match-finished {
        background: #f0f0f0 !important;
        border-left: 4px solid #333 !important;
    }
    
    .position-1, .position-2, .position-3 {
        background: #f8f9fa !important;
        color: #333 !important;
        font-weight: bold !important;
        animation: none !important;
    }
}
