/*
 * Global modal/backdrop layer contract.
 *
 * A modal must be a direct child of <body>.  modal-layer-stability.js adds
 * the classes below before Bootstrap paints the backdrop.  Keeping the
 * rules class-scoped avoids changing ordinary fixed menus and offcanvas UI.
 */
html body > .modal.playza-layer-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: var(--playza-modal-z, 32010) !important;
  filter: none !important;
  isolation: isolate;
}

html body > .modal.playza-layer-modal.show {
  visibility: visible !important;
}

html body > .modal.playza-layer-modal > .modal-dialog {
  position: relative;
  z-index: 1 !important;
  filter: none !important;
}

html body > .modal-backdrop.playza-layer-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: var(--playza-backdrop-z, 32000) !important;
  pointer-events: auto;
}

/* SweetAlert confirmations can be opened from an already open Bootstrap
   modal.  They must therefore remain above the complete modal stack. */
html body > .swal2-container {
  z-index: 2147483647 !important;
}

@media (max-width: 991.98px) {
  html body > .modal.playza-layer-modal,
  html body > .modal.playza-layer-modal > .modal-dialog,
  html body > .modal.playza-layer-modal > .modal-dialog > .modal-content {
    filter: none !important;
  }

  html body > .modal-backdrop.playza-layer-backdrop {
    width: 100vw !important;
    height: 100dvh !important;
    transform: none !important;
  }
}

