.route-panel {
  display: flex;
  width: max-content;
  min-width: 260px;
  overflow: visible;
}

.panel-switcher {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: #f7f8fa;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  z-index: 1;
  margin: 10px 12px 0;
  align-self: flex-start;
}

.panel-switcher-tabs {
  display: inline-flex;
  gap: 6px;
}

.panel-switcher-actions {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
}

.panel-switcher.hidden {
  display: none;
}

.route-panel.panel-collapsed > :not(.panel-switcher) {
  display: none;
}

.route-panel.panel-shell > :not(.panel-switcher) {
  display: none;
}

.panel-switcher-btn {
  border: none;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.2s ease;
}

.panel-switcher-btn:hover {
  background: rgba(0, 0, 0, 0.12);
  transform: scale(1.05);
}

.panel-switcher-btn:active {
  transform: scale(0.94);
}

.panel-switcher-btn.is-active {
  background: rgba(0, 0, 0, 0.2);
}

body.night .panel-switcher {
  background: #1b1f26;
}

body.night .panel-switcher-btn {
  background: rgba(255, 255, 255, 0.08);
}

body.night .panel-switcher-btn.is-active {
  background: rgba(255, 255, 255, 0.18);
}

.panel-switcher-icon {
  border: none;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.2s ease;
}

.panel-switcher-icon .icon-search {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.panel-toggle-caret {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.panel-switcher-icon:hover {
  background: rgba(0, 0, 0, 0.12);
  transform: scale(1.06);
}

.panel-switcher-icon:active {
  transform: scale(0.94);
}

body.night .panel-switcher-icon {
  background: rgba(255, 255, 255, 0.08);
}

body.night .panel-switcher-icon:hover {
  background: rgba(255, 255, 255, 0.14);
}

.route-panel.is-open #route-search,
.route-panel.is-open #bus-search,
.route-panel.is-open #stop-search {
  animation: route-search-reveal 220ms ease;
}

@keyframes route-search-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.route-row {
  cursor: pointer;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.route-row + .route-row {
  position: relative;
}

.route-row + .route-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}

body.night .route-row + .route-row::before {
  background: rgba(255, 255, 255, 0.12);
}

.stop-row {
  cursor: pointer;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  max-width: 100%;
  position: relative;
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.stop-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  white-space: nowrap;
  max-width: 100%;
  width: 100%;
  position: relative;
  z-index: 1;
}

.stop-row-toggle {
  border: none;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 12px;
  justify-self: end;
  position: relative;
  z-index: 1;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.2s ease;
}

.stop-row-toggle svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stop-row-toggle:hover {
  background: rgba(0, 0, 0, 0.22);
  transform: scale(1.14);
}

.stop-row-toggle:active {
  transform: scale(0.82);
}

.stop-row-preview {
  grid-column: 1 / -1;
  padding: 0 12px 10px;
  position: relative;
  z-index: 1;
}

.stop-quick-loading,
.stop-quick-empty {
  font-size: 12px;
  opacity: 0.7;
  padding: 4px 0;
}

.stop-quick-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  width: 100%;
  overflow-y: auto;
  padding-right: 2px;
}

.stop-quick-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 8px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(0, 0, 0, 0.02);
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.stop-quick-row--scheduled {
  opacity: 0.78;
}

.stop-quick-row:hover {
  transform: scale(1.015);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.12);
}

body.night .stop-quick-row:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.2);
}

.stop-quick-row:active {
  transform: scale(0.96);
}

.stop-quick-row--pulse {
  animation: stop-arrival-pulse 0.45s ease-out;
}

.stop-quick-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.stop-quick-route {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.stop-quick-route.no-via {
  align-items: center;
}

.stop-quick-route .route-destination-block {
  min-width: 0;
}

.stop-quick-operator {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.85;
}

.stop-quick-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2px;
  height: 100%;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0.75;
}

.stop-quick-platform {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.7;
  line-height: 1.1;
}

.stop-quick-occupancy {
  position: static;
}

body.night .stop-row-toggle {
  background: rgba(255, 255, 255, 0.08);
}

body.night .stop-row-toggle:hover {
  background: rgba(255, 255, 255, 0.26);
}

