/* Leave animation-created containing blocks behind once a menu has opened.
   Nested form dialogs must be positioned relative to the viewport. */
.vertex-v3 #app#app#app#app :is(#findSheet,#layerPanel,#routePlanner,#routeDetail,#recordSheet,#youSheet,#exploreSheet,#activitiesSheet,#activityDetail,#compareSheet,#avalancheSheet,#todayBriefSheet,#weatherView,#communityView,#placeCard) {
  animation-fill-mode:backwards!important;
}

/* At 16px Safari can focus fields without automatically zooming the page. */
@media (pointer:coarse), (max-width:899px) {
  .vertex-v3 .auth-gate :is(input,textarea,select),
  .vertex-v3 #app#app#app#app#app :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),textarea,select) {
    font-size:16px!important;
  }
}

html[data-keyboard-open] .vertex-v3 #app#app#app#app#app [data-keyboard-panel] {
  position:fixed!important;
  top:auto!important;
  bottom:var(--keyboard-bottom)!important;
  height:min(440px,calc(var(--keyboard-view-height) - 16px))!important;
  min-height:0!important;
  max-height:calc(var(--keyboard-view-height) - 16px)!important;
  margin-top:0!important;
  margin-bottom:0!important;
  padding-bottom:12px!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  scroll-padding:80px 12px 16px;
  -webkit-overflow-scrolling:touch;
  transform:none!important;
  translate:none!important;
  clip-path:none!important;
  animation:none!important;
}
/* A blurred or animated parent otherwise traps fixed nested dialogs in its
   own bounds, even when the child knows the keyboard's position. */
html[data-keyboard-open] .vertex-v3 #app#app#app#app#app :is(#communityView,#routeDetail,#weatherView):has([data-keyboard-panel]) {
  transform:none!important;
  translate:none!important;
  filter:none!important;
  backdrop-filter:none!important;
  clip-path:none!important;
  animation:none!important;
}
/* Search sits right above the keyboard; only its results shrink to fit. */
html[data-keyboard-open] .vertex-v3 #app#app#app#app#app #findSheet[data-keyboard-panel] {
  top:auto!important;
  bottom:calc(var(--keyboard-bottom) + 8px)!important;
  height:auto!important;
  max-height:calc(var(--keyboard-view-height) - 16px)!important;
}
html[data-keyboard-open] .vertex-v3 #app#app#app#app#app #findSheet[data-keyboard-panel] #searchResults {
  max-height:calc(var(--keyboard-view-height) - 140px)!important;
}
html[data-keyboard-open] .vertex-v3 #app#app#app#app#app :is(.profile-editor-sheet,.publish-route-sheet,.community-safety-sheet)[data-keyboard-panel] {
  left:12px!important;
  right:12px!important;
  width:auto!important;
  max-width:520px!important;
  margin-left:auto!important;
  margin-right:auto!important;
  z-index:110!important;
}
html[data-keyboard-open] .vertex-v3 .auth-gate[data-keyboard-panel] {
  top:var(--keyboard-view-top)!important;
  bottom:auto!important;
  height:var(--keyboard-view-height)!important;
  min-height:0!important;
  overflow-y:auto!important;
  align-items:flex-start;
  padding:12px!important;
  scroll-padding:12px;
}
html[data-keyboard-open] .vertex-v3 [data-keyboard-panel] :is(input,textarea,select,[contenteditable="true"]) {
  scroll-margin:80px 12px 16px;
}
