/* R128.1: keep provider profile and booking proposal dialogs in the viewport. */
body.f24-provider-viewport-modal-open main {
  contain: none !important;
}

#provider-profile-modal-overlay,
[data-f24-booking-proposal-overlay="true"] {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-height: none !important;
  z-index: 2147483000 !important;
  isolation: isolate;
  overscroll-behavior: contain;
}

#provider-profile-modal-overlay > :first-child,
[data-f24-booking-proposal-overlay="true"] > :first-child {
  max-height: min(90dvh, 900px);
}

@media (max-width: 639px) {
  #provider-profile-modal-overlay,
  [data-f24-booking-proposal-overlay="true"] {
    align-items: flex-end !important;
    justify-content: center !important;
    padding: max(0px, env(safe-area-inset-top)) 0 0 !important;
  }

  #provider-profile-modal-overlay > :first-child,
  [data-f24-booking-proposal-overlay="true"] > :first-child {
    width: 100% !important;
    max-width: none !important;
    max-height: min(86dvh, 760px) !important;
    margin: auto 0 0 !important;
    border-bottom-right-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    padding-bottom: max(1rem, env(safe-area-inset-bottom)) !important;
  }
}
