/* ==========================================================================
   Gridirontables AFVD – Frontend Styles
   ========================================================================== */

/* --- League Table (Standings + Schedule) --- */

table.gridirontables_afvd_league_table {
    width: 100%;
    border-collapse: collapse;
    font-family: inherit;
    margin-bottom: 0;
}

table.gridirontables_afvd_league_table th {
    background-color: var(--gridirontables_afvd_header_bg, #333);
    color: var(--gridirontables_afvd_header_text, #fff);
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
}

table.gridirontables_afvd_league_table td {
    background-color: #fff;
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
}

table.gridirontables_afvd_league_table .odd td {
    background-color: #f5f5f5;
}

/* --- Highlighting --- */

table.gridirontables_afvd_league_table td.gridirontables_afvd_highlight {
    font-weight: bold;
}

table.gridirontables_afvd_league_table tr.gridirontables_afvd_highlight td {
    font-weight: bold;
    background-color: var(--gridirontables_afvd_highlight_bg);
}

/* --- Numeric columns --- */

.gridirontables_afvd_league_table .gridirontables_afvd_num {
    font-size: 0.9em;
    font-variant-numeric: tabular-nums;
}

/* --- Group header --- */

span.gridirontables_afvd_group_header {
    font-weight: bold;
    display: block;
    padding: 10px 0;
}

/* --- Disclaimer --- */

span.gridirontables_afvd_disclaimer {
    font-size: 0.75em;
    color: #aaa;
    display: block;
    margin-top: 6px;
}

span.gridirontables_afvd_disclaimer a {
    color: #999;
}

/* --- Error (editors only) --- */

p.gridirontables_afvd_error {
    color: #dc3232;
    background: #fef7f7;
    border-left: 4px solid #dc3232;
    padding: 8px 12px;
}

/* ==========================================================================
   Responsive: Mobile Schedule Table
   ========================================================================== */

@media all and (max-width: 640px) {

    table.gridirontables_afvd_schedule_table,
    table.gridirontables_afvd_schedule_table thead,
    table.gridirontables_afvd_schedule_table tbody,
    table.gridirontables_afvd_schedule_table tr,
    table.gridirontables_afvd_schedule_table th,
    table.gridirontables_afvd_schedule_table td {
        display: block;
    }

    table.gridirontables_afvd_schedule_table {
        text-align: right;
    }

    table.gridirontables_afvd_schedule_table thead {
        position: absolute;
        left: -9999px;
        top: -9999px;
    }

    table.gridirontables_afvd_schedule_table tr {
        margin-bottom: 10px;
        border: 1px solid #ddd;
    }

    table.gridirontables_afvd_schedule_table td {
        position: relative;
        padding-left: 50%;
        text-align: right;
    }

    table.gridirontables_afvd_schedule_table td::before {
        content: attr(data-label) ":";
        position: absolute;
        left: 10px;
        font-weight: bold;
        text-align: left;
    }

    .gridirontables_afvd_nomobile {
        display: none;
    }
}
