/* Final Explore navigation gadget: one balanced 2x2 control. */
html body .app-shell .map-stage {
  --mappi-gadget-size: 84px;
  --mappi-gadget-right: clamp(20px, 3vw, 30px);
  --mappi-gadget-bottom: clamp(104px, 12vh, 122px);
  --mappi-gadget-line: rgba(220, 255, 247, 0.17);
  --mappi-gadget-cell: rgba(255, 255, 255, 0.065);
  --mappi-gadget-cell-active: rgba(105, 225, 194, 0.18);
}

html body .app-shell .map-navigation-gadget,
html body main.app-shell section.map-stage .map-navigation-gadget {
  position: absolute !important;
  right: var(--mappi-gadget-right) !important;
  bottom: var(--mappi-gadget-bottom) !important;
  z-index: 620 !important;
  box-sizing: border-box !important;
  display: none !important;
  grid-template: repeat(2, minmax(0, 1fr)) / repeat(2, minmax(0, 1fr)) !important;
  width: var(--mappi-gadget-size) !important;
  height: var(--mappi-gadget-size) !important;
  min-width: var(--mappi-gadget-size) !important;
  min-height: var(--mappi-gadget-size) !important;
  max-width: var(--mappi-gadget-size) !important;
  max-height: var(--mappi-gadget-size) !important;
  gap: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 19px !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(96, 226, 194, 0.16), transparent 46%),
    linear-gradient(145deg, rgba(7, 55, 68, 0.94), rgba(3, 31, 45, 0.92)) !important;
  box-shadow:
    0 16px 36px rgba(0, 18, 30, 0.27),
    inset 0 0 0 1px rgba(221, 255, 247, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
  backdrop-filter: blur(16px) saturate(1.12) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.12) !important;
}

html body .app-shell .map-stage.map-focus .map-navigation-gadget,
html body main.app-shell section.map-stage.map-focus .map-navigation-gadget {
  display: grid !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

html body .app-shell .map-stage:not(.map-focus) .map-navigation-gadget {
  display: none !important;
}

html body .app-shell .map-stage.map-focus .map-navigation-gadget > *,
html body main.app-shell section.map-stage.map-focus .map-navigation-gadget > * {
  position: relative !important;
  inset: auto !important;
  box-sizing: border-box !important;
  display: grid !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #f5fffc !important;
  background: var(--mappi-gadget-cell) !important;
  box-shadow: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

html body .app-shell .map-stage.map-focus #locateButton.hidden-control {
  display: grid !important;
}

html body .app-shell .map-stage.map-focus #locateButton {
  grid-area: 1 / 1 !important;
  border-right: 1px solid var(--mappi-gadget-line) !important;
  border-bottom: 1px solid var(--mappi-gadget-line) !important;
}

html body .app-shell .map-stage.map-focus .map-compass {
  grid-area: 2 / 1 !important;
  overflow: hidden !important;
  border-right: 1px solid var(--mappi-gadget-line) !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

html body .app-shell .map-stage.map-focus #mapZoomInButton {
  grid-area: 1 / 2 !important;
  border-bottom: 1px solid var(--mappi-gadget-line) !important;
}

html body .app-shell .map-stage.map-focus #mapZoomOutButton {
  grid-area: 2 / 2 !important;
}

html body .app-shell .map-stage.map-focus .map-navigation-gadget > *:hover,
html body .app-shell .map-stage.map-focus .map-navigation-gadget > *:active {
  background: var(--mappi-gadget-cell-active) !important;
}

html body .app-shell .map-stage.map-focus .map-navigation-gadget > *:focus-visible {
  z-index: 2 !important;
  outline: 2px solid rgba(142, 244, 211, 0.9) !important;
  outline-offset: -3px !important;
}

html body .app-shell .map-stage.map-focus #locateButton [data-icon],
html body .app-shell .map-stage.map-focus #locateButton svg {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  color: #eafff8 !important;
  stroke-width: 2.2 !important;
  filter: none !important;
}

html body .app-shell .map-stage.map-focus #locateButton .locate-label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

html body .app-shell .map-stage.map-focus .map-gadget-zoom-button {
  cursor: pointer !important;
  font-size: 1.34rem !important;
  font-weight: 760 !important;
  line-height: 1 !important;
  text-shadow: none !important;
}

html body .app-shell .map-stage.map-focus .map-navigation-gadget .map-compass::before {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 24px !important;
  height: 24px !important;
  content: "" !important;
  border: 1px solid rgba(232, 255, 249, 0.3) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.055) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
  transform: translate(-50%, -50%) !important;
}

html body .app-shell .map-stage.map-focus .map-navigation-gadget .map-compass::after {
  display: none !important;
  content: none !important;
}

html body .app-shell .map-stage.map-focus .map-navigation-gadget .map-compass-needle {
  top: calc(50% - 9px) !important;
  left: 50% !important;
  width: 2px !important;
  height: 18px !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #ff625d 0 48%, #f8fffb 49% 100%) !important;
  box-shadow: none !important;
  transform-origin: 50% 50% !important;
}

html body .app-shell .map-stage.map-focus .map-navigation-gadget .map-compass-needle::before,
html body .app-shell .map-stage.map-focus .map-navigation-gadget .map-compass-needle::after {
  display: none !important;
  content: none !important;
}

html body .app-shell .map-stage.map-focus .map-navigation-gadget .map-compass strong {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

@media (max-width: 720px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  html body .app-shell .map-stage {
    --mappi-gadget-size: 88px;
    --mappi-gadget-right: max(16px, env(safe-area-inset-right));
    --mappi-gadget-bottom: calc(var(--bottom-nav-height, 78px) + env(safe-area-inset-bottom) + 18px);
  }

  html body .app-shell .map-navigation-gadget,
  html body main.app-shell section.map-stage .map-navigation-gadget {
    position: fixed !important;
    border-radius: 20px !important;
  }

  html body .app-shell .map-stage.map-focus .map-gadget-zoom-button {
    font-size: 1.4rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .app-shell .map-stage.map-focus .map-navigation-gadget > * {
    transition: none !important;
  }
}
