/* OnlyShows 0.11.14: native mobile keyboard resizing and a true full-height add-show page. */

@media (max-width: 719px) {
  /*
   * The viewport now resizes its layout box when the IME opens. Keep the
   * database shell at the layout edge; applying the keyboard height again
   * would lift the shell twice and create the large black strip.
   */
  html body > .mobile-bottom-shell {
    bottom: calc(8px + env(safe-area-inset-bottom)) !important;
  }

  /*
   * The add-show experience is a mobile page, not a 92% bottom sheet. Filling
   * the complete viewport also prevents wallpaper from showing while Android
   * restores the viewport after the keyboard or a side-swipe back gesture.
   */
  html body #searchDialog.search-dialog[open] {
    display: block;
    position: fixed;
    inset: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    border-radius: 0 !important;
    overflow: hidden auto;
    overscroll-behavior: contain;
    background: var(--surface-container-high) !important;
  }

  html body #searchDialog.search-dialog .remote-results {
    max-height: none;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}
