/* dash-race-tiles.css: styles for the race tiles in js/dash-race-tiles.js (race-tiles agent).
 * Everything is scoped under rt- classes. */

/* dash.css `.dc > * { flex: none }` beats .dt-body's flex: let the body fill the tile so lists scroll inside it */
.dx-grid > [data-tile^="rt"] > .dt-body { flex: 1 1 auto; }

/* Readiness */
.rt-ready { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.rt-ready li { display: grid; grid-template-columns: 1.6em 1fr; column-gap: 8px; align-items: baseline; }
.rt-ready i { font-style: normal; font-weight: 700; text-align: center; color: var(--text-3); }
.rt-ready b { font-size: 1.15em; }
.rt-ready span { grid-column: 2; color: var(--text-3); font-size: var(--fs-small); }
.rt-ready .is-ok i { color: var(--dx-good); }
.rt-ready .is-warn i, .rt-ready .is-wait i { color: var(--warn); }
.rt-ready .is-bad i, .rt-ready .is-bad b { color: var(--crit); }

/* Schedule: the list may scroll inside the tile, as timing does */
.rt-sched { list-style: none; margin: 0; padding: 0; overflow-y: auto; min-height: 0; flex: 1 1 auto; }
.rt-sched li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.rt-sched li:last-child { border-bottom: 0; }
.rt-sched li[hidden] { display: none; }
.rt-pill { font-size: var(--fs-small); font-weight: 700; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--text-3); min-width: 4.6em; text-align: center; }
.rt-live .rt-pill { background: var(--accent); border-color: var(--accent); color: var(--panel); }
.rt-frozen .rt-pill { border-color: var(--warn); color: var(--warn); }
.rt-next .rt-pill { border-color: var(--accent); color: var(--accent); }
.rt-num { color: var(--text-3); font-variant-numeric: tabular-nums; }
.rt-num::before { content: '#'; }
.rt-drv { font-weight: 600; display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.rt-drv i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rt-wet { font-size: var(--fs-small); font-weight: 700; color: var(--info); border: 1px solid var(--info); border-radius: 4px; padding: 0 5px; }
.rt-laps, .rt-end { color: var(--text-3); font-variant-numeric: tabular-nums; }
.rt-laps { margin-left: auto; }
.rt-tire { flex-basis: 100%; padding-left: calc(4.6em + 14px); font-size: var(--fs-small); color: var(--text-3); }

/* Borrowed Classic panels: fill the tile, drop the card chrome and the long print */
.rt-borrow { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.rt-borrow > * { margin: 0 !important; border: 0 !important; padding: 0 !important; background: none !important; box-shadow: none !important; min-height: 0; flex: none; }   /* responsive: race — don't let borrowed panels shrink into each other; the tile scrolls */

.rt-rivals .cut-title, .rt-rivals .pe-head { display: none; }   /* the tile is titled If we box now */
.rt-rivals .cut-cards { margin-top: 4px; gap: 6px; }
.rt-rivals .cut-card { padding: 6px 8px; }
.rt-rivals .pe-big, .rt-rivals .cut-rec { font-size: 1em; }
.rt-rivals .pf-card { flex: 1 1 auto; overflow-y: auto; }
.rt-rivals .pf-card ul { margin: 0; padding-left: 0; list-style: none; }

.rt-wx .wx-chart { flex: 1 1 0; min-height: 0; width: 100%; height: 100%; border: 0; }
.rt-wx > * { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; }
.rt-wx .wx-note { display: none; }
.rt-wx[data-size="M"] .wx-legend, .rt-wx[data-size="M"] .wx-now { display: none; }

.rt-rates .measured-line { margin-bottom: 4px !important; }
.rt-rivals #pitExitCard details.explain { display: none; }   /* its reasons live in the undercut fold */

/* Brakes tile (dash-race-tiles.js brakeTile): Advanced's per-wheel table. */
.rt-brake-do { margin: 4px 0 0; font-weight: 600; }
.rt-brakes { width: 100%; border-collapse: collapse; margin-top: 6px; font: 12px var(--dx-mono); font-variant-numeric: tabular-nums; }
.rt-brakes th, .rt-brakes td { padding: 1px 4px; text-align: right; white-space: nowrap; }
.rt-brakes tbody th { text-align: left; font-weight: 500; color: var(--text-3); }
.rt-brake-src { margin: 4px 0 0; font-size: 12px; color: var(--text-3); }
