/* SPDX-License-Identifier: GPL-3.0-or-later */
/* «Voy en tren» (sprint 075): vista de viajero y de quien espera. Usa las variables de styles.css y la base de anden.css */
.vtr-main { max-width: 760px; }
.vtr-eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.vtr-h { margin: 0; }
.vtr-route { margin: 4px 0 12px; color: var(--muted); font-size: 16px; }
.vtr-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 12px; }
.vtr-status > span { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 14px; }
.vtr-dl { font-weight: 800; }
.vtr-dl.green { color: var(--green); border-color: var(--green); }
.vtr-dl.amber { color: var(--amber); border-color: var(--amber); }
.vtr-dl.red { color: var(--err-fg); border-color: var(--red); }
.vtr-est { color: var(--muted); }
.vtr-wait { margin: 8px 0; color: var(--muted); }
.vtr-arr { padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--blue); margin: 0 0 12px; }
.vtr-arr-l { margin: 0; color: var(--muted); font-size: 14px; }
.vtr-arr-t { margin: 2px 0 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; font-size: 18px; }
.vtr-arr-t b { font-size: 34px; font-family: var(--mono); letter-spacing: -.02em; }
.vtr-arr-t s { color: var(--faint); font-family: var(--mono); }
.vtr-arr-t span { color: var(--text); font-weight: 700; }
.vtr-plat { margin: 4px 0 0; font-weight: 700; }
.vtr-map { height: 320px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; margin: 0 0 12px; }
.vtr-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.vtr-sel { flex: 1 1 100%; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.vtr-sel select { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 16px; padding: 0 10px; }
.vtr-share { margin: 14px 0 0; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.vtr-share .an-h2 { margin-top: 0; }
.vtr-share-in { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.vtr-qr { flex: 0 0 200px; width: 200px; height: 200px; border-radius: 10px; overflow: hidden; background: #fff; }
.vtr-qr svg { display: block; width: 100%; height: 100%; }
.vtr-share-b { flex: 1 1 260px; min-width: 0; }
.vtr-share-b > p { margin: 0 0 8px; }
.vtr-link { width: 100%; min-height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); padding: 0 10px; font-size: 15px; box-sizing: border-box; }
.vtr-share-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.vtr-share-n { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.vtr-stops { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); }
.vtr-stops li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.vtr-stops li:first-child { border-top: 0; }
.vtr-stops li.next .vtr-s-n { font-weight: 800; }
.vtr-stops li.target { background: var(--panel-2); box-shadow: inset 4px 0 0 var(--blue); }
.vtr-stops em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--blue); margin-left: 6px; }
.vtr-s-t { font-weight: 700; }
.vtr-s-m { color: var(--muted); font-size: 13px; min-width: 64px; text-align: right; }
.vtr-upd, .vtr-note { font-size: 12.5px; color: var(--muted); }
.vtr-fail { font-weight: 700; }
@media (max-width: 560px) {
  .vtr-map { height: 260px; }
  .vtr-arr-t b { font-size: 30px; }
  .vtr-qr { flex-basis: 140px; width: 140px; height: 140px; }
  .vtr-stops li { grid-template-columns: minmax(0, 1fr) auto; }
  .vtr-s-m { grid-column: 2; }
}
/* Mapa detallado que sigue al tren */
.vtr-map { height: 380px; }
.vtr-maptools { display: flex; gap: 8px; margin: -4px 0 12px; }
.vtr-mt { flex: 1 1 0; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.vtr-mt.on { border-color: var(--blue); color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.vtr-train { display: flex; align-items: center; gap: 6px; pointer-events: none; }
.vtr-train-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(31,111,209,.5), 0 1px 4px rgba(0,0,0,.35); animation: vtrPulse 2s infinite; box-sizing: border-box; }
.vtr-train.late .vtr-train-dot { background: var(--red); }
.vtr-train-lbl { font: 800 12.5px/1 var(--sans); color: #fff; background: rgba(22,32,47,.88); padding: 4px 7px; border-radius: 6px; white-space: nowrap; }
@keyframes vtrPulse { 0% { box-shadow: 0 0 0 0 rgba(31,111,209,.45), 0 1px 4px rgba(0,0,0,.35); } 70% { box-shadow: 0 0 0 14px rgba(31,111,209,0), 0 1px 4px rgba(0,0,0,.35); } 100% { box-shadow: 0 0 0 0 rgba(31,111,209,0), 0 1px 4px rgba(0,0,0,.35); } }
@media (prefers-reduced-motion: reduce) { .vtr-train-dot { animation: none; } }
@media (max-width: 560px) { .vtr-map { height: 340px; } }
/* Mis viajes (historial en este navegador) */
.vtr-hist { margin-top: 18px; }
.vtr-hist-l { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.vtr-hist-l > li { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.vtr-hist-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.vtr-hist-h span, .vtr-hist-r { color: var(--muted); font-size: 13.5px; }
.vtr-hist-m { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 13px; }
.vtr-hist-m > span { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); }
.vtr-hist-l details { margin-top: 6px; font-size: 13px; }
.vtr-hist-l details p { margin: 4px 0; color: var(--muted); }
.vtr-hist-end { font-weight: 700; }
.vtr-done { padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--green); }
.vtr-done-k { margin: 0 0 4px; font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--green); }
.vtr-done-r { margin: 0 0 6px; }
.vtr-arr:empty { display: none; }
/* Lista de trenes para elegir (seguidos o resultados de búsqueda) */
.vtr-page .an-results a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 50px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); text-decoration: none; }
.vtr-page .an-results a span { color: var(--muted); font-size: 13.5px; text-align: right; }
.vtr-page .an-results a:hover { border-color: var(--blue); }
/* Sugerencias después de un viaje */
.vtr-sug { margin-top: 16px; }
.vtr-sug-h { margin: 10px 0 6px; font-weight: 700; }
.vtr-sug-l a { justify-content: flex-start !important; }
.vtr-sug-l a b { flex: 0 0 auto; }
.vtr-sug-l a span:last-child { margin-left: auto; }
.vtr-sug-t { font-weight: 800; min-width: 48px; }
/* Empezar un viaje desde una estación */
.vtr-from-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 6px 0 12px; }
.vtr-from-bar label { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--muted); flex: 1 1 140px; }
.vtr-from-bar input { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 16px; padding: 0 10px; }
.vtr-from-bar .an-btn { flex: 0 0 auto; min-height: 44px; }
.vtr-dep { list-style: none; }
.vtr-dep-h { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.vtr-dep-h span:last-child { margin-left: auto; color: var(--muted); font-size: 13.5px; }
.vtr-dep-h[aria-expanded="true"] { border-color: var(--blue); }
.vtr-dep-b { margin: 6px 0 4px 12px; }
.vtr-dep-b p { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); }
.vtr-dep-b ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.vtr-dep-b a { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); text-decoration: none; }
.vtr-dep-b a:hover { border-color: var(--blue); }
.vtr-plan { border-left-color: var(--blue); }
.vtr-plan .vtr-done-k { color: var(--blue); }