body.night .stop-quick-row {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.stop-row + .stop-row {
  position: relative;
}

.stop-row + .stop-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}

body.night .stop-row + .stop-row::before {
  background: rgba(255, 255, 255, 0.12);
}

.stop-row:hover .stop-row-main {
  background: transparent;
}

body.night .stop-row:hover .stop-row-main {
  background: transparent;
}

.stop-row:has(.stop-row-preview:hover) .stop-row-main,
body.night .stop-row:has(.stop-row-preview:hover) .stop-row-main {
  background: transparent;
}

.stop-row::before {
  content: "";
  position: absolute;
  inset: 4px 8px;
  border-radius: 10px;
  background: transparent;
  transition: background 0.2s ease;
  z-index: 0;
}

.stop-row:hover::before {
  background: rgba(0, 0, 0, 0.06);
}

body.night .stop-row:hover::before {
  background: rgba(255, 255, 255, 0.06);
}

.stop-row:has(.stop-row-preview:hover)::before,
body.night .stop-row:has(.stop-row-preview:hover)::before {
  background: transparent;
}

.stop-row:hover {
  transform: scale(1.02);
}

.stop-row:has(.stop-row-preview:hover) {
  transform: none;
}

.stop-row:has(.stop-row-preview:hover):active {
  transform: none;
}

.stop-row:active {
  transform: scale(0.97);
}

.stop-row:active .stop-row-toggle {
  transform: scale(1);
}

.stop-row:has(.stop-row-toggle:active) {
  transform: none;
}

.stop-row--toggle-active {
  transform: none !important;
}

.stop-row:hover .stop-row-toggle {
  background: rgba(0, 0, 0, 0.16);
}

body.night .stop-row:hover .stop-row-toggle {
  background: rgba(255, 255, 255, 0.18);
}

.stop-row:has(.stop-row-preview:hover) .stop-row-toggle {
  background: rgba(0, 0, 0, 0.08);
}

body.night .stop-row:has(.stop-row-preview:hover) .stop-row-toggle {
  background: rgba(255, 255, 255, 0.08);
}

.stop-row--pulse {
  animation: stop-row-pulse 0.45s ease-out;
}

@keyframes stop-row-pulse {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(0.93);
  }
  100% {
    transform: scale(1);
  }
}

.stop-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.stop-platforms {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.7;
}

.stop-platform-label {
  font-weight: 600;
}

.stop-platform-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.stop-platform-pill {
  border: none;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.2s ease;
}

.stop-platform-pill:hover {
  background: rgba(0, 0, 0, 0.16);
  transform: scale(1.08);
}

.stop-platform-pill:active {
  transform: scale(0.84);
}

.stop-platform-pill.is-selected {
  background: rgba(0, 0, 0, 0.2);
}


.stop-arrival-platform {
  font-size: 10px;
  opacity: 0.7;
}

body.night .stop-platform-pill {
  background: rgba(255, 255, 255, 0.08);
}

body.night .stop-platform-pill:hover {
  background: rgba(255, 255, 255, 0.18);
}

body.night .stop-platform-pill.is-selected {
  background: rgba(255, 255, 255, 0.2);
}
.stop-popular-label {
  padding: 6px 12px 2px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.55;
}

.stop-route-badges {
  display: flex;
  flex-wrap: nowrap;
  column-gap: 2px;
  padding-top: 2px;
}

.stop-route-badges + .stop-route-badges {
  margin-top: 2px;
}

.stop-platform {
  font-size: 11px;
  opacity: 0.7;
}

/* =========================
   Route text – match bus popup exactly
   ========================= */

.route-panel .route {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.15;
}

.route-panel .route-destination {
  display: inline-block;
}

.route-panel .route-via {
  white-space: normal;
  max-width: 100%;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
  opacity: 0.75;
  margin-top: 2px;
}

