
/* ---------- route finder (themap/route/routeMode.js) ---------- */
/* the route icon in the search field, after a thin divider */
.mlHeader.has-route .mlSearch { padding-right: 96px; }
body.rtl .mlHeader.has-route .mlSearch { padding-right: 40px; padding-left: 96px; }
.mlRoute {
  position: absolute; right: 5px;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--blue);
  cursor: pointer;
}
.mlRoute:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) { .mlRoute:hover { background: rgba(55, 73, 240, .14); } }   /* visible on the grey field too */
.mlRouteSep { position: absolute; right: 47px; width: 1px; height: 24px; background: #DADEE6; pointer-events: none; }
.mlHeader.has-route .mlClear { right: 52px; }
body.rtl .mlRoute { right: auto; left: 5px; }
body.rtl .mlRouteSep { right: auto; left: 47px; }
body.rtl .mlHeader.has-route .mlClear { right: auto; left: 52px; }

/* route mode: the list makes way for the route panel */
#panelRoot.is-routing > :not(.rtPanel) { display: none; }
body.route-mode #sheetExtras { display: none; }
.rtPanel { padding-top: 2px; }
.rtPanel[hidden] { display: none; }
@media (min-width: 980px) { .rtPanel { padding-top: 20px; } }

.rtBox { padding: 6px; border-radius: 14px; background: var(--bg); }
.rtTop { display: flex; align-items: center; gap: 4px; }
.rtTabs { display: flex; gap: 4px; }
.rtTab {
  height: 36px; padding: 0 12px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: 10px; background: transparent;
  color: #42506A; font: 600 14px/1 inherit; font-family: inherit;
  cursor: pointer;
}
.rtTab.is-on { background: var(--surface); color: var(--blue); box-shadow: 0 1px 3px rgba(21, 34, 51, .12); }
.rtClose {
  margin-inline-start: auto;
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: #42506A; cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .rtClose:hover { background: #E4E7EE; } }
.rtFields { margin-top: 6px; display: flex; align-items: center; border-radius: 10px; background: var(--surface); }
.rtSwap {
  width: 40px; height: 96px; flex: none;
  display: grid; place-items: center;
  border: 0; background: transparent; color: #9AA3B2; cursor: pointer;
}
.rtSwap:hover { color: var(--blue); }
.rtInputs { flex: 1; min-width: 0; padding-inline-end: 6px; }
.rtField { height: 48px; padding: 0 10px; display: flex; align-items: center; gap: 10px; border-radius: 10px; }
.rtField--a { border-bottom: 1px solid #E2E5EC; border-radius: 10px 10px 0 0; }
.rtField:focus-within { box-shadow: inset 0 0 0 2px var(--blue); border-bottom-color: transparent; border-radius: 10px; }
.rtDot {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font: 700 12px/1 inherit; font-family: inherit;
}
.rtField--a .rtDot { background: var(--blue); }
.rtField--b .rtDot { background: #E8408F; }
.rtClr {
  width: 30px; height: 30px; flex: none; margin-inline-end: -4px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: #9AA3B2; cursor: pointer;
}
.rtClr[hidden] { display: none; }
.rtClr:hover { background: var(--bg); color: var(--ink); }
.rtInput {
  flex: 1; min-width: 0; height: 100%;
  border: 0; padding: 0; background: transparent; outline: none;
  color: var(--ink); font: 400 16px/1 inherit; font-family: inherit;   /* 16px: no iOS zoom */
  text-overflow: ellipsis;
}

.rtBody { padding-bottom: 8px; }
.rtMsg { margin: 14px 4px 4px; color: var(--muted); font-size: 14px; line-height: 1.45; }

.rtSugg { list-style: none; margin: 8px 0 0; padding: 0; }
.rtSuggBtn {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 9px 4px; border: 0; border-bottom: 1px solid #F0F2F5; background: transparent;
  color: var(--ink); text-align: start; font-family: inherit; cursor: pointer;
}
.rtSuggBtn:hover { background: var(--bg); }
.rtSuggIcon { width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--bg); color: #42506A; display: grid; place-items: center; }
.rtSuggIcon.is-here { background: var(--blue-soft); color: var(--blue); }
.rtSuggText { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rtSuggName { font-weight: 600; font-size: 15px; }
.rtSuggSub { color: var(--muted); font-size: 12px; }

.rtRoutes { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rtRoute { border: 2px solid var(--stroke); border-radius: 14px; background: var(--surface); }
.rtRoute.is-sel { border-color: var(--ink); }
.rtRouteBtn {
  width: 100%; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px;
  border: 0; background: transparent; color: var(--ink); text-align: start; font-family: inherit; cursor: pointer;
  border-radius: 12px;
}
.rtRouteHead { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.rtRouteTime { font-weight: 700; font-size: 20px; }
.rtRouteDist { color: var(--muted); font-size: 14px; font-weight: 600; }
.rtRouteSub { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; margin-top: -4px; }
.rtRouteTitle { font-weight: 600; font-size: 15px; }
.rtRouteFloors { color: var(--muted); font-size: 13px; }
.rtTag { margin-inline-start: auto; color: #1F8A4C; font-weight: 600; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.rtTag--free { color: var(--blue); }
.rtChips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.rtChip {
  height: 26px; padding: 0 6px; display: inline-flex; align-items: center; gap: 3px;
  border-radius: 8px; background: #F2F3F5; font-weight: 600; font-size: 12px;
}
.rtChip--escalator, .rtChip--stairs { background: #FDECF4; color: #B8236A; }
.rtSep { color: #B4BAC6; font-size: 11px; }
.rtGo {
  display: block; width: calc(100% - 28px); height: 46px; margin: 0 14px 14px;
  border: 0; border-radius: 12px; background: var(--blue); color: #fff;
  font: 700 16px/1 inherit; font-family: inherit; cursor: pointer;
}
.rtGo:hover { background: #2433C4; }

/* Go: one step at a time */
.rtStep { padding: 4px 0 8px; }
.rtStepHead { display: flex; align-items: center; gap: 12px; }
.rtStepIcon { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--blue); color: #fff; display: grid; place-items: center; }
.rtStep.is-done .rtStepIcon { background: #1F8A4C; }
.rtStepText { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rtStepMeta { color: var(--muted); font-size: 12px; font-weight: 600; }
.rtStep.is-done .rtStepMeta { color: #1F8A4C; }
.rtStepMain { font-size: 17px; font-weight: 700; line-height: 1.3; }
.rtProg { margin-top: 12px; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; }
.rtProg span { height: 4px; border-radius: 2px; background: var(--stroke); }
.rtProg span.is-on { background: var(--blue); }
.rtStep.is-done .rtProg span { background: #1F8A4C; }
.rtStepNav { margin-top: 12px; display: flex; gap: 8px; }
.rtNav {
  flex: 1; height: 44px; border: 0; border-radius: 12px; background: #F2F3F5; color: var(--ink);
  font: 600 15px/1 inherit; font-family: inherit; cursor: pointer;
}
.rtNav:disabled { opacity: .45; cursor: default; }
.rtNav--end { flex: none; padding: 0 16px; color: #B8236A; }
.rtNav--main { background: var(--blue); color: #fff; font-weight: 700; }

/* on the map */
.rtPin { pointer-events: none; }
.rtPinIn {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  white-space: nowrap; font: 700 13px/1 "IBM Plex Sans", system-ui, sans-serif; color: #fff;
  box-shadow: 0 2px 6px rgba(21, 34, 51, .3);
}
.rtPin--a .rtPinIn, .rtPin--b .rtPinIn { width: 28px; height: 28px; border: 3px solid #fff; border-radius: 50%; box-sizing: border-box; }
.rtPin--a .rtPinIn { background: var(--blue); }
.rtPin--b .rtPinIn { background: #E8408F; }
/* floor changes: leave here ("Up to 7"), pass this floor on the same stairs, come out here ("From 4") */
.rtPin--chg .rtPinIn, .rtPin--pass .rtPinIn, .rtPin--arr .rtPinIn {
  gap: 5px; padding: 0 10px 0 8px; border: 2px solid #fff; border-radius: 16px; font-size: 13px;
}
.rtPin--chg .rtPinIn { height: 32px; background: #152233; }
.rtPin--chg b { color: #F7A8CC; font-size: 15px; }
.rtPin--pass .rtPinIn { height: 30px; background: #fff; color: #152233; border: 2px dashed #E8408F; }
.rtPin--pass b { color: #B8236A; font-size: 12px; }
.rtPin--arr .rtPinIn { height: 26px; background: #E8408F; font-size: 12px; }

/* which way to go: chevrons on the route line */
.rtArrow { pointer-events: none; }
.rtArrow span { position: absolute; left: 0; top: 0; display: block; width: 12px; height: 12px; line-height: 0; }
.rtArrow.is-done span { opacity: .6; }

/* the floor buttons: a dot when the route goes on above / below */
#floorUp.rtHint, #floorDown.rtHint { position: relative; }
#floorUp.rtHint::after, #floorDown.rtHint::after {
  content: ""; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #E8408F;
}

.rtToast {
  position: absolute; left: 50%; top: 72px; z-index: 700; transform: translate(-50%, -8px);
  padding: 8px 14px; border-radius: 10px; background: #152233; color: #fff; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.rtToast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 980px) { .rtToast { left: calc(50% + 200px); } }

/* phones: the route cards side by side, swiped - the sheet stays low and the map stays visible */
@media (max-width: 979px) {
  .rtRoutes { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; margin: 10px -16px 0; padding: 0 16px 2px; scrollbar-width: none; }
  .rtRoutes::-webkit-scrollbar { display: none; }
  .rtRoute { flex: none; width: min(300px, calc(100vw - 56px)); scroll-snap-align: start; display: flex; flex-direction: column; }
  .rtRoute:only-child { width: 100%; }
  .rtRouteBtn { padding: 10px 12px; gap: 8px; }
  .rtRouteTime { font-size: 18px; }
  .rtGo { margin-top: auto; height: 44px; }
}
@media (max-width: 979px) { body.route-mode .helpBtn { display: none; } }   /* it sits at the default sheet height */

/* "Directions" on the place card, next to "Details" */
.pcActions { display: flex; gap: 8px; margin-top: 12px; }
.pcActions .pcMore { flex: 1; margin-top: 0; }
.pcRoute {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 10px; border: 2px solid var(--blue); border-radius: 10px;
  background: var(--blue); color: #fff;
  font-weight: 700; font-size: 14px; line-height: 1; font-family: inherit; cursor: pointer;
}
.pcRoute:hover { background: #2433C4; border-color: #2433C4; }

/* "A few steps on the way" (small steps inside a floor, group 44) under the step text */
.rtStepNote { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; color: #B8236A; font-size: 13px; font-weight: 600; }

.rtSuggIcon--bus { background: transparent; width: auto; min-width: 32px; }
.rtSuggIcon--bus .bus-list-line { font-size: 13px; }
.rtSuggHead { margin: 12px 4px 2px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

/* "Choose on the map": a short bar instead of the route box, so the map is free to tap */
.rtSuggIcon.is-map { background: var(--blue-soft); color: var(--blue); }
.rtPickBar { display: flex; align-items: center; gap: 10px; padding: 10px 4px 12px; }
.rtPickBar .rtDot--a { background: var(--blue); }
.rtPickBar .rtDot--b { background: #E8408F; }
.rtPickText { flex: 1; font-size: 15px; font-weight: 600; line-height: 1.3; }
.rtPickCancel {
  flex: none; height: 38px; padding: 0 14px; border: 0; border-radius: 10px;
  background: #F2F3F5; color: var(--ink); font: 600 14px/1 inherit; font-family: inherit; cursor: pointer;
}
@media (min-width: 980px) { .rtPickBar { padding-top: 20px; } }

/* "Choose on the map" only on phones: on a computer you just click the map */
@media (min-width: 980px) { .rtSugg li:has(> .rtSuggMap) { display: none; } }
