/* Football Scheduler Frontend Styles */

.football-schedule-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.football-schedule-header {
    text-align: center;
    margin-bottom: 30px;
}

.football-schedule-header h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2.5em;
    font-weight: 300;
}

.schedule-nav {
    display: flex;
    justify-content: center;
    gap: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.nav-link {
    padding: 12px 24px;
    text-decoration: none;
    color: #666;
    background: #f8f9fa;
    border: none;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.nav-link:hover {
    color: #2271b1;
    background: #e3f2fd;
}

.nav-link.active {
    color: #fff;
    background: #2271b1;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #2271b1;
}

/* Schedule Content */
.schedule-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.football-matches-list {
    padding: 20px;
}

.match-date-group {
    margin-bottom: 40px;
}

.match-date-group:last-child {
    margin-bottom: 0;
}

.match-date-header {
    font-size: 1.4em;
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding: 10px 0;
    border-bottom: 2px solid #3498db;
    position: relative;
    font-weight: 600;
}

.match-date-header::before {
    content: "📅";
    margin-right: 10px;
    font-size: 0.9em;
}

/* Matches Grid */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.match-card {
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.match-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
}

.match-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #3498db;
}

.match-card.match-finished::before {
    background: linear-gradient(90deg, #95a5a6, #7f8c8d);
}

.match-card.match-live::before {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
    animation: pulse 2s infinite;
}

.match-card.match-upcoming::before {
    background: linear-gradient(90deg, #3498db, #2980b9);
}

/* Match Header */
.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.match-time {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    background: #ecf0f1;
    padding: 5px 10px;
    border-radius: 15px;
}

.match-status .status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Match Teams */
.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
}

.team {
    flex: 2;
    display: flex;
    align-items: center;
    gap: 12px;
}

.away-team {
    flex-direction: row-reverse;
    text-align: right;
}

.team-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Unified Table with League Header Rows */
.fixture-table-unified {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* League Header Row Styles */
.league-header-row {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 3px solid #007cba;
    border-bottom: 1px solid #dee2e6;
}

.league-header-row:first-child {
    border-top: none;
}

.league-header-cell {
    padding: 15px 20px !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    position: relative;
}

.league-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #495057;
}

.league-header-content .league-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.league-header-content .league-name {
    margin: 0;
    font-size: 1.2em;
    color: #212529;
    flex: 1;
    font-weight: 700;
}

.league-header-content .league-sort-order {
    font-size: 0.85em;
    color: #6c757d;
    background: #fff;
    padding: 4px 10px;
    border-radius: 15px;
    border: 1px solid #dee2e6;
    min-width: 35px;
    text-align: center;
    font-weight: bold;
}

/* Priority indicator for league header rows */
/* .league-header-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #007cba;
} */

/* High priority leagues styling */
.league-header-row[data-league-id] .league-sort-order {
    transition: all 0.3s ease;
}

/* Priority-based styling for sort_order badges */
.league-header-content .league-sort-order:contains("1") {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.league-header-content .league-sort-order:contains("2") {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.league-header-content .league-sort-order:contains("3") {
    background: #cce5ff;
    color: #004085;
    border-color: #80bdff;
}

/* League matches styling (rows that follow header) */
.league-match {
    transition: all 0.2s ease;
}

.league-match:hover {
    background-color: #f8f9fa;
}

/* Add subtle border between different league groups */
.league-match:last-of-type {
    border-bottom: 2px solid #e9ecef;
}

/* Responsive adjustments for unified table */
@media (max-width: 768px) {
    .league-header-content {
        gap: 8px;
        padding: 10px 0;
    }

    .league-header-content .league-name {
        font-size: 1.1em;
        flex-basis: 100%;
    }

    .league-header-content .league-logo {
        width: 28px;
        height: 28px;
    }

    .league-header-content .league-sort-order {
        font-size: 0.8em;
        padding: 3px 8px;
    }

    .league-header-cell {
        padding: 12px 15px !important;
    }
}

.away-team .team-info {
    flex-direction: row-reverse;
}

.team-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 50%;
    background: #f8f9fa;
    padding: 2px;
}

.team-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
    line-height: 1.2;
}

.team-score {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    min-width: 30px;
    text-align: center;
}

.match-separator {
    flex: 0 0 auto;
    text-align: center;
    margin: 0 15px;
}

.vs {
    font-size: 12px;
    color: #95a5a6;
    font-weight: bold;
    background: #ecf0f1;
    padding: 5px 8px;
    border-radius: 10px;
}

.score-separator {
    font-size: 20px;
    color: #2c3e50;
    font-weight: bold;
}
