
/* Match the links in TBBAthlete's results tables. */
a.tbb-data-link,
a.tbb-data-link:visited {
    color: #111;
    font-weight: 750;
    text-decoration: underline;
    text-decoration-color: #bbb;
    text-underline-offset: 3px;
}
a.tbb-data-link:hover,
a.tbb-data-link:focus-visible {
    color: #111;
    text-decoration-color: #111;
}


/* Results presentation shared with TBBResults and TBBAthlete. Scoped to the view. */
.tbb-results-module {
    --tbb-results-ink: #111;
    --tbb-results-muted: #888;
    --tbb-results-line: #e8e4de;
    --tbb-results-paper: #f8f7f5;
    color: #222;
    font-family: Lato, "Segoe UI", Arial, sans-serif;
}
.tbb-results-module * { box-sizing: border-box; }
.tbb-results-module .tbb-results-filters {
    display: grid; grid-template-columns: 140px minmax(0, 1fr);
    align-items: center; gap: .65rem 1rem; margin-bottom: 1.5rem;
}
.tbb-results-module .tbb-results-filters > * { width: 100%; max-width: none; float: none; padding: 0; }
.tbb-results-module .tbb-results-filters > span { color: #666; font-size: 12px; font-weight: 700; }
.tbb-results-module .tbb-results-filters input,
.tbb-results-module .tbb-results-filters select {
    min-height: 40px; padding: 8px 10px; border: 1px solid var(--tbb-results-line);
    border-radius: 0; background: #fff; color: var(--tbb-results-ink); font: inherit;
}
.tbb-results-module .tbb-results-heading {
    display: flex; align-items: baseline; gap: 14px; margin: 1.5rem 0 10px;
    padding-bottom: 8px; border-bottom: 2px solid var(--tbb-results-ink);
    color: var(--tbb-results-muted); font-family: "PT Serif", Georgia, serif;
    font-size: 20px; font-style: italic; font-weight: 400;
}
.tbb-results-module .tbb-results-tag {
    flex: 0 0 auto; padding: 3px 10px; background: var(--tbb-results-ink); color: #fff;
    font-family: "PT Mono", Consolas, monospace; font-size: 12px;
    font-style: normal; letter-spacing: .05em; text-transform: uppercase;
}
.tbb-results-module .tbb-results-scroll { width: 100%; overflow-x: auto; margin-bottom: 1.5rem; }
.tbb-results-module .tbb-results-scroll:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
.tbb-results-module .tbb-results-grid { width: 100%; min-width: 660px; border: 0; border-collapse: collapse; }
.tbb-results-module .tbb-results-grid caption {
    caption-side: top; padding: 0 0 8px; margin-bottom: 10px; border-bottom: 2px solid #111;
    color: #888; font: italic 20px "PT Serif", Georgia, serif; text-align: left;
}
.tbb-results-module .tbb-results-grid th {
    padding: 8px 10px; border: 0; border-bottom: 1px solid var(--tbb-results-line);
    color: var(--tbb-results-muted); font-family: Lato, "Segoe UI", Arial, sans-serif;
    font-size: 10px; font-weight: 700; letter-spacing: .18em; line-height: 1.2;
    text-align: center; text-transform: uppercase; white-space: nowrap;
}
.tbb-results-module .tbb-results-grid td {
    padding: 13px 10px; border: 0; color: #444; font: 14px "PT Mono", Consolas, monospace;
    text-align: center; vertical-align: middle; white-space: nowrap;
}
.tbb-results-module .tbb-results-grid tr:has(td) { border-bottom: 1px solid var(--tbb-results-line); }
.tbb-results-module .tbb-results-grid tr:has(td):last-child { border-bottom: 0; }
.tbb-results-module .tbb-results-grid tr:has(td):hover { background: var(--tbb-results-paper); }
.tbb-rankings-module .tbb-results-grid th:nth-child(2),
.tbb-rankings-module .tbb-results-grid td:nth-child(2) { text-align: left; min-width: 160px; white-space: normal; overflow-wrap: anywhere; }
.tbb-rankings-module .tbb-results-grid td:nth-child(2) { color: #111; font: 700 14px/1.35 Lato, "Segoe UI", Arial, sans-serif; }
.tbb-rankings-module .tbb-results-grid td:nth-child(7),
.tbb-rankings-module .rankings td:nth-child(8) { color: #111; font: 700 16px "PT Serif", Georgia, serif; }
.tbb-records-module .tbb-record-actions input { padding: 10px 18px; border: 1px solid #111; background: #111; color: #fff; font: 700 12px Lato, "Segoe UI", Arial, sans-serif; cursor: pointer; }
.tbb-records-module .tbb-record-categories { width: 100%; border: 0; border-collapse: collapse; }
.tbb-records-module .tbb-record-categories > tbody > tr > td { padding: 0 0 1rem; border: 0; }
.tbb-records-module .tbb-record-header,
.tbb-records-module .tbb-record-row { display: grid; grid-template-columns: 44px 80px minmax(150px, 1.4fr) 110px minmax(130px, 1fr); align-items: baseline; gap: 10px; }
.tbb-records-module .tbb-record-header { padding: 8px 10px; border-bottom: 1px solid var(--tbb-results-line); color: #888; font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.tbb-records-module .tbb-record-row { padding: 13px 10px; border-bottom: 1px solid var(--tbb-results-line); color: #444; font: 14px "PT Mono", Consolas, monospace; }
.tbb-records-module .tbb-record-row:last-child { border-bottom: 0; }
.tbb-records-module .tbb-record-row:hover { background: var(--tbb-results-paper); }
.tbb-records-module .tbb-record-athlete { color: #111; font: 700 14px/1.35 Lato, "Segoe UI", Arial, sans-serif; overflow-wrap: anywhere; }
.tbb-records-module .tbb-record-weight { color: #111; font: 700 16px "PT Serif", Georgia, serif; }
.tbb-records-module .tbb-record-event { white-space: normal; overflow-wrap: anywhere; font-size: 12px; }
.tbb-records-module .tbb-record-history { margin-bottom: 1.5rem; padding: 1rem; border: 1px solid var(--tbb-results-line); overflow-x: auto; }
.tbb-records-module .tbb-record-history h3 { margin: 0 0 1rem; color: #888; font: italic 20px "PT Serif", Georgia, serif; }
.tbb-records-module .tbb-record-history-table th,
.tbb-records-module .tbb-record-history-table td { text-align: left; }
.tbb-records-module .tbb-record-history-table td:nth-child(2) { color: #111; font: 700 16px "PT Serif", Georgia, serif; }
.tbb-records-module .tbb-record-history-table td:nth-child(3) { font: 700 14px/1.35 Lato, "Segoe UI", Arial, sans-serif; }
@media (max-width: 767px) {
    .tbb-results-module .tbb-results-filters { grid-template-columns: 1fr; gap: .4rem; }
    .tbb-results-module .tbb-results-filters > span:not(:first-child) { margin-top: .5rem; }
    .tbb-records-module .tbb-record-header { display: none; }
    .tbb-records-module .tbb-record-row { grid-template-columns: 56px minmax(0, 1fr); gap: 5px 12px; }
    .tbb-records-module .tbb-record-lift { grid-column: 1; grid-row: 1; color: #888; font-size: 11px; }
    .tbb-records-module .tbb-record-weight { grid-column: 1; grid-row: 2; }
    .tbb-records-module .tbb-record-athlete { grid-column: 2; grid-row: 1; }
    .tbb-records-module .tbb-record-date { grid-column: 2; grid-row: 2; font-size: 12px; }
    .tbb-records-module .tbb-record-event { grid-column: 2; grid-row: 3; color: #888; }
}


/* Keep each filter label attached to its control, without Bootstrap column widths. */
.tbb-results-module .tbb-results-filters {
    grid-template-columns: 110px minmax(0, 1fr);
    max-width: 680px; padding: 14px 16px; background: #f8f7f5;
    border: 1px solid #e8e4de;
}
.tbb-results-module .tbb-results-filters > label {
    margin: 0; padding: 0; color: #666; font-size: 12px; font-weight: 700;
}
.tbb-results-module .tbb-results-filters input,
.tbb-results-module .tbb-results-filters select { margin: 0; min-width: 0; }
.tbb-results-module .tbb-results-filters input:focus-visible,
.tbb-results-module .tbb-results-filters select:focus-visible {
    outline: 2px solid #111; outline-offset: 2px;
}
@media (max-width: 560px) {
    .tbb-results-module .tbb-results-filters { grid-template-columns: 1fr; padding: 12px; }
    .tbb-results-module .tbb-results-filters > label:not(:first-child) { margin-top: 8px; }
}
.tbb-rankings-module .tbb-results-heading { margin-top: 2.5rem; }
.tbb-rankings-module .tbb-results-grid td:nth-child(1) { color: #888; font-size: 12px; }