.route-panel .route-operator-badge {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.7;
  position: absolute;
  right: 8px;
  bottom: 4px;
  max-width: 35%;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-selected .route-operator-badge {
  right: 44px;
}

@media (max-width: 720px) {
  .route-selected .route-row-main {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    padding-right: 12px;
    row-gap: 6px;
  }

  .route-selected .route-row-main .route-badge {
    grid-column: 1;
    grid-row: 1;
  }

  .route-selected .route-destination-block {
    grid-column: 2 / 4;
    grid-row: 1;
    min-width: 0;
  }

  .route-selected .route-operator-badge {
    position: static;
    grid-column: 1 / 3;
    grid-row: 2;
    margin-top: 2px;
    max-width: 100%;
    text-align: left;
  }

  .route-selected .route-vehicles-toggle {
    grid-column: 3;
    grid-row: 2;
    margin-left: auto;
    margin-top: 2px;
  }
}

/* the visible row */
.route-row-main {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 64px 10px 12px;
  border-radius: 10px;

  white-space: nowrap;
  max-width: 100%;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

/* If route has a via line, top-align like bus popup */
.route-row:has(.route-via) .route-row-main {
  align-items: flex-start;
}

.route-destination-block {
  display: flex;
  flex-direction: column;
  padding-left: 0;
  min-width: 0;
}

/* single-line destination → vertically centered to badge */
/* hover */
.route-row:hover .route-row-main {
  background: rgba(0, 0, 0, 0.06);
}

body.night .route-row:hover .route-row-main {
  background: rgba(255, 255, 255, 0.06);
}

.route-row:hover {
  transform: scale(1.02);
}

.route-row:active {
  transform: scale(0.97);
}

/* SELECTED */
.route-row.selected {
  background: rgba(0, 120, 255, 0.14);
  border-radius: 10px;
}

body.night .route-row.selected {
  background: rgba(100, 170, 255, 0.22);
}

/* remove per-child backgrounds */
.route-row.selected .route-row-main {
  background: transparent;
}

.route-selected .route-row.selected {
  background: transparent !important;
}

.route-selected .route-row.selected .route-row-main {
  background: transparent !important;
}

.route-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 30px;
  min-width: 24px;
  padding: 0 8px;

  background: var(--route-color, var(--route-color-fallback));
  border-radius: 5px;

  /* 🔒 lock typography */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0;

  color: #fff;

  transform: skewX(16deg);
}

.stop-route-badges .route-badge {
  height: 12px !important;
  min-width: 9px !important;
  padding: 0 3px !important;
  font-size: 12px !important;
  border-radius: 3px !important;
}

body.night .stop-route-badges .route-badge {
  height: 12px !important;
  min-width: 9px !important;
  padding: 0 3px !important;
  font-size: 12px !important;
  border-radius: 3px !important;
}

.route-badge-text {
  transform: skewX(-16deg);

  /* 🔒 prevent inheritance surprises */
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
}

.stop-arrival-route .route-badge.route-badge--city .route-badge-text {
  transform: skewX(-16deg);
}

/* City badge: squish badge and reduce gap for city names */
#route-panel .route-badge:has(.route-badge-text--city) {
  transform: skewX(16deg) scale(0.82);
  transform-origin: left center;

  /* allow badge to grow for long city names */
  min-width: fit-content;
  padding: 0 10px;

  margin-right: -21px;
}

/* If city name is long, reduce gap further */
#route-panel .route-badge:has(.route-badge-text--city[data-long="true"]) {
  padding: 0 12px;
  margin-right: -35px;
}

#route-panel .route-badge:has(.route-badge-text--city) .route-badge-text {
  transform: skewX(-16deg);
}

body.night .route-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 30px;
  min-width: 24px;
  padding: 0 8px;

  background: var(--route-color, var(--route-color-fallback));
  border-radius: 5px;

  /* 🔒 lock typography */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0;

  color: #1a1d22;

  transform: skewX(16deg);
}

/* =========================
   Route panel = scaled down
   ========================= */

body.night .route-panel .route-via {
  color: #b8bcc4;
}

.route-panel .route-results {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  padding-right: 8px;
  box-sizing: border-box;
}

/* =========================
   Selected route + vehicles
   ========================= */

