/**
 * Pre-Qualifier (v1.8.0)
 *
 * Intentionally thin. The board is a scoring table, so it wears the same
 * clothes as race results and standings: the markup carries .gt7-race-results,
 * .gt7-results-header, .gt7-results-table and the shared .gt7-col-* classes, so
 * results-display.css AND everything the admin configured under
 * Settings → Table Styling (header background, row colours, fonts, class badge
 * colours, meta text) already apply.
 *
 * Nothing here re-declares a colour or a font — that would be the one thing
 * guaranteed to drift out of sync the moment an admin changes a setting. What
 * lives here is only what is unique to a time-attack board.
 */

/* Header: the left-hand block inside the shared flex header. */
.gt7-results-header-main {
    min-width: 0;
}

/* -------------------------------------------------------------------------
   Lap / total / gap columns

   These reuse .gt7-col-fastest (the fastest-lap column on race results) for
   width, font family and colour. All that is added is digit alignment, so a
   column of lap times reads as a column rather than a ragged list.
   ------------------------------------------------------------------------- */
.gt7-prequal-table .gt7-col-lap,
.gt7-prequal-table .gt7-col-total,
.gt7-prequal-table .gt7-col-gap {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    white-space: nowrap;
}

/* The driver's single fastest counted lap. */
.gt7-prequal-table .gt7-prequal-best {
    font-weight: 700;
}

/* Gap sits one step back from the total it refers to. */
.gt7-prequal-table .gt7-col-gap {
    opacity: 0.8;
}

/* Drivers who haven't banked enough laps to be ranked yet — recessive, so the
   ranked field reads first, but still legible on light and dark themes. */
.gt7-prequal-table tr.gt7-prequal-incomplete td {
    opacity: 0.7;
    font-style: italic;
}

.gt7-prequal-pending {
    font-style: italic;
}

/* Narrow screens: .gt7-results-table-wrapper already scrolls, so only the least
   important column is dropped. */
@media (max-width: 782px) {
    .gt7-prequal-table .gt7-col-team {
        display: none;
    }
}

/* -------------------------------------------------------------------------
   Admin + staff-panel entry grid

   Not a front-end table — this one is deliberately plain so it reads like the
   rest of wp-admin rather than like the public board.
   ------------------------------------------------------------------------- */

.gt7-prequal-grid {
    width: 100%;
    border-collapse: collapse;
}

.gt7-prequal-grid th,
.gt7-prequal-grid td {
    padding: 6px 8px;
    border-bottom: 1px solid #ddd;
    text-align: left;
    font-size: 14px;
    vertical-align: middle;
}

.gt7-prequal-grid th {
    background: #f5f5f5;
    color: #222; /* explicit, so dark themes don't render light-on-light */
    white-space: nowrap;
}

.gt7-prequal-grid input.gt7-prequal-lap {
    width: 92px;
    padding: 5px 6px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.gt7-prequal-grid input.gt7-prequal-lap.gt7-prequal-bad {
    border: 2px solid #c00;
    background: #fff2f2;
}

.gt7-prequal-grid td.gt7-prequal-running {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
    font-weight: 600;
}

.gt7-prequal-grid tr.gt7-prequal-unregistered td {
    background: #fffbe6;
}

.gt7-prequal-status {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gt7-prequal-status-confirmed { color: #1a7a1a; font-weight: 700; }
.gt7-prequal-status-pending   { color: #a05a00; font-weight: 700; }
.gt7-prequal-status-withdrawn { color: #999; }
