/* OVERVIEW_CONTROLS_R3: the existing LS zoom buttons belong to the explicit
   full-route view. The close button uses exactly the same form and hit area. */
#vectorFollowRoot #vfmZoomInBtn,
#vectorFollowRoot #vfmZoomOutBtn,
#vectorFollowRoot #vfmOverviewCloseBtn {
  display: none !important;
}

#vectorFollowRoot.vfm-route-overview #vfmZoomInBtn,
#vectorFollowRoot.vfm-route-overview #vfmZoomOutBtn,
#vectorFollowRoot.vfm-route-overview #vfmOverviewCloseBtn {
  display: flex !important;
  visibility: visible !important;
  position: fixed !important;
  right: calc(12px + env(safe-area-inset-right, 0px)) !important;
  left: auto !important;
  bottom: auto !important;
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  height: 72px !important;
  min-height: 72px !important;
  max-height: 72px !important;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 0 !important;
  align-items: center;
  justify-content: center;
  border-width: 2px;
  border-radius: 18px !important;
  font-size: 34px !important;
  line-height: 1 !important;
  touch-action: manipulation;
  pointer-events: auto;
}
#vectorFollowRoot #vfmZoomInBtn { top: calc(50% - 116px) !important; }
#vectorFollowRoot #vfmZoomOutBtn { top: calc(50% - 36px) !important; }
#vectorFollowRoot #vfmOverviewCloseBtn { top: calc(50% + 44px) !important; }
#vectorFollowRoot.vfm-route-overview .vfm-right-col { z-index: 30; }

#vectorFollowRoot .vfm-zoom-btn::after { content: none; }

body.vfm-menu-open #vectorFollowRoot :is(#vfmZoomInBtn, #vfmZoomOutBtn, #vfmOverviewCloseBtn),
body.ls-rotation-freeze #vectorFollowRoot :is(#vfmZoomInBtn, #vfmZoomOutBtn, #vfmOverviewCloseBtn),
#vectorFollowRoot.vfm-elevation-peek :is(#vfmZoomInBtn, #vfmZoomOutBtn, #vfmOverviewCloseBtn),
#vectorFollowRoot:has(#vfmElevationPanel:not(.vfm-hidden)) :is(#vfmZoomInBtn, #vfmZoomOutBtn, #vfmOverviewCloseBtn) {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Reserve the existing control width only while the full-route view is open. */
@media (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) and (max-height: 480px) {
  #vectorFollowRoot.vfm-route-overview #vfmZoomInBtn { top: calc(50% - 148px) !important; }
  #vectorFollowRoot.vfm-route-overview #vfmZoomOutBtn { top: calc(50% - 68px) !important; }
  #vectorFollowRoot.vfm-route-overview #vfmOverviewCloseBtn { top: calc(50% + 12px) !important; }
  #vectorFollowRoot.vfm-route-overview .vfm-right-col .vfm-hud-alt,
  #vectorFollowRoot.vfm-route-overview .ls-speed-hud,
  #vectorFollowRoot.vfm-route-overview .vfm-info-btn.vfm-info-btn-nature {
    translate: -80px 0;
  }
}
