/* ---- Einsätze (tab-schedule.js) ---- */
.schedule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media(max-width: 479px) { .schedule-grid { grid-template-columns: 1fr; } }
/* Karte je Fahrer in Fahrerfarbe (--rc); aktiver Fahrer pulsiert, Play-Spalte rechts nur neben dem laufenden Block */
.schedule-card { border: 2px solid var(--rc); background: color-mix(in srgb, var(--rc) 15%, transparent);
                 margin-bottom: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.schedule-card.is-pulsing { border-width: 4px; }
.schedule-body { display: flex; flex: 1; }
.schedule-main { flex: 1; padding: 6px 12px 12px; min-width: 0; }
/* Status-Abschnitt als Zeile bis an den rechten/oberen Kartenrand (Padding von .schedule-main aufheben),
   damit die Play-Spalte bündig bis zur Trennlinie (bzw. zum Kartenende) reicht */
.schedule-status-row { display: flex; margin: -6px -12px 0 0; }
.schedule-status-row:last-child { margin-bottom: -12px; }
.schedule-status { flex: 1; min-width: 0; font-size: 13px; padding: 6px 12px 6px 0; }
.schedule-status-row:last-child .schedule-status { padding-bottom: 12px; }
.schedule-status .hint { margin-top: 2px; }
.schedule-progress .live-lap-icons { margin-top: 0; }
.schedule-progress .lucide-icon { width: 20px; height: 20px; }
.schedule-divider { border-top: 1px solid var(--rc); margin: 0 -12px 6px; }
.schedule-section { margin-bottom: 2px; }
/* Weitere/Bisherige Einsätze: Kopf als Klapp-Button über die ganze Breite bis zum Kartenrand (44 px Touch-Höhe) */
.schedule-section-toggle { display: flex; align-items: center; justify-content: space-between; width: calc(100% + 12px);
  min-height: 44px; margin: -6px -12px 0 0; padding: 0 12px 0 0; background: none; border: none; color: inherit; cursor: pointer; text-align: left; }
.schedule-section-toggle .msym { width: 20px; height: 20px; color: var(--md-sys-color-on-surface-variant); }
.schedule-section-count { display: none; }
.schedule-collapsible.collapsed .schedule-section-count { display: inline; }
.schedule-collapsible.collapsed .schedule-section-body { display: none; }
.schedule-collapsible.collapsed .schedule-section-toggle { margin-bottom: -6px; }
.schedule-collapsible.collapsed .schedule-section-toggle .msym { transform: rotate(180deg); }
.schedule-history { font-size: 11px; color: var(--md-sys-color-on-surface-variant); }
.schedule-play { width: 20%; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
                 background: color-mix(in srgb, var(--rc) 31%, transparent); }
.schedule-play .msym { width: 28px; height: 28px; }
.schedule-later { list-style: none; font-size: 12px; margin-bottom: 6px; }
.schedule-later li { padding: 4px 0; }
/* gestrichelte Linie zwischen den weiteren Einsätzen, in Fahrerfarbe wie die Trennlinien */
.schedule-later li + li { border-top: 1px dashed var(--rc); }
#scheduleList .lap-chip { height: 18px; font-size: 11px; padding: 0 6px; }
/* Einsatz-Zeile wie ein Block im Plan (Normalgröße): Start/Ende mit Rahmen in Fahrerfarbe,
   Rennende weiß, Sonnen-Chips in ihrer Farbe umrandet; bricht bei Bedarf um */
.schedule-stint.is-after-end > :not(.after-end-badge) { opacity: .5; }
.schedule-stint { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 2px; }
.schedule-stint .lap-time-chip-block { border: 2px solid var(--rc); }
.schedule-stint .slot-pos { width: 24px; height: 24px; font-size: 11px; }
/* Bisherige Einsätze: alle Kreise ✓/✕ des Blocks dicht beieinander, danach die Dauern */
.schedule-done-icons { display: inline-flex; align-items: center; gap: 2px; }
.schedule-done-icons .lucide-icon { width: 18px; height: 18px; }
/* Dauern als Fließtext „42:10, ca. 41:55“ (kein Flex-Abstand vor dem Komma) */
.schedule-done-durs .official-time { vertical-align: middle; }
.schedule-stint { font-variant-numeric: tabular-nums; }
/* Wellenlinie zwischen erster und letzter Rennrunde; rückt an beide Kreise heran (gap der Zeile aufheben) */
.race-lap-wave { display: inline-flex; color: var(--md-sys-color-on-surface-variant); margin: 0 -2px; }
.schedule-stint .race-end-chip { border: 2px solid #fff; }
.schedule-stint .sun-chip-rise, .schedule-stint .sun-chip-set { border: 2px solid currentColor; }
/* kleiner, hinter der Rundenzahl */
#scheduleList .lights-badge, #scheduleList .start-lap-badge { width: 18px; height: 18px; margin-left: 4px; }
#scheduleList .schedule-stint .lights-badge, #scheduleList .schedule-stint .start-lap-badge { margin-left: 0; }
#scheduleList .lights-badge svg, #scheduleList .start-lap-badge svg { width: 12px; height: 12px; }
/* Kopfzeile über die ganze Kartenbreite (auch über der Play-Spalte): Name links,
   Geräte-Status rechtsbündig. Der Name behält seine Breite,
   die Beschriftung bekommt nur den Rest und blendet aus. */
.schedule-head { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; padding: 0 12px; min-height: 48px; border-bottom: 1px solid var(--rc); }
.schedule-rider-name { flex: 0 1 auto; min-width: 0; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Fahrer-Handys: registriert · online · Push (registriert wird in der Ansicht Ich) */
.rider-devices { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: -4px 0 6px -12px; font-size: 13px; }
.rider-devices-stats { display: inline-flex; align-items: center; gap: 3px; color: var(--md-sys-color-on-surface-variant); font-size: 12px; white-space: nowrap; }
.rider-devices-stats .msym { margin-left: 6px; }
.rider-devices-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--md-sys-color-on-surface-variant); opacity: .5; margin-left: 8px; }
.rider-devices-dot.on { background: var(--md-sys-color-primary); opacity: 1; }
/* Reicht der Platz neben Name und Rundenchip nicht (langer Name, Karoo), rutscht der Block rechtsbündig in eine zweite Zeile */
.schedule-head .rider-devices { flex: 1 0 auto; margin: 0 0 0 auto; justify-content: flex-end; }
.schedule-head .rider-devices-stats { flex-shrink: 0; }
/* Gekoppelter Karoo: Akku-Symbol + Prozent + Punkt (erreichbar); nicht erreichbar gedimmt, unter 20 % rot */
.karoo-badge { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; font-size: 12px; white-space: nowrap;
  color: var(--md-sys-color-on-surface-variant); font-variant-numeric: tabular-nums; }
.karoo-badge .lucide-icon { width: 18px; height: 18px; color: currentColor; }
.karoo-badge .rider-devices-dot { margin-left: 4px; }
.karoo-badge.is-online .rider-devices-dot { background: var(--md-sys-color-primary); opacity: 1; }
.karoo-badge:not(.is-online) { opacity: .5; }
.karoo-badge.is-low { color: var(--md-sys-color-error); }
/* Deaktivierter Fahrer – Karteninhalt gedimmt, großes square-pause mittig darüber */
.schedule-disabled { position: relative; }
.schedule-disabled > :not(.schedule-disabled-overlay) { opacity: .4; }
.schedule-disabled-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
                             pointer-events: none; color: var(--md-sys-color-on-surface); }
.schedule-disabled-overlay .lucide-status-icon { width: 64px; height: 64px; opacity: .85; color: inherit; }
/* Auswahl Alle / Meine / Meine (alle Teams) über den Karten */
.schedule-scope { margin-bottom: 8px; }
/* „Meine (alle Teams)“: Überschrift je Team über die ganze Rasterbreite */
.schedule-team-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-weight: 700; font-size: 14px; }
.schedule-team-head:first-child { margin-top: 0; }
.schedule-team-wide { grid-column: 1 / -1; padding: 12px 0; }