.route-selected {
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.night .route-selected {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.stop-selected-card {
  padding: 10px 12px;
}

.route-vehicles {
  padding: 8px 10px 12px;
  overflow-y: auto;
  max-height: min(38vh, 360px);
  --route-meta-col: 150px;
  --route-badge-gap: 6px;
}

.stop-arrival-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 8px 6px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 6px;
  background: rgba(0, 0, 0, 0.02);
  position: relative;
  cursor: pointer;
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.stop-arrival-row--scheduled {
  opacity: 0.78;
}

.stop-arrival-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding-right: 56px;
}

.stop-arrival-route {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.stop-arrival-row .route-destination-block {
  min-width: 0;
}

.stop-arrival-route.no-via {
  align-items: center;
}

.stop-arrival-route.no-via .route-destination-block {
  justify-content: center;
}

.stop-arrival-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 11px;
  opacity: 0.85;
}

.stop-arrival-details {
  font-size: 11px;
  opacity: 0.75;
  white-space: nowrap;
  line-height: 1.2;
}

.stop-arrival-operator {
  font-weight: 700;
}

.stop-arrival-type {
  font-weight: 500;
}

.stop-arrival-occupancy {
  display: inline-flex;
  position: absolute;
  right: 8px;
  bottom: 6px;
}

.stop-quick-row .stop-arrival-occupancy {
  position: static;
}

.stop-arrival-occupancy--empty {
  width: 54px;
  height: 18px;
}

.stop-arrival-people {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
}

.stop-arrival-person {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 16px;
  opacity: 0.25;
}

.stop-arrival-person svg {
  width: 14px;
  height: 14px;
  fill: var(--occ-color);
}

.stop-arrival-person.active {
  opacity: 1;
}

.stop-arrival-time {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0.75;
  align-self: flex-start;
}

.stop-arrival-time-value {
  line-height: 1.1;
}

.stop-arrival-platform {
  font-size: 10px;
  opacity: 0.7;
  margin-top: 2px;
}

body.night .stop-arrival-row {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.stop-arrival-row:hover {
  transform: scale(1.015);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.12);
}

body.night .stop-arrival-row:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.2);
}

.stop-arrival-row--pulse {
  animation: stop-arrival-pulse 0.45s ease-out;
}

