/* Velix /vehicles — full-viewport map + planner */
body:has(.vx) footer.site,
body:has(.vx) .m-dock { display: none !important; }
body:has(.vx) main {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100%;
}
body:has(.vx) { overflow: hidden; }
.vx {
  --vx-pad: 10px;
  height: calc(100dvh - var(--dash-header-h, 64px));
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg);
  color: var(--text);
  position: relative;
}
.vx-planner {
  flex: 0 0 auto;
  z-index: 20;
  padding: 8px 10px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.vx-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: flex-end;
}
.vx-ends {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex: 1 1 420px;
  min-width: 0;
}
.vx-field {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}
.vx-lbl {
  display: block;
  font: 700 .68rem/1 Figtree, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim, var(--muted, #888));
  margin: 0 0 4px;
}
.vx-field .input,
.vx-when .input,
.vx-filters .input {
  width: 100%;
  min-height: 42px;
}
.vx-swap {
  appearance: none;
  width: 42px;
  height: 42px;
  margin-bottom: 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  flex: 0 0 42px;
}
.vx-swap:hover { border-color: var(--text); }
.vx-when {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  flex: 1 1 480px;
}
.vx-when .vx-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.vx-when #vxDate { width: 148px; flex: 0 0 auto; }
.vx-when #vxTime { width: 118px; flex: 0 0 auto; }
.vx-now {
  appearance: none;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--bg);
  font: 800 .92rem/1 Figtree, sans-serif;
  letter-spacing: .08em;
  cursor: pointer;
}
.vx-now:hover { opacity: .92; }
.vx-dir {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
}
.vx-dir__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  min-height: 42px;
  padding: 0 12px;
  font: 650 .85rem/1 Figtree, sans-serif;
  cursor: pointer;
}
.vx-dir__btn.on {
  background: var(--text);
  color: var(--bg);
}
.vx-go { min-height: 42px; white-space: nowrap; }
.vx-suggest {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 4px);
  z-index: 40;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow, 0 16px 40px rgba(0,0,0,.4));
  max-height: 260px;
  overflow: auto;
  padding: 4px;
}
.vx-suggest button {
  display: block;
  width: 100%;
  text-align: left;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  font: 500 .9rem/1.25 Figtree, sans-serif;
}
.vx-suggest button small {
  display: block;
  color: var(--text-dim, #888);
  font-size: .75rem;
}
.vx-suggest button:hover,
.vx-suggest button.is-on { background: var(--bg-2, var(--panel-2, #111)); }
.vx-results {
  max-height: 28vh;
  overflow: auto;
  padding: 8px 0 10px;
  display: grid;
  gap: 6px;
}
.vx-trip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 6px;
  width: 100%;
}
.vx-trip.on,
.vx-trip:hover { border-color: var(--text); }
.vx-trip__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font: 700 .95rem/1 Figtree, sans-serif;
}
.vx-trip__dur { color: var(--text-dim, #888); font-weight: 600; }
.vx-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.vx-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--bg-2, #141414);
  border: 1px solid var(--line);
  font: 700 .72rem/1 Figtree, sans-serif;
}
.vx-chip.walk { font-weight: 550; color: var(--text-dim, #888); }
.vx-stage {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}
.vx-map {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.vx-layers {
  position: absolute;
  z-index: 10;
  top: 12px;
  left: 12px;
  width: min(240px, calc(100vw - 24px));
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow, 0 12px 32px rgba(0,0,0,.35));
  backdrop-filter: blur(10px);
  max-height: calc(100% - 48px);
  overflow: auto;
}
.vx-layers h2 {
  margin: 0 0 8px;
  font: 800 .72rem/1 Figtree, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim, #888);
}
.vx-tog {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font: 600 .88rem/1.2 Figtree, sans-serif;
  cursor: pointer;
}
.vx-tog input { accent-color: var(--text); }
.vx-tog_stack {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  cursor: default;
}
.vx-seg {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.vx-seg button {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  min-height: 32px;
  font: 700 .8rem/1 Figtree, sans-serif;
  cursor: pointer;
}
.vx-seg button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.vx-filters { margin-top: 10px; display: grid; gap: 4px; }
.vx-count {
  margin: 10px 0 0;
  font: 550 .78rem/1.3 Figtree, sans-serif;
  color: var(--text-dim, #888);
}
.vx-sheet {
  position: absolute;
  z-index: 12;
  top: 12px;
  right: 12px;
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100% - 48px);
  overflow: auto;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 16px 18px;
  box-shadow: var(--shadow, 0 12px 32px rgba(0,0,0,.35));
  backdrop-filter: blur(10px);
}
.vx-sheet__close {
  position: absolute;
  top: 8px;
  right: 8px;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  width: 36px;
  height: 36px;
  cursor: pointer;
  border-radius: 8px;
}
.vx-sheet h3 {
  margin: 0 28px 6px 0;
  font: 800 1.05rem/1.25 Syne, Figtree, sans-serif;
  letter-spacing: -0.03em;
}
.vx-sheet .vx-meta {
  color: var(--text-dim, #888);
  font: 600 .8rem/1.3 Figtree, sans-serif;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 8px;
}
.vx-delay {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 700 .9rem/1 Figtree, sans-serif;
  margin: 0 0 12px;
}
.vx-delay.on-time { color: #3dd68c; }
.vx-delay.late { color: #ff6b6b; }
.vx-delay.early { color: #6bb6ff; }
.vx-stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.vx-stops li {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font: 500 .86rem/1.3 Figtree, sans-serif;
}
.vx-stops li.next { background: color-mix(in srgb, var(--text) 8%, transparent); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }
.vx-stops .clk { color: var(--text-dim, #888); font-variant-numeric: tabular-nums; }
.vx-stops .clk b { color: var(--text); font-weight: 700; }
.vx-attr {
  position: absolute;
  z-index: 9;
  left: 12px;
  bottom: 8px;
  margin: 0;
  font: 500 .7rem/1.3 Figtree, sans-serif;
  color: var(--text-dim, #aaa);
  max-width: min(520px, calc(100vw - 24px));
  text-shadow: 0 1px 2px var(--bg);
  pointer-events: none;
}
.vx-bus {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -50%);
}
.vx-bus__rot { display: block; line-height: 0; }
.vx-bus__chev {
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 13px solid var(--vx-fill, #3de8ff);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.45));
}
.vx-bus__code {
  margin-top: -1px;
  background: var(--vx-fill, #3de8ff);
  color: #081018;
  font: 800 10px/1 Roboto, Figtree, sans-serif;
  padding: 2px 4px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,.35);
  white-space: nowrap;
}
.vx-bus.is-stale { opacity: .42; }
.vx-bus.is-hit .vx-bus__code {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--vx-fill, #f5c14a);
}
.vx-bus.is-hit .vx-bus__chev { border-bottom-color: #f5c14a; }
html[data-theme="light"] .vx-bus__code { color: #fff; }
.leaflet-container { background: var(--bg); font-family: Figtree, sans-serif; }
.leaflet-control-attribution { font-size: 10px !important; }
@media (max-width: 720px) {
  .vx-layers { top: auto; bottom: 36px; left: 8px; width: min(220px, calc(100vw - 16px)); max-height: 42%; }
  .vx-sheet { top: auto; bottom: 36px; right: 8px; left: 8px; width: auto; max-height: 48%; }
  .vx-when #vxDate, .vx-when #vxTime { width: 46%; flex: 1 1 46%; }
  .vx-results { max-height: 22vh; }
}
