/**
 * css/tournament-responsive.css - Responsive Design für alle Geräte
 * Pfad: /css/tournament-responsive.css
 * 
 * Funktionen:
 * - Mobile-First Responsive Design
 * - Tablet-optimierte Layouts
 * - Desktop-Optimierungen
 * - Print-Styles
 * - Accessibility Features
 */

/* ========================================
   MOBILE FIRST (320px+)
======================================== */

/* Basis Mobile Styles bereits in Core-Modulen definiert */

/* ========================================
   SMALL MOBILE (480px+)
======================================== */

@media (min-width: 480px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .winners-podium {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ========================================
   TABLET PORTRAIT (768px+)
======================================== */

@media (min-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .section-header h2 {
        font-size: 2.5rem;
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .winners-podium {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
    }
    
    .header-navigation {
        position: absolute;
        flex-direction: row;
        margin-bottom: 0;
    }
    
    .nav-buttons-right {
        flex-direction: row;
        width: auto;
    }
    
    .tournament-footer {
        text-align: left;
    }
    
    .tournament-footer .text-end {
        text-align: right !important;
    }
    
    .footer-links {
        justify-content: flex-start;
    }
    
    .footer-info {
        text-align: right;
    }
    
    .live-status-banner {
        flex-direction: row;
        text-align: left;
    }
    
    .status-info {
        flex-direction: row;
        gap: 1rem;
    }
    
    .status-detail {
        margin-left: 1rem;
    }
}

/* ========================================
   TABLET LANDSCAPE (992px+)
======================================== */

@media (min-width: 992px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .winners-podium {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .winner-box.position-1 {
        transform: scale(1.05);
    }
    
    .matches-in-slot {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tournament-table .match-cell {
        min-height: 120px;
    }
}

/* ========================================
   DESKTOP (1200px+)
======================================== */

@media (min-width: 1200px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    .winners-podium {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
        max-width: 1200px;
    }
    
    .matches-in-slot {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .match-teams-schedule {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .tournament-table .match-cell {
        min-height: 100px;
    }
}

/* ========================================
   LARGE DESKTOP (1400px+)
======================================== */

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-section h1 {
        font-size: 3.5rem;
    }
    
    .section-header h2 {
        font-size: 3rem;
    }
    
    .winners-podium {
        max-width: 1300px;
        gap: 3rem;
    }
    
    .tournament-table .match-cell {
        min-height: 110px;
        padding: 1rem 0.75rem !important;
    }
}

/* ========================================
   PRINT STYLES
======================================== */

@media print {
    /* Page Setup */
    @page {
        margin: 1cm;
        size: A4;
    }
    
    * {
        box-shadow: none !important;
        text-shadow: none !important;
        animation: none !important;
        transition: none !important;
    }
    
    body {
        font-size: 12px;
        line-height: 1.4;
        color: #000;
        background: white;
    }
    
    /* Typography */
    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        page-break-after: avoid;
    }
    
    .hero-section {
        background: #f8f9fa !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        page-break-after: avoid;
        padding: 1rem 0 !important;
    }
    
    .hero-section h1 {
        font-size: 1.8rem !important;
        color: #000 !important;
    }
    
    .hero-section .lead {
        font-size: 1rem !important;
        color: #000 !important;
    }
    
    /* Hide Interactive Elements */
    .no-print,
    .header-navigation,
    .tournament-footer,
    .nav-btn,
    .footer-home-btn,
    .live-status-banner,
    .quick-actions,
    .detail-view-btn,
    .print-btn,
    .back-btn,
    .winner-icon,
    .draw-icon,
    button,
    .btn {
        display: none !important;
    }
    
    /* Layout */
    .container {
        max-width: none !important;
        padding: 0 !important;
    }
    
    .row {
        margin: 0 !important;
    }
    
    .col, .col-md-6, .col-md-4, .col-md-3 {
        flex: none !important;
        width: auto !important;
        padding: 0 !important;
    }
    
    /* Tables */
    .tournament-table,
    .result-table,
    .standings-table {
        page-break-inside: avoid;
        border: 2px solid #000 !important;
        margin-bottom: 1rem !important;
    }
    
    .tournament-table table,
    .result-table table,
    .standings-table table {
        width: 100% !important;
    }
    
    .tournament-table th,
    .result-table th,
    .standings-table th {
        background: #000 !important;
        color: white !important;
        border: 1px solid #000 !important;
        padding: 0.5rem !important;
        font-size: 0.9rem !important;
    }
    
    .tournament-table td,
    .result-table td,
    .standings-table td {
        border: 1px solid #000 !important;
        padding: 0.3rem !important;
        font-size: 0.8rem !important;
    }
    
    /* Team Grid */
    .team-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem !important;
        page-break-inside: avoid;
    }
    
    .team-card {
        border: 2px solid #000 !important;
        background: white !important;
        color: #000 !important;
        padding: 0.5rem !important;
        text-align: center;
    }
    
    /* Winners */
    .tournament-winners {
        page-break-inside: avoid;
        border: 2px solid #000 !important;
        background: white !important;
        padding: 1rem !important;
    }
    
    .winners-podium {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem !important;
    }
    
    .winner-box {
        border: 2px solid #000 !important;
        background: white !important;
        color: #000 !important;
        transform: none !important;
        padding: 0.5rem !important;
    }
    
    .winner-position,
    .winner-players,
    .winner-stats {
        color: #000 !important;
    }
    
    /* Team Badges */
    .team-badge {
        background: #f0f0f0 !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }
    
    /* Content Sections */
    .content-section {
        page-break-inside: avoid;
        margin: 1rem 0 !important;
    }
    
    .content-section h2 {
        border-bottom: 2px solid #000 !important;
        color: #000 !important;
        font-size: 1.4rem !important;
    }
    
    /* Rules Cards */
    .rules-card {
        border: 1px solid #000 !important;
        background: white !important;
        color: #000 !important;
        margin: 0.5rem 0 !important;
        padding: 0.5rem !important;
        page-break-inside: avoid;
    }
    
    /* Schedule */
    .schedule-info,
    .highlight-box {
        border: 1px solid #000 !important;
        background: white !important;
        color: #000 !important;
        padding: 0.5rem !important;
        page-break-inside: avoid;
    }
    
    /* Force page breaks */
    .page-break {
        page-break-before: always;
    }
    
    .avoid-break {
        page-break-inside: avoid;
    }
}

/* ========================================
   ACCESSIBILITY FEATURES
======================================== */

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --tennis-blue: #000080;
        --tennis-blue-dark: #000040;
        --gold: #ffff00;
        --silver: #c0c0c0;
        --bronze: #cd853f;
    }
    
    .nav-btn,
    .footer-home-btn,
    .team-badge,
    .winner-box {
        border-width: 3px !important;
        font-weight: bold !important;
    }
    
    .hero-section::before,
    .winner-box::before,
    .winner-box::after {
        opacity: 0 !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
    
    .winner-box:hover,
    .nav-btn:hover,
    .team-card:hover {
        transform: none !important;
    }
    
    html {
        scroll-behavior: auto !important;
    }
}

/* Focus Management */
*:focus {
    outline: 3px solid var(--gold) !important;
    outline-offset: 2px !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   LANDSCAPE ORIENTATION
======================================== */

@media (orientation: landscape) and (max-width: 1024px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .winners-podium {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .winner-box {
        padding: 1rem 0.75rem;
    }
    
    .tournament-table .match-cell {
        min-height: 100px;
    }
}

/* ========================================
   VERY LARGE SCREENS (1600px+)
======================================== */

@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-section {
        padding: 4rem 0;
    }
    
    .content-section {
        margin: 4rem 0;
    }
    
    .winners-podium {
        max-width: 1400px;
        gap: 3.5rem;
    }
    
    .team-grid {
        gap: 3rem;
    }
}