@keyframes stop-arrival-pulse {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(0.915);
    box-shadow: 0 12px 22px color-mix(in srgb, var(--pulse-color, #2da36f) 45%, transparent);
    border-color: color-mix(in srgb, var(--pulse-color, #2da36f) 65%, transparent);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 transparent;
    border-color: color-mix(in srgb, var(--pulse-color, #2da36f) 0%, transparent);
  }
}

body.night .stop-arrival-people {
  background: rgba(255, 255, 255, 0.12);
}

.route-vehicles-empty {
  padding: 8px 4px;
  font-size: 12px;
  opacity: 0.7;
}

.route-vehicle-row {
  padding: 8px 8px 6px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 6px;
  background: rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

body.night .route-vehicle-row {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.route-vehicle-row:hover {
  transform: scale(1.015);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.12);
}

body.night .route-vehicle-row:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.2);
}

.route-vehicle-row--pulse {
  animation: stop-arrival-pulse 0.45s ease-out;
}

.route-vehicle-row--buslist {
  cursor: default;
}

.route-vehicle-row--buslist:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(0, 0, 0, 0.06);
}

body.night .route-vehicle-row--buslist:hover {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

body.night .route-vehicle-row--buslist:hover {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.route-vehicle-grid {
  display: grid;
  grid-template-columns: var(--route-meta-col) 1fr;
  column-gap: 14px;
  row-gap: 0;
  align-items: start;
}

.route-vehicle-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.route-vehicle-operator {
  font-weight: 700;
  font-size: 13px;
}

.route-vehicle-type {
  font-size: 11px;
  opacity: 0.75;
}

.route-vehicle-details {
  font-size: 11px;
  opacity: 0.7;
}

.route-vehicle-next {
  font-size: 11px;
  display: flex;
  gap: 6px;
  align-items: baseline;
  opacity: 0.85;
  margin-top: 0;
  padding-left: 0;
}

.route-vehicle-next-label {
  font-weight: 600;
}

.route-vehicle-minutes {
  font-size: 11px;
  opacity: 0.7;
  font-style: italic;
  margin-top: 0;
}

.route-vehicle-route {
  display: grid;
  grid-template-rows: auto auto auto;
  align-items: start;
  row-gap: 0;
  justify-self: start;
}

.route-vehicle-route-main {
  display: flex;
  align-items: flex-start;
  gap: var(--route-badge-gap);
}

.route-vehicles-toggle {
  margin-left: auto;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.2s ease;
}

.route-vehicles-toggle:hover {
  background: rgba(0, 0, 0, 0.12);
  transform: scale(1.08);
}

.route-vehicles-toggle:active {
  transform: scale(0.92);
}

body.night .route-vehicles-toggle {
  background: rgba(255, 255, 255, 0.12);
}

body.night .route-vehicles-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
}

.stop-selected-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stop-arrivals-toggle {
  margin-left: auto;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.2s ease;
}

.stop-arrivals-toggle:hover {
  background: rgba(0, 0, 0, 0.12);
  transform: scale(1.08);
}

.stop-arrivals-toggle:active {
  transform: scale(0.92);
}

body.night .stop-arrivals-toggle {
  background: rgba(255, 255, 255, 0.12);
}

body.night .stop-arrivals-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
}

.route-vehicle-occupancy {
  display: inline-flex;
  justify-self: start;
  margin: 4px 0;
  align-self: center;
}

.route-vehicle-occupancy--empty {
  min-height: 20px;
}

.route-vehicle-next-target {
  cursor: pointer;
  border-radius: 6px;
  padding: 1px 4px;
  margin-left: -4px;
  margin-right: -4px;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.2s ease,
    color 0.2s ease;
}

.route-vehicle-next-target:hover {
  background: rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.route-vehicle-next-target.is-pressed,
.route-vehicle-next-target:active {
  transform: scale(0.98);
  background: rgba(0, 0, 0, 0.1);
}

body.night .route-vehicle-next-target:hover {
  background: rgba(255, 255, 255, 0.08);
}

body.night .route-vehicle-next-target.is-pressed,
body.night .route-vehicle-next-target:active {
  background: rgba(255, 255, 255, 0.12);
}

.route-vehicle-people {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
}

.route-vehicle-person {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 16px;
  opacity: 0.25;
}

.route-vehicle-person svg {
  width: 14px;
  height: 14px;
  fill: var(--occ-color);
}

.route-vehicle-person.active {
  opacity: 1;
}

body.night .route-vehicle-people {
  background: rgba(255, 255, 255, 0.12);
}

.stop-arrival-route .route-badge {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.toggle-caret {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stop-arrival-route .route-badge:hover,
.stop-arrival-route .route-badge.is-hover {
  transform: skewX(16deg) scale(1.06);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--route-color) 40%, transparent);
}

.stop-arrival-route .route-badge:active,
.stop-arrival-route .route-badge.is-pressed {
  transform: skewX(16deg) scale(0.92);
  box-shadow: 0 6px 14px color-mix(in srgb, var(--route-color) 55%, transparent);
}

.route-panel-clear {
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.2s ease;
}

.route-panel-clear:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.06);
}

.route-panel-clear:active {
  transform: scale(0.93);
}

body.night .route-panel-clear {
  background: rgba(255, 255, 255, 0.08);
}

body.night .route-panel-clear:hover {
  background: rgba(255, 255, 255, 0.12);
}

.route-vehicle-route.no-via .route-vehicle-route-main {
  align-items: center;
}
.route-vehicle-route .route-badge {
  height: 25px;
  min-width: 20px;
  padding: 0 6px;
  font-size: 20px;
  border-radius: 5px;
  font-weight: 800;
  transform: skewX(16deg);
}

.route-vehicle-route .route-badge-text {
  transform: skewX(-16deg);
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
}

.route-vehicle-route .route-destination-block {
  display: flex;
  flex-direction: column;
}

.route-vehicle-route .route-via {
  font-size: 11px;
  opacity: 0.7;
}

.route-vehicle--recent-finished .route-badge {
  opacity: 0.5;
}

.route-vehicle--recent-finished .route-destination,
.route-vehicle--recent-finished .route-via,
.route-vehicle--recent-finished .route-vehicle-next {
  opacity: 0.55;
}
