/* ==========================================
   Date Tabs & League Grouping Styles
   ========================================== */

/* Date Tabs Container */
.date-tabs-container {
    margin: 2rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.date-tabs-container::-webkit-scrollbar {
    display: none;
}

.date-tabs {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem 0;
    min-width: min-content;
}

.date-tab {
    background: #F1F5F9;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 90px;
    white-space: nowrap;
}

.date-tab:hover {
    border-color: var(--accent);
    background: rgba(255, 107, 53, 0.1);
    transform: translateY(-2px);
}

.date-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    font-weight: 600;
}

.tab-day-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.tab-date {
    font-size: 0.85rem;
    opacity: 0.8;
}

.matches-container {
    margin: 2rem 0;
}

.league-group {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
    transition: all var(--transition);
}

.league-group:hover {
    border-color: rgba(255, 107, 53, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.league-header {
    background: linear-gradient(135deg, #F8F9FA, rgba(220, 38, 38, 0.05));
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.league-logo-header {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.league-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.matches-list {
    padding: 0;
}

/* Match Row - Horizontal Team vs Team Layout */
.match-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition);
    position: relative;
}

.match-row:last-child {
    border-bottom: none;
}

.match-row:hover {
    background: rgba(255, 107, 53, 0.05);
}

.match-row.live {
    background: rgba(239, 68, 68, 0.08);
    border-left: 3px solid #ef4444;
}

/* Live Indicator */
.live-dot {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {

    0%,
    100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }

    50% {
        opacity: 0.6;
        transform: translateY(-50%) scale(1.2);
    }
}

/* Team Sides */
.team-side {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.team-home {
    justify-content: flex-end;
    text-align: right;
}

.team-away {
    justify-content: flex-start;
    text-align: left;
}

.team-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-logo-sm {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Center Area (Score/Time) */
.match-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 100px;
    text-align: center;
}

/* Score Display */
.match-score-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1;
}

.score-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent);
}

.score-separator {
    font-size: 1.25rem;
    opacity: 0.6;
    font-weight: 600;
    color: var(--text-main);
}

/* Time Display */
.match-time-display {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

/* Status Text */
.match-status-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.match-row.live .match-status-text {
    color: #ef4444;
    font-weight: 600;
}

/* Loading & Error States */
.matches-container .loading,
.matches-container .no-matches,
.matches-container .error {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.matches-container .error {
    color: #ef4444;
}

/* Responsive Design */
@media (max-width: 768px) {
    .date-tab {
        padding: 0.6rem 1rem;
        min-width: 75px;
    }

    .tab-day-name {
        font-size: 0.85rem;
    }

    .tab-date {
        font-size: 0.75rem;
    }

    .league-header {
        padding: 0.875rem 1rem;
    }

    .league-logo-header {
        width: 26px;
        height: 26px;
    }

    .league-name {
        font-size: 0.95rem;
    }

    .match-row {
        flex-direction: column;
        gap: 0.875rem;
        padding: 1rem;
    }

    .team-side {
        width: 100%;
        max-width: 100%;
    }

    .team-home {
        order: 1;
    }

    .match-center {
        order: 2;
        width: 100%;
        padding: 0.75rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .team-away {
        order: 3;
    }

    .team-name {
        font-size: 0.875rem;
    }

    .team-logo-sm {
        width: 28px;
        height: 28px;
    }

    .match-score-display {
        font-size: 1.25rem;
    }

    .score-number {
        font-size: 1.5rem;
    }

    .match-time-display {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .date-tab {
        padding: 0.5rem 0.75rem;
        min-width: 65px;
    }

    .league-header {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .league-logo-header {
        width: 24px;
        height: 24px;
    }

    .league-name {
        font-size: 0.875rem;
    }

    .match-row {
        padding: 0.875rem 0.75rem;
    }

    .team-name {
        font-size: 0.8rem;
    }

    .team-logo-sm {
        width: 26px;
        height: 26px;
    }

    .score-number {
        font-size: 1.35rem;
    }

    .match-time-display {
        font-size: 0.85rem;
    }
}