/* FINAL OCEANFRONT MODAL FIX
   Keeps the overlay fullscreen and centers ONLY the inner popup card. */

#oceanfrontModal,
#frontBeachModal,
#oceanfront-modal,
.bb-oceanfront-overlay-fixed {
  position: fixed !important;
  inset: 0 !important;
  left: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  margin: 0 !important;
  transform: none !important;
  z-index: 999998 !important;
  background: rgba(0, 12, 22, .58) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 18px !important;
  box-sizing: border-box !important;
}

#oceanfrontModal:not(.is-open),
#frontBeachModal:not(.is-open),
#oceanfront-modal:not(.is-open) {
  display: none !important;
}

#oceanfrontModal.is-open,
#frontBeachModal.is-open,
#oceanfront-modal.is-open,
.bb-oceanfront-overlay-fixed.is-open {
  display: flex !important;
}

/* If an older patch accidentally added the modal-fixed class to the overlay, undo it here. */
#oceanfrontModal.bb-oceanfront-modal-fixed,
#frontBeachModal.bb-oceanfront-modal-fixed,
#oceanfront-modal.bb-oceanfront-modal-fixed {
  position: fixed !important;
  inset: 0 !important;
  left: 0 !important;
  top: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  transform: none !important;
  margin: 0 !important;
}

#oceanfrontModal > .bb-modal,
#frontBeachModal > .bb-modal,
#oceanfront-modal > .bb-modal,
.bb-oceanfront-modal-fixed {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  z-index: 999999 !important;
  width: min(640px, calc(100vw - 32px)) !important;
  max-width: min(640px, calc(100vw - 32px)) !important;
  margin: 0 auto !important;
  border-radius: 22px !important;
  box-shadow: 0 30px 90px rgba(0,0,0,.45) !important;
}

@media (max-width: 768px) {
  #oceanfrontModal > .bb-modal,
  #frontBeachModal > .bb-modal,
  #oceanfront-modal > .bb-modal,
  .bb-oceanfront-modal-fixed {
    width: calc(100vw - 28px) !important;
    max-width: calc(100vw - 28px) !important;
  }
}
