/* Applied only to the direct navigator; standard map pages keep their UI. */
html.scanmap-navigation-only { --top-h: 0px !important; --bottom-h: 0px !important; }
html.scanmap-navigation-only body { margin: 0; overflow: hidden; }
html.scanmap-navigation-only body > :not(#app):not(#scanmapNavigatorPanel):not(#route-info):not(#scanmap-direct-navigation):not(#scanmapNavAudioHelp):not(#scanmap-location-dialog):not(script):not(style),
html.scanmap-navigation-only body #app > :not(#map):not(#route-info):not(#scanmapNavigatorPanel):not(script):not(style),
html.scanmap-navigation-only body :is(#floatingPopup, #chat-box, #scanmapNearbyToast, #scanmapSaveItineraryBtn, .mapboxgl-popup) {
  display: none !important;
}
html.scanmap-navigation-only body #map {
  position: fixed !important; inset: 0 !important; width: 100% !important; height: 100% !important;
}
html.scanmap-navigation-only body #scanmap-direct-navigation {
  display: grid !important; position: fixed; z-index: 6000;
  grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 2px;
  align-items: center;
  left: max(12px, env(safe-area-inset-left)); bottom: max(12px, env(safe-area-inset-bottom));
  width: min(560px, calc(100vw - 24px)); box-sizing: border-box;
  max-height: calc(100dvh - 24px); overflow-y: auto;
  border: 1px solid #30343b; border-radius: 14px; padding: 7px 10px;
  background: #090c10; color: #fff; box-shadow: 0 6px 24px #0005;
  font: 13px/1.25 system-ui, sans-serif; color-scheme: dark;
}
#scanmap-direct-navigation .scanmap-direct-brand {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
#scanmap-direct-navigation h1 {
  grid-column: 1; grid-row: 1; align-self: end; margin: 0;
  font-size: 14px; line-height: 1.2; font-weight: 750; overflow-wrap: anywhere; color: #fff;
}
#scanmap-direct-navigation .scanmap-direct-modes {
  grid-column: 2; grid-row: 1 / 3; display: flex; gap: 5px; align-self: center;
}
#scanmap-direct-navigation button {
  cursor: pointer; font: inherit; font-weight: 650; min-height: 44px; min-width: 44px;
  border-radius: 9px; padding: 6px 10px; border: 1px solid #41464e;
  background: #20242b; color: #f5f7fa;
}
#scanmap-direct-navigation button[aria-pressed="true"] { background: #086ea8; color: #fff; border-color: #4cb4ed; }
#scanmap-direct-navigation button:focus-visible { outline: 3px solid #25aaff; outline-offset: 3px; }
#scanmap-direct-navigation p {
  grid-column: 1; grid-row: 2; align-self: start;
  margin: 0; color: #bdc7d2; font-size: 11px; line-height: 1.25; overflow-wrap: anywhere;
}
#scanmap-direct-navigation .scanmap-direct-retry {
  grid-column: 2; grid-row: 2; margin: 0; background: #20242b;
  font-size: 12px; align-self: start;
}
/* Errors and a stopped navigation keep their complete message and retry action. */
#scanmap-direct-navigation:has(.scanmap-direct-retry:not([hidden])) {
  row-gap: 5px;
}
#scanmap-direct-navigation:has(.scanmap-direct-retry:not([hidden])) h1 { align-self: center; }
#scanmap-direct-navigation:has(.scanmap-direct-retry:not([hidden])) .scanmap-direct-modes { grid-row: 1; }
#scanmap-direct-navigation:has(.scanmap-direct-retry:not([hidden])) p { align-self: center; }
#scanmap-direct-navigation [hidden] { display: none !important; }
.scanmap-direct-pin { color: #fff; background: #086ea8; width: 28px; height: 28px; border-radius: 50%; border: 3px solid #fff; display: grid; place-items: center; box-shadow: 0 2px 8px #0005; }
html.scanmap-navigation-only body :is(#scanmapNavigatorPanel, #route-info).scanmap-navv2-host[data-scanmap-nav-panel="2"] {
  top: max(12px, env(safe-area-inset-top)) !important; left: 12px !important;
  width: min(760px, calc(100vw - 24px)) !important; max-width: calc(100vw - 24px) !important;
  max-height: calc(100dvh - 240px) !important;
}
@media (max-height: 550px) and (min-width: 600px) {
  html.scanmap-navigation-only body #scanmap-direct-navigation { left: auto; right: 12px; width: 300px; }
  html.scanmap-navigation-only body :is(#scanmapNavigatorPanel, #route-info).scanmap-navv2-host[data-scanmap-nav-panel="2"] { width: calc(100vw - 336px) !important; max-height: calc(100dvh - 24px) !important; }
}
@media (max-width: 350px) {
  html.scanmap-navigation-only body #scanmap-direct-navigation { column-gap: 6px; padding: 7px 8px; }
  #scanmap-direct-navigation .scanmap-direct-modes { gap: 4px; }
  #scanmap-direct-navigation button { padding-inline: 8px; font-size: 12px; }
}
/* Location request: shown only in direct navigation, with an explicit browser permission action. */
#scanmap-location-dialog {
  position: fixed; inset: 0; margin: auto; padding: 30px;
  width: min(440px, calc(100vw - 32px)); box-sizing: border-box;
  max-height: calc(100dvh - 32px); overflow: auto; z-index: 7000;
  background: #fff; color: #172839; color-scheme: light;
  border: 1px solid #dce5eb; border-radius: 22px;
  box-shadow: 0 24px 90px #0005; font: 15px/1.55 system-ui, sans-serif;
}
#scanmap-location-dialog::backdrop { background: #071b2b99; backdrop-filter: blur(3px); }
#scanmap-location-dialog:not([open]), #scanmap-location-dialog [hidden] { display: none !important; }
#scanmap-location-dialog .scanmap-location-icon {
  display: grid; place-items: center; width: 55px; height: 55px; margin-bottom: 17px;
  border-radius: 17px; background: #e7f4fc; color: #086ea8; font-size: 39px; line-height: 1;
}
#scanmap-location-dialog .scanmap-location-brand { display: block; color: #527086; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 10px; }
#scanmap-location-dialog h2 { margin: 0 0 15px; color: #172839; font: 750 27px/1.15 system-ui, sans-serif; }
#scanmap-location-dialog p { color: #344f62; margin: 0 0 16px; font-size: 15px; line-height: 1.55; }
#scanmap-location-dialog .scanmap-location-help { background: #f2f6f9; padding: 13px 15px; border-radius: 11px; font-size: 13px; }
#scanmap-location-dialog .scanmap-location-actions { display: grid; gap: 9px; margin-top: 24px; }
#scanmap-location-dialog button { min-height: 48px; padding: 11px 16px; border-radius: 11px; cursor: pointer; font: 650 14px/1.4 system-ui, sans-serif; border: 1px solid #d4e1e9; background: #fff; color: #344f62; }
#scanmap-location-dialog .scanmap-location-enable { background: #086ea8; color: #fff; border-color: #086ea8; }
#scanmap-location-dialog .scanmap-location-enable:hover { background: #045482; }
#scanmap-location-dialog button:focus-visible { outline: 3px solid #25aaff; outline-offset: 3px; }
@media (max-width: 400px) { #scanmap-location-dialog { padding: 24px; } #scanmap-location-dialog h2 { font-size: 24px; } }
