/**
 * Template Styles for Football Data Plugin
 * Stili CSS globali per tutti i template
 *
 * @package Football_Data_Plugin
 * @since 1.0.0
 */

/* ========================================================================
   Base Template Styles
   ======================================================================== */

.football-data-container {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ========================================================================
   Minimal Template (Default)
   ======================================================================== */

.football-data-template-minimal {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.football-data-template-minimal .football-data-standings-header,
.football-data-template-minimal .football-data-matches-header,
.football-data-template-minimal .football-data-predictions-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 2px solid #dee2e6;
}

.football-data-template-minimal h2 {
    color: #2c3e50;
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.football-data-template-minimal p {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

/* ========================================================================
   Modern Template
   ======================================================================== */

.football-data-template-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* ========================================================================
   Classic Template
   ======================================================================== */

.football-data-template-classic {
    border: 3px solid #2c3e50;
    background: #fff;
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* ========================================================================
   Compact Template
   ======================================================================== */

.football-data-template-compact {
    font-size: 0.85em;
    border: 1px solid #dee2e6;
    background: #fff;
}

/* ========================================================================
   Detailed Template
   ======================================================================== */

.football-data-template-detailed {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

/* ========================================================================
   Responsive Utilities
   ======================================================================== */

@media (max-width: 768px) {
    .football-data-container[data-responsive="true"] {
        font-size: 0.95em;
    }
    
    .football-data-container[data-responsive="true"] h2 {
        font-size: 1.2em;
    }
}

/* ========================================================================
   Dark Theme Support
   ======================================================================== */

.theme-dark {
    color-scheme: dark;
}

.theme-dark.football-data-template-minimal {
    background: #2c3e50;
    border-color: #34495e;
}

.theme-dark.football-data-template-modern {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.theme-dark.football-data-template-classic {
    background: #1a1a1a;
    border-color: #f39c12;
}

.theme-dark.football-data-template-compact {
    background: #2c3e50;
    border-color: #34495e;
}

.theme-dark.football-data-template-detailed {
    background: #1a252f;
    border-color: #34495e;
}

/* ========================================================================
   Branding Styles
   ======================================================================== */

.football-data-branding {
    text-align: center;
    padding: 12px 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    font-size: 12px;
}

.football-data-branding a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.football-data-branding a:hover {
    text-decoration: underline;
}

.theme-dark .football-data-branding {
    background: #34495e;
    border-top-color: #495057;
}

.theme-dark .football-data-branding a {
    color: #4dabf7;
}

/* ========================================================================
   Error Messages
   ======================================================================== */

.football-data-error,
.football-data-notice {
    padding: 20px;
    border-radius: 6px;
    text-align: center;
}

.football-data-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.football-data-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* ========================================================================
   Loading States
   ======================================================================== */

.football-data-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.football-data-loading::after {
    content: '⚽';
    font-size: 32px;
    display: block;
    margin-top: 10px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ========================================================================
   Navigazione Giornate
   ======================================================================== */

.football-data-rounds-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 0 0 20px 0;
    justify-content: center;
}

.football-data-rounds-nav .round-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.football-data-rounds-nav .round-nav-link:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.football-data-rounds-nav .round-label {
    font-weight: 600;
    margin-right: 2px;
}

/* ========================================================================
   Layout Responsive Giornate (50% Desktop, 100% Mobile)
   ======================================================================== */

.football-data-round-section {
    width: 100%;
    margin-bottom: 20px;
}

/* Desktop: Layout a 2 colonne (50% ciascuna) */
@media (min-width: 768px) {
    .football-data-matches-content {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .football-data-round-section {
        width: calc(50% - 10px);
        margin-bottom: 20px;
    }
    
    /* Per template specifici con classi diverse */
    .football-data-matches-content-modern .football-data-round-section,
    .football-data-matches-content-classic .football-data-round-section,
    .matches-content-detailed .football-data-round-section,
    .matches-list-compact .football-data-round-section {
        width: calc(50% - 10px);
    }
}

/* Tablet e Mobile: Layout a colonna singola (100%) */
@media (max-width: 767px) {
    .football-data-round-section {
        width: 100%;
    }
    
    .football-data-rounds-nav {
        padding: 10px;
        gap: 6px;
    }
    
    .football-data-rounds-nav .round-nav-link {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* ========================================================================
   Back to Top Button
   ======================================================================== */

.football-data-round-footer {
    text-align: center;
    padding: 12px;
    border-top: 1px solid #dee2e6;
    margin-top: 15px;
    background: #f8f9fa;
}

.back-to-top {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.back-to-top:hover {
    background: #007bff;
    color: white;
    text-decoration: none;
}

/* Dark Theme per navigazione */
.theme-dark .football-data-rounds-nav {
    background: #2c3e50;
}

.theme-dark .football-data-rounds-nav .round-nav-link {
    background: #34495e;
    color: #ecf0f1;
    border-color: #1a252f;
}

.theme-dark .football-data-rounds-nav .round-nav-link:hover {
    background: #3498db;
    border-color: #3498db;
}

.theme-dark .football-data-round-footer {
    background: #2c3e50;
    border-color: #1a252f;
}

.theme-dark .back-to-top {
    color: #3498db;
}

.theme-dark .back-to-top:hover {
    background: #3498db;
    color: white;
}
