/**
 * css/tournament-schedule.css - Spielplan-spezifische Styles
 * Pfad: /css/tournament-schedule.css
 * 
 * Funktionen:
 * - Optimierte Spielplan-Tabelle mit Team-Containern
 * - Responsive Match-Layout
 * - Team-Badge Integration für Spielplan
 * - VS-Divider und Match-Score Styles
 */

/* ========================================
   SPIELPLAN BASIS-LAYOUT
======================================== */

.match-teams-schedule {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.team-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 0;
}

.team-container .team-badge {
    font-size: 0.9rem !important;
    padding: 0.4rem 0.8rem !important;
    margin: 0.25rem 0 !important;
    white-space: nowrap;
}

.team-players-schedule {
    font-size: 0.75rem !important;
    color: var(--tennis-blue) !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin-top: 0.25rem !important;
    line-height: 1.2 !important;
    display: block !important;
}

.vs-divider {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--tennis-blue);
    padding: 0 0.5rem;
    text-align: center;
    min-width: 30px;
}

.vs-divider.final {
    font-size: 1.1rem;
    color: var(--gold);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.match-score-schedule {
    font-size: 1.1rem !important;
    font-weight: bold !important;
    color: #28a745 !important;
    text-align: center !important;
    margin-top: 0.5rem !important;
    padding: 0.25rem 0.5rem !important;
    background: rgba(40, 167, 69, 0.1) !important;
    border-radius: 8px !important;
    border: 2px solid #28a745 !important;
}

.match-score-schedule.final {
    font-size: 1.3rem !important;
    color: var(--gold) !important;
    background: rgba(255, 215, 0, 0.1) !important;
    border-color: var(--gold) !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
}

/* ========================================
   SPIELFREI TEAMS
======================================== */

.free-teams {
    text-align: center !important;
    padding: 1rem 0.5rem !important;
    vertical-align: middle !important;
}

.free-teams .team-badge {
    font-size: 0.8rem !important;
    padding: 0.3rem 0.6rem !important;
    margin: 0.2rem !important;
    display: inline-block !important;
}

/* ========================================
   FINALES MATCH
======================================== */

.final-match {
    position: relative;
    padding: 1rem 0.5rem !important;
}

.final-match-label {
    font-size: 0.8rem !important;
    color: var(--tennis-blue) !important;
    font-weight: bold !important;
    text-align: center !important;
    margin-top: 0.5rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    background: rgba(255, 215, 0, 0.2) !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 15px !important;
    border: 1px solid var(--gold) !important;
}

/* ========================================
   TOURNAMENT TABLE OPTIMIERUNGEN
======================================== */

.tournament-table .match-cell {
    padding: 0.75rem 0.5rem !important;
    vertical-align: middle !important;
    min-height: 120px;
}

.tournament-table .time-cell {
    padding: 0.75rem 0.5rem !important;
    vertical-align: middle !important;
    text-align: center !important;
}

/* ========================================
   RESPONSIVE SPIELPLAN
======================================== */

@media (max-width: 1200px) {
    .match-teams-schedule {
        flex-direction: column;
        gap: 0.25rem;
        align-items: center;
    }
    
    .team-container {
        width: 100%;
        margin: 0.25rem 0;
    }
    
    .vs-divider {
        order: 2;
        margin: 0.25rem 0;
        min-width: auto;
    }
    
    .team-container:first-child {
        order: 1;
    }
    
    .team-container:last-child {
        order: 3;
    }
    
    .team-container .team-badge {
        font-size: 0.85rem !important;
        padding: 0.3rem 0.6rem !important;
    }
    
    .team-players-schedule {
        font-size: 0.7rem !important;
    }
}

@media (max-width: 992px) {
    .tournament-table .match-cell {
        min-height: 140px;
        padding: 0.5rem 0.25rem !important;
    }
    
    .match-teams-schedule {
        gap: 0.2rem;
    }
    
    .team-container .team-badge {
        font-size: 0.8rem !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    .team-players-schedule {
        font-size: 0.65rem !important;
    }
    
    .match-score-schedule {
        font-size: 1rem !important;
        padding: 0.2rem 0.4rem !important;
    }
    
    .vs-divider {
        font-size: 0.8rem;
    }
    
    .free-teams .team-badge {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
        margin: 0.1rem !important;
    }
}

@media (max-width: 768px) {
    .tournament-table .match-cell {
        min-height: 160px;
        padding: 0.4rem 0.2rem !important;
    }
    
    .team-container .team-badge {
        font-size: 0.75rem !important;
        padding: 0.2rem 0.4rem !important;
    }
    
    .team-players-schedule {
        font-size: 0.6rem !important;
        line-height: 1.1 !important;
    }
    
    .match-score-schedule {
        font-size: 0.9rem !important;
        padding: 0.15rem 0.3rem !important;
    }
    
    .match-score-schedule.final {
        font-size: 1.1rem !important;
    }
    
    .vs-divider {
        font-size: 0.75rem;
        padding: 0 0.25rem;
    }
    
    .free-teams {
        padding: 0.75rem 0.25rem !important;
    }
    
    .free-teams .team-badge {
        font-size: 0.65rem !important;
        padding: 0.15rem 0.3rem !important;
        margin: 0.05rem !important;
        display: block !important;
        margin-bottom: 0.25rem !important;
    }
    
    .final-match-label {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
    }
}

@media (max-width: 576px) {
    .tournament-table .match-cell {
        min-height: 180px;
        padding: 0.3rem 0.1rem !important;
    }
    
    .team-container .team-badge {
        font-size: 0.7rem !important;
        padding: 0.15rem 0.3rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .team-players-schedule {
        font-size: 0.55rem !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }
    
    .match-score-schedule {
        font-size: 0.85rem !important;
        padding: 0.1rem 0.25rem !important;
    }
    
    .vs-divider {
        font-size: 0.7rem;
        padding: 0 0.2rem;
    }
    
    .free-teams .team-badge {
        font-size: 0.6rem !important;
        padding: 0.1rem 0.25rem !important;
    }
}

/* ========================================
   HOVER EFFECTS
======================================== */

.tournament-table .match-cell:hover .team-container .team-badge {
    transform: scale(1.05) !important;
    transition: transform 0.2s ease !important;
}

.tournament-table .match-cell:hover .match-score-schedule {
    background: rgba(40, 167, 69, 0.2) !important;
    transition: background 0.2s ease !important;
}

.tournament-table .match-cell:hover .match-score-schedule.final {
    background: rgba(255, 215, 0, 0.2) !important;
}

/* ========================================
   PRINT OPTIMIERUNG
======================================== */

@media print {
    .tournament-table .match-cell {
        min-height: auto !important;
        padding: 0.5rem 0.25rem !important;
    }
    
    .match-teams-schedule {
        flex-direction: row !important;
        gap: 0.25rem !important;
    }
    
    .team-container .team-badge {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
        background: #f8f9fa !important;
        color: #333 !important;
        border: 1px solid #333 !important;
    }
    
    .team-players-schedule {
        font-size: 0.6rem !important;
        color: #333 !important;
    }
    
    .match-score-schedule {
        font-size: 0.8rem !important;
        color: #333 !important;
        background: #f8f9fa !important;
        border: 1px solid #333 !important;
    }
    
    .vs-divider {
        color: #333 !important;
        font-size: 0.7rem !important;
    }
    
    .free-teams .team-badge {
        font-size: 0.6rem !important;
        background: #f8f9fa !important;
        color: #333 !important;
        border: 1px solid #333 !important;
    }
    
    .final-match-label {
        color: #333 !important;
        background: #f8f9fa !important;
        border: 1px solid #333 !important;
    }
}

/* ========================================
   ACCESSIBILITY
======================================== */

@media (prefers-reduced-motion: reduce) {
    .tournament-table .match-cell:hover .team-container .team-badge,
    .tournament-table .match-cell:hover .match-score-schedule {
        transform: none !important;
        transition: none !important;
    }
}

@media (prefers-contrast: high) {
    .team-container .team-badge {
        border-width: 3px !important;
    }
    
    .match-score-schedule {
        border-width: 3px !important;
    }
    
    .team-players-schedule {
        color: #000 !important;
        font-weight: bold !important;
    }
    
    .vs-divider {
        color: #000 !important;
        font-weight: bold !important;
    }
}

.team-container:focus-within {
    outline: 2px solid var(--tennis-blue) !important;
    outline-offset: 2px !important;
    border-radius: 5px !important;
}
