/* Alcance Travel & Tours — SABRE results viewport correction.
   Scoped to mobile flight-results popup; no desktop or account-modal changes.
   The parent plugin sets max-height:97vh on the panel and centers it,
   leaving the page visible below on iPhone / simulated Safari. */
@media screen and (max-width: 960px) {
  html body .mphmodal[data-flight-modal]:not([hidden]) {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important; /* older iPhone fallback */
    height: var(--alcance-sabre-visible-height, 100dvh) !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 8px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
  }

  html body .mphmodal[data-flight-modal]:not([hidden]) > .mphmodal__panel {
    position: relative !important;
    display: flex !important;
    flex: 1 1 auto !important;
    align-self: stretch !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  html body .mphmodal[data-flight-modal]:not([hidden]) .mphmodal__content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  html body .mphmodal[data-flight-modal]:not([hidden]) .mphmodal__header,
  html body .mphmodal[data-flight-modal]:not([hidden]) .mphmodal__footer {
    flex: 0 0 auto !important;
  }

  html body .mphmodal[data-flight-modal]:not([hidden]) .mphmodal__footer {
    padding-bottom: max(9px, env(safe-area-inset-bottom, 0px)) !important;
  }
}
