/**
 * Bootstrap modal stack — all surfaces (guest / user / owner / admin on product CSS)
 * v1.0.0 — Apr 2026
 *
 * Bootstrap appends .modal-backdrop to body; .modal markup may live inside layout trees.
 * Reinforces backdrop (below) vs .modal.show (above) using design tokens so area chrome
 * (navbar, sidebars) cannot invert the pair when body.modal-open is set.
 *
 * Note: Ancestor `z-index` + `position` stacking contexts can still trap a dialog entirely
 * below a body-level backdrop — fix those by @push('modals') / body-level markup, not CSS alone.
 */
body.modal-open .modal-backdrop.show {
  z-index: var(--z-modal-backdrop);
}

body.modal-open .modal.show {
  z-index: var(--z-modal);
}

/* Clean fallback mode for custom modals when Bootstrap Modal JS is unavailable. */
body.ce-custom-modal-open .modal.ce-custom-modal-show {
  display: block;
  z-index: var(--z-modal);
}

body.ce-custom-modal-open .modal-backdrop.ce-custom-modal-backdrop {
  z-index: var(--z-modal-backdrop);
}
