/* ==========================================================================
   AFVData – Frontend Styles
   ========================================================================== */

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

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

table.afvdata-league-table th {
    background-color: var(--afvdata-header-bg, #333);
    color: var(--afvdata-header-text, #fff);
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
}

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

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

/* --- Highlighting --- */

table.afvdata-league-table td.afvdata-highlight {
    font-weight: bold;
}

table.afvdata-league-table tr.afvdata-highlight td {
    font-weight: bold;
    background-color: var(--afvdata-highlight-bg);
}

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

.afvdata-league-table .afvdata-num {
    font-size: 0.9em;
    font-variant-numeric: tabular-nums;
}

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

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

/* --- Disclaimer --- */

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

span.afvdata-disclaimer a {
    color: #999;
}

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

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

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

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

    table.afvdata-schedule-table,
    table.afvdata-schedule-table thead,
    table.afvdata-schedule-table tbody,
    table.afvdata-schedule-table tr,
    table.afvdata-schedule-table th,
    table.afvdata-schedule-table td {
        display: block;
    }

    table.afvdata-schedule-table {
        text-align: right;
    }

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

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

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

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

    .afvdata-nomobile {
        display: none;
    }
}
