/**
 * Zipanda storefront — prevent full-page lock from theme preload / orphan modals.
 * Loaded after styles.css; works without JavaScript.
 */
html.site-storefront-root .preload.preload-container,
.preload.preload-container {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  z-index: -1 !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Newsletter auto-popup disabled (jQuery .modal() incompatible with Bootstrap 5) */
html.site-storefront-root .auto-popup.modal-newsletter {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Orphan overlays when no modal/offcanvas is open */
html.site-storefront-root body.site-storefront:not(.modal-open):not(.offcanvas-open) .modal-backdrop,
html.site-storefront-root body.site-storefront:not(.modal-open):not(.offcanvas-open) .offcanvas-backdrop,
html.site-storefront-root body.site-storefront:not(.modal-open):not(.offcanvas-open) #searchBackdrop {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

html.site-storefront-root body.site-storefront:not(.modal-open):not(.offcanvas-open) {
  overflow: auto !important;
  padding-right: 0 !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

@supports selector(body:has(.modal.show)) {
  html.site-storefront-root body.site-storefront:not(:has(.modal.show)):not(:has(.offcanvas.show)) {
    overflow: auto !important;
    padding-right: 0 !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html.site-storefront-root body.site-storefront:not(:has(.modal.show)):not(:has(.offcanvas.show)) .modal-backdrop,
  html.site-storefront-root body.site-storefront:not(:has(.modal.show)):not(:has(.offcanvas.show)) .offcanvas-backdrop,
  html.site-storefront-root body.site-storefront:not(:has(.modal.show)):not(:has(.offcanvas.show)) #searchBackdrop {
    display: none !important;
    pointer-events: none !important;
    opacity: 0 !important;
  }
}

#zipandaLoginModal.modal.show {
  z-index: 10050 !important;
}

body.modal-open.zipanda-allow-modal-backdrop .modal-backdrop.show,
body.zipanda-login-modal-open .modal-backdrop.show {
  z-index: 10040 !important;
}
