/* RC2: einheitliche Verkehrsmittelauswahl, Vertauschen, Zwischenstopps, Simulations-Kennzeichnung. Nutzt nur Tokens aus tokens.css. */

.travel-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 4px 0 10px; }
.travel-modes.hidden { display: none; }
.tm-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 56px; padding: 8px 4px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: inherit; font-size: .8rem; font-weight: 600; line-height: 1.15; text-align: center;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.tm-btn:hover { border-color: var(--line2); background: var(--surface2); }
.tm-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.tm-btn.active { background: var(--grad-active); border-color: var(--cyan); color: #fff; box-shadow: var(--glow); }
.tm-ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tm-label { white-space: nowrap; }
.tm-badge { font-size: .56rem; font-weight: 700; letter-spacing: 0; line-height: 1.05; color: var(--warn); text-transform: uppercase; max-width: 100%; overflow-wrap: anywhere; }
.tm-btn { overflow: hidden; }
.tm-btn.active .tm-badge { color: #fff; }
.tm-btn.unavailable:not(.active) { opacity: .85; border-style: dashed; }
.tm-badge.hidden { display: none; }

.tm-note { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; font-size: .82rem; line-height: 1.35; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.tm-note[data-kind="missing"] { border-color: var(--warn); }
.tm-note[data-kind="sim"] { border-color: var(--sim); }
.tm-note.hidden { display: none; }

.sim-tag { display: inline-block; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--sim); color: var(--sim); font-size: .68rem; font-weight: 800; letter-spacing: .06em; }
.sim-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; border: 1px dashed var(--sim); background: rgba(255, 184, 0, .07); font-size: .8rem; }
.sim-panel.hidden { display: none; }
.sim-panel label { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.sim-panel select { min-height: 32px; }
.nav-summary-note { grid-column: 1 / -1; margin: 6px 0 0; font-size: .8rem; color: var(--muted); }
.nav-summary-note.hidden { display: none; }

.nav-swap {
  display: flex; align-items: center; justify-content: center; margin: -2px auto; width: 44px; height: 32px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--cyan); cursor: pointer;
}
.nav-swap:hover:not(:disabled) { border-color: var(--line2); background: var(--surface2); }
.nav-swap:focus-visible { outline: none; box-shadow: var(--focus); }
.nav-swap:disabled { opacity: .4; cursor: default; }
.nav-swap svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.nav-pin.via { background: var(--surface2); border-color: var(--violet); color: #fff; }
.nav-via .nav-point-head { display: flex; align-items: center; gap: 8px; }
.nav-via .nav-point-head label { flex: 1; }
.nav-vias:empty { display: none; }

#nav-pane-route .btn-row { flex-wrap: wrap; }

/* Desktop-Cockpit: die Karte hat feste Höhe – mit Verkehrsmittelleiste, Hinweisen und Zwischenstopps wird der Inhalt länger als
   das Panel. Deshalb scrollt die gesamte Navigationskarte (sonst läge „Route berechnen“ unter dem Statusband). */
@media (min-width: 1101px) {
  .page-cockpit .nav-card { overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
  .page-cockpit .nav-card > *, .page-cockpit .nav-card .nav-pane { flex: none; }
  .page-cockpit .nav-card .nav-pane { min-height: auto; }
  .page-cockpit .nav-card .nav-steps { flex: none; overflow: visible; }
}

/* RC2.1: Smartphone – beim Scrollen/Fokussieren (z. B. „Route berechnen“) nicht unter die feste untere Navigationsleiste schieben. */
html:has(> body.page-cockpit), body.page-cockpit { scroll-padding-bottom: calc(var(--bottom-nav, 0px) + 16px); }

@media (max-width: 420px) {
  .travel-modes { gap: 4px; }
  .tm-btn { min-height: 52px; font-size: .74rem; padding: 6px 2px; }
  .tm-badge { font-size: .56rem; }
}
