/* SPDX-License-Identifier: AGPL-3.0-or-later · Sprint 239 · Repetición del recorrido */
.rb-main { max-width: 980px; margin: 0 auto; padding: 14px 16px 40px; }
.rb-sub { color: var(--muted); margin: 2px 0 12px; }
.rb-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 8px 0 12px; }
.rb-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.rb-form input { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); min-width: 140px; }
.rb-msg { min-height: 1.2em; color: var(--muted); }
.rb-map { height: min(60vh, 520px); min-height: 300px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.rb-map.rb-map-off { height: auto; min-height: 0; padding: 16px; }
.rb-train { font-size: 22px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.rb-hud { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0 6px; }
.rb-hud > div { border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; background: var(--panel); min-width: 0; }
.rb-hud small { display: block; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rb-hud b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-hud b.ok, .rb-stops b.ok { color: var(--green, #16a34a); } .rb-hud b.warn, .rb-stops b.warn { color: var(--amber, #d97706); } .rb-hud b.bad, .rb-stops b.bad { color: var(--red, #dc2626); }
.rb-ctl { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.rb-ctl input[type=range] { flex: 1; min-width: 0; }
.rb-ctl select { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.rb-play { flex: 0 0 auto; width: 56px; min-width: 56px; padding-left: 0; padding-right: 0; }
.rb-chart { width: 100%; height: 120px; display: block; cursor: pointer; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); margin: 6px 0 10px; }
.rb-stops ol { margin: 8px 0; padding-left: 22px; columns: 2; column-gap: 24px; }
.rb-stops li { break-inside: avoid; margin: 2px 0; }
.rb-note { font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) { .rb-hud { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rb-stops ol { columns: 1; } }

/* Sprint 242 · Por qué subió el retraso */
.rb-causes h2 { font-size: 18px; margin: 14px 0 8px; }
.rb-causes ol { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.rb-cause { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.rb-cause:hover, .rb-cause:focus-visible { border-color: var(--c); }
.rb-cause.rb-on { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, var(--panel)); box-shadow: 0 0 0 2px var(--c); }
.rb-cause { transition: background .2s, box-shadow .2s; }
/* el marcador del mapa ya usa transform para su posición: se resalta con contorno, no con escala */
.rb-mk.rb-on { outline: 3px solid #111; outline-offset: 2px; box-shadow: 0 0 0 5px rgba(255,255,255,.85), 0 2px 8px rgba(0,0,0,.5); z-index: 2; }
.rb-cn { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff; font-weight: 800; font-size: 12px; display: grid; place-items: center; }
.rb-ct { line-height: 1.45; }
.rb-mk { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; color: #fff; font: 800 11px/1 sans-serif; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.35); padding: 0; }
