/**
 * League Table Styles
 * Common styles for all league tables across the site
 * Used by: table.php, match.php, season.php
 */

/* League Table Container */
.league-table {
    max-width: 700px;
    margin: 0 auto;
}

/* League Table Base Styles */
.league-standings-table,
.league_table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin-bottom: 3rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    overflow: hidden;
}

/* Table Headers */
.league-standings-table th,
.league_table th {
    background: #000000;
    color: #ffffff;
    padding: 0.8rem 0.8rem;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Table Cells */
.league-standings-table td,
.league_table td {
    padding: 0.8rem;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
    vertical-align: middle;
    font-family: var(--font-primary);
}

/* Column 1: Position (8%) */
.league-standings-table th:nth-child(1),
.league-standings-table td:nth-child(1),
.league_table th:nth-child(1),
.league_table td:nth-child(1) {
    width: 8%;
}

/* Column 2: Team Name (35%) */
.league-standings-table th:nth-child(2),
.league-standings-table td:nth-child(2),
.league_table th:nth-child(2),
.league_table td:nth-child(2) {
    width: 35%;
    min-width: 150px;
    text-align: left;
}

/* Columns 3-10: Stats (7% each) */
.league-standings-table th:nth-child(3),
.league-standings-table th:nth-child(4),
.league-standings-table th:nth-child(5),
.league-standings-table th:nth-child(6),
.league-standings-table th:nth-child(7),
.league-standings-table th:nth-child(8),
.league-standings-table th:nth-child(9),
.league-standings-table th:nth-child(10),
.league-standings-table td:nth-child(3),
.league-standings-table td:nth-child(4),
.league-standings-table td:nth-child(5),
.league-standings-table td:nth-child(6),
.league-standings-table td:nth-child(7),
.league-standings-table td:nth-child(8),
.league-standings-table td:nth-child(9),
.league-standings-table td:nth-child(10),
.league_table th:nth-child(3),
.league_table th:nth-child(4),
.league_table th:nth-child(5),
.league_table th:nth-child(6),
.league_table th:nth-child(7),
.league_table th:nth-child(8),
.league_table th:nth-child(9),
.league_table th:nth-child(10),
.league_table td:nth-child(3),
.league_table td:nth-child(4),
.league_table td:nth-child(5),
.league_table td:nth-child(6),
.league_table td:nth-child(7),
.league_table td:nth-child(8),
.league_table td:nth-child(9),
.league_table td:nth-child(10) {
    width: 7%;
}

/* Team Name Styling */
.league-standings-table td:nth-child(2),
.league_table td:nth-child(2) {
    text-transform: capitalize;
}

/* Row Hover Effects */
.league-standings-table tbody tr:hover,
.league_table tbody tr:hover {
    background: #f8f8f8;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

.league-standings-table tr:last-child td,
.league_table tr:last-child td {
    border-bottom: none;
}

/* Position Box Styling */
.position-box {
    display: inline-block;
    padding: 4px 0;
    border-radius: 2px;
    min-width: 28px;
    text-align: center;
    color: white;
}

/* RBBFC Team Row Styling */
.rbbfc-team-row {
    background: #f8f8f8;
    font-weight: normal !important;
}

.rbbfc-team-row:hover {
    background: #e8e8e8;
}

.rbbfc-team-row td {
    font-weight: normal !important;
}

/* Opposition Team Row Styling */
.opposition-team-row {
    background: #fff3e0;
    font-weight: normal !important;
}

.opposition-team-row:hover {
    background: #ffe0b2;
}

.opposition-team-row td {
    font-weight: normal !important;
}

/* Brussels British Team Row Highlight */
.league-standings-table tr.brussels-british-team,
.league_table tr.brussels-british-team {
    background-color: #f0f0f0;
}

/* Mobile Responsive Styles (600px and below) */
@media (max-width: 600px) {
    /* Position boxes smaller on mobile */
    .position-box {
        min-width: 21px !important;
    }

    /* Hide text on mobile (for GD -> D, PT -> T) */
    .hide-mobile {
        display: none;
    }

    /* Smaller table font */
    .league-standings-table,
    .league_table {
        font-size: 0.7rem;
    }

    /* Position column narrower */
    .league-standings-table th:nth-child(1),
    .league-standings-table td:nth-child(1),
    .league_table th:nth-child(1),
    .league_table td:nth-child(1) {
        width: 7%;
        padding: 0.4rem 0.1rem;
    }

    /* Team name column flexible with ellipsis */
    .league-standings-table th:nth-child(2),
    .league-standings-table td:nth-child(2),
    .league_table th:nth-child(2),
    .league_table td:nth-child(2) {
        width: 40%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Stat columns narrower */
    .league-standings-table th:nth-child(3),
    .league-standings-table th:nth-child(4),
    .league-standings-table th:nth-child(5),
    .league-standings-table th:nth-child(6),
    .league-standings-table th:nth-child(7),
    .league-standings-table th:nth-child(8),
    .league-standings-table th:nth-child(9),
    .league-standings-table th:nth-child(10),
    .league-standings-table td:nth-child(3),
    .league-standings-table td:nth-child(4),
    .league-standings-table td:nth-child(5),
    .league-standings-table td:nth-child(6),
    .league-standings-table td:nth-child(7),
    .league-standings-table td:nth-child(8),
    .league-standings-table td:nth-child(9),
    .league-standings-table td:nth-child(10),
    .league_table th:nth-child(3),
    .league_table th:nth-child(4),
    .league_table th:nth-child(5),
    .league_table th:nth-child(6),
    .league_table th:nth-child(7),
    .league_table th:nth-child(8),
    .league_table th:nth-child(9),
    .league_table th:nth-child(10),
    .league_table td:nth-child(3),
    .league_table td:nth-child(4),
    .league_table td:nth-child(5),
    .league_table td:nth-child(6),
    .league_table td:nth-child(7),
    .league_table td:nth-child(8),
    .league_table td:nth-child(9),
    .league_table td:nth-child(10) {
        width: 7%;
        padding: 0.4rem 0.1rem;
    }
}

