/*
 * GAINVO Storefront v0.10.55 — Scrolling Phase 4
 * iPhone/iPad viewport stability.
 *
 * Do not size ordinary pages from live VisualViewport/dvh changes while Safari
 * chrome is collapsing/expanding. --gv-viewport-height is maintained by the
 * JS viewport foundation and follows VisualViewport only for a real OSK.
 */
:root{
  --gv-stable-vh:var(--gv-viewport-height,100svh);
}

/* Full-screen application/overlay surfaces use the stable application viewport.
   Ordinary document pages remain auto-height from Phase 1. */
:where(.product-modal,.cart-sheet,.checkout-sheet,.customer-account-sheet,.account-editor-sheet,.order-receipt-sheet,.ios-install-sheet,.location-dialog-card,.ad-details-card){
  max-height:min(var(--gv-overlay-vh,var(--gv-stable-vh)),100%)!important;
}

@supports(height:100svh){
  .gainvo-launch,.gainvo-install-gate{min-height:100svh}
}

/* iOS/PWA: keep fixed chrome composited without forcing layout-height rewrites. */
.gainvo-platform-ios :where(.bottom-nav,.topbar,.mobile-header){
  -webkit-transform:translateZ(0);
  transform:translateZ(0);
}

/* The root document remains the normal vertical scroller. Dynamic toolbar
   movement must not promote app wrappers back into viewport-sized scrollers. */
.gainvo-platform-ios :where(.app-shell,.main,.screen,.screen.active){
  height:auto!important;
  max-height:none!important;
  min-height:0!important;
}

/* Focused fields get a little extra reveal room above the iOS keyboard. */
.gainvo-keyboard-open :where(input,textarea,select,[contenteditable="true"]){
  scroll-margin-block:20px 56px;
}
