/* ============================================================================
   TEAM PAGE - SPECIFIC STYLES
   ============================================================================ */

/* Team Hero Overrides */
.team-hero .team-logo-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 0 !important;
    background: transparent !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    transition: border-color 0.3s ease;
}

.team-hero .team-badge {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0 !important;
    background: transparent !important;
}

/* Center team name vertically in hero */
.team-hero .tournament-hero-left {
    align-items: center;
}

/* Competition Filter */
.competition-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface, #ffffff);
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.competition-filter label {
    font-weight: 600;
    color: var(--text-secondary, #666);
    font-size: 14px;
    white-space: nowrap;
}

.competition-filter select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border, #e0e0e0);
    border-radius: 6px;
    background: var(--surface, #fff);
    color: var(--text-primary, #333);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    max-width: 300px;
}

.competition-filter select:hover {
    border-color: var(--primary, #667eea);
}

.competition-filter select:focus {
    outline: none;
    border-color: var(--primary, #667eea);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Current Team Highlight in Match Row */
.match-row .team.current-team .team-name {
    font-weight: 600;
    color: #ffffff;
}

.team-page .team-link {
    color: #ffffff;
    text-decoration: none;
}

.team-page .team-link:visited {
    color: #ffffff;
    text-decoration: none;
}

.team-page .match-row .team-name {
    color: #ffffff;
}

.team-page .team-name.team-loser {
    color: #b0b7c3;
}

/* Result Indicator */
.result-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.result-indicator.result-win {
    background: #22c55e;
    color: white;
}

.result-indicator.result-loss {
    background: #ef4444;
    color: white;
}

.result-indicator.result-draw {
    background: #6b7280;
    color: white;
}

/* Standings - Highlighted Team */
.table-row.highlighted-team {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-left: 3px solid var(--primary, #667eea);
    font-weight: 600;
}

.table-row.highlighted-team .table-team {
    color: #ffffff;
}

/* Date Block */
.date-block {
    margin-bottom: 8px;
}

.date-block:last-child {
    margin-bottom: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .competition-filter {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .competition-filter label {
        font-size: 13px;
    }

    .competition-filter select {
        max-width: 100%;
        padding: 10px 12px;
    }

    .team-hero .team-logo-wrapper {
        width: 60px;
        height: 60px;
    }

    .result-indicator {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .team-hero .team-logo-wrapper {
        width: 50px;
        height: 50px;
        padding: 6px;
    }
}

/* ============================================================================
   DARK MODE
   ============================================================================ */
@media (prefers-color-scheme: dark) {
    .competition-filter {
        background: var(--surface-dark, #1e1e1e);
    }

    .competition-filter label {
        color: var(--text-secondary-dark, #999);
    }

    .competition-filter select {
        background: var(--surface-dark, #1e1e1e);
        border-color: var(--border-dark, #333);
        color: var(--text-primary-dark, #e0e0e0);
    }

    .competition-filter select:hover,
    .competition-filter select:focus {
        border-color: var(--primary, #667eea);
    }

    .table-row.highlighted-team {
        background: linear-gradient(90deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.15) 100%);
    }

    .match-row .team.current-team .team-name {
        color: #ffffff;
    }

    .table-row.highlighted-team .table-team {
        color: #ffffff;
    }

    .team-page .team-name.team-loser {
        color: #b0b7c3;
    }
}

/* Manual dark mode class */
body.dark-mode .competition-filter,
.dark .competition-filter {
    background: var(--surface-dark, #1e1e1e);
}

body.dark-mode .competition-filter label,
.dark .competition-filter label {
    color: var(--text-secondary-dark, #999);
}

body.dark-mode .competition-filter select,
.dark .competition-filter select {
    background: var(--surface-dark, #1e1e1e);
    border-color: var(--border-dark, #333);
    color: var(--text-primary-dark, #e0e0e0);
}

body.dark-mode .table-row.highlighted-team,
.dark .table-row.highlighted-team {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.15) 100%);
}

body.dark-mode .match-row .team.current-team .team-name,
.dark .match-row .team.current-team .team-name {
    color: #818cf8;
}

body.dark-mode .table-row.highlighted-team .table-team,
.dark .table-row.highlighted-team .table-team {
    color: #ffffff;
}
