/* ==========================================================================
   ESTILOS DA TAXONOMIA DE LIGAS (taxonomy-liga.css)
   ========================================================================== */

.league-layout-container {
    max-width: var(--content-w-lg);
    margin: 0 auto 50px auto;
    width: 100%;
}

/* --- NAVEGAÇÃO POR ABAS (TABS NAV) --- */
.league-tabs-nav {
    display: flex;
    gap: 12px;
    max-width: var(--content-w-lg);
    margin: 0 auto 30px auto;
    width: 100%;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.league-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    outline: none;
}

.league-tab-btn .tab-icon {
    transition: transform 0.25s ease;
}

/* Efeitos de Hover */
.league-tab-btn:hover {
    color: var(--text-main);
    border-color: var(--secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.league-tab-btn:hover .tab-icon {
    transform: scale(1.1);
}

/* Estado Ativo (Selecionado) */
.league-tab-btn.active {
    background-color: var(--primary);
    color: var(--text-on-primary);
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.25);
}

.league-tab-btn.active .tab-icon {
    transform: scale(1.05);
}

/* --- CONTEÚDO DAS ABAS (TABS CONTENT) --- */
.league-tab-content {
    display: none;
    width: 100%;
    animation: ligaFadeEffect 0.35s ease;
}

.league-tab-content.active {
    display: block;
}

@keyframes ligaFadeEffect {
    from { 
        opacity: 0; 
        transform: translateY(8px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* --- CARD DE CLASSIFICAÇÃO E JOGOS --- */
.liga-table-card,
.liga-fixtures-card {
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.03);
    margin-bottom: 30px;
}

.liga-table-title,
.liga-fixtures-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    margin: 0 0 20px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.liga-table-title::after,
.liga-fixtures-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 45px;
    height: 2px;
    background-color: var(--primary);
}

/* --- TABELA DE CLASSIFICAÇÃO NATIVA --- */
.liga-table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.liga-standings-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.liga-standings-table th {
    padding: 14px 16px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.liga-standings-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

.liga-standings-table tbody tr:last-child td {
    border-bottom: none;
}

.liga-standings-table tbody tr {
    transition: background-color 0.2s ease;
}

.liga-standings-table tbody tr:hover {
    background-color: rgba(var(--primary-rgb), 0.02);
}

/* Alinhamento e tamanhos das colunas */
.col-rank {
    width: 50px;
    text-align: center;
    font-weight: 700;
    color: var(--text-muted);
}

.col-team {
    min-width: 200px;
}

.col-points {
    font-weight: 700;
    text-align: center;
    width: 60px;
}

.col-played, .col-wins, .col-draws, .col-losses, .col-gd {
    text-align: center;
    width: 55px;
}

.col-form {
    width: 160px;
    text-align: center;
}

/* Time info e badge */
.team-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-badge {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.team-name {
    font-weight: 600;
}

/* Indicadores de Forma (Últimos Jogos) */
.form-indicators {
    display: inline-flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.form-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.form-win {
    background-color: #2e7d32; /* Verde esmeralda */
}

.form-draw {
    background-color: #f57c00; /* Laranja */
}

.form-loss {
    background-color: #d32f2f; /* Vermelho */
}

/* --- LISTA DE JOGOS E RODADAS --- */
.fixtures-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Sub-navegação interna (Próximos / Resultados) */
.fixtures-sub-nav {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.fixture-sub-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 8px 16px;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.fixture-sub-btn:hover {
    color: var(--text-main);
}

.fixture-sub-btn::after {
    content: '';
    position: absolute;
    bottom: -13px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.fixture-sub-btn.active {
    color: var(--primary);
}

.fixture-sub-btn.active::after {
    transform: scaleX(1);
}

/* Sub-conteúdos */
.fixtures-sub-content {
    display: none;
    animation: ligaFadeEffect 0.3s ease;
}

.fixtures-sub-content.active {
    display: block;
}

/* Lista de Partidas */
.fixtures-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fixture-row {
    background: rgba(var(--primary-rgb), 0.01);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.fixture-row:hover {
    border-color: rgba(var(--primary-rgb), 0.25);
    background: rgba(var(--primary-rgb), 0.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.015);
}

.fixture-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    min-width: 150px;
}

.fixture-matchup {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    gap: 20px;
}

.team-home, .team-away {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 42%;
}

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

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

.team-home .team-badge, .team-away .team-badge {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.team-home .team-name, .team-away .team-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.fixture-status {
    min-width: 60px;
    text-align: center;
}

.vs-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    background: var(--border-color);
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.fixture-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 80px;
}

.score-num {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.score-separator {
    font-weight: 700;
    color: var(--text-muted);
}

.no-fixtures-msg {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
}

/* ==========================================================================
   RESPONSIVIDADE (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 768px) {
    .league-tabs-nav {
        gap: 8px;
        padding-bottom: 8px;
        margin-bottom: 20px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-left: 2px;
        padding-right: 2px;
    }

    .league-tab-btn {
        padding: 8px 16px;
        font-size: 0.82rem;
        flex-shrink: 0;
    }

    .liga-table-card,
    .liga-fixtures-card {
        padding: 20px;
        border-radius: 12px;
    }

    .hide-mobile {
        display: none !important;
    }

    .fixture-row {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        align-items: center;
        text-align: center;
    }

    .fixture-date {
        min-width: auto;
        text-align: center;
    }

    .fixture-matchup {
        width: 100%;
        gap: 10px;
    }

    .team-home, .team-away {
        width: 45%;
        flex-direction: column;
        gap: 8px;
        align-items: center;
        text-align: center;
        justify-content: center;
    }

    .team-home .team-name, .team-away .team-name {
        font-size: 0.85rem;
    }

    .team-home .team-badge, .team-away .team-badge {
        width: 28px;
        height: 28px;
    }

    .fixture-status {
        min-width: 40px;
    }

    .fixture-score {
        min-width: 60px;
        gap: 4px;
    }

    .score-num {
        font-size: 1.15rem;
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .liga-table-card,
    .liga-fixtures-card {
        padding: 15px;
        border-radius: 8px;
    }
}
