/* Shared frontend media-gallery placement using the configurable loader presentation. */
.pxab-gallery-modal__loader.pxab-configurable-loader,
.pxab-gallery-modal__load-error{
  position:absolute;
  inset:0;
  z-index:5;
  min-height:100%;
  box-sizing:border-box;
  padding:24px;
  pointer-events:none;
}
.pxab-gallery-modal__loader.pxab-configurable-loader{overflow:visible}
/* The loader may only paint while the gallery stage is authoritatively busy.
   This prevents a stale/unhidden loader from tinting an idle photo if runtime
   state is interrupted by a theme/script error. */
.pxab-gallery-modal__stage[aria-busy="true"] > .pxab-gallery-modal__loader.pxab-configurable-loader:not([hidden]){display:flex}
.pxab-gallery-modal__stage[aria-busy="false"] > .pxab-gallery-modal__loader.pxab-configurable-loader{display:none!important}
.pxab-gallery-modal__loader[hidden],
.pxab-gallery-modal__load-error[hidden]{display:none!important}
.pxab-gallery-modal__loader.pxab-configurable-loader::before{border-radius:inherit}
.pxab-gallery-modal__loader-box{max-width:min(88vw,420px)}
.pxab-gallery-modal__load-error{
  inset:auto;
  justify-self:center;
  align-self:center;
  max-width:min(88vw,420px);
  padding:14px 18px;
  border:1px solid rgba(255,255,255,.22);
  border-radius:20px;
  background:rgba(15,23,42,.88);
  color:#fff;
  box-shadow:0 22px 60px rgba(0,0,0,.34);
  font-size:.95rem;
  font-weight:750;
  line-height:1.45;
  text-align:center;
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
}
/* Keep the currently rendered photo visible while the next full-size image
   is fetched/decoded. The configurable loader is already positioned above the
   stage, so its backdrop and message now read as an overlay on the media rather
   than replacing the image with an empty stage. A genuine load error still
   hides the failed image. */
.pxab-gallery-modal.has-photo-load-error .pxab-gallery-modal__image{
  opacity:0!important;
  visibility:hidden!important;
}
.pxab-gallery-modal.is-loading-photo .pxab-gallery-modal__caption,
.pxab-gallery-modal.has-photo-load-error .pxab-gallery-modal__caption{visibility:hidden}
.pxab-gallery-modal :where(.pxab-gallery-modal__nav,.pxab-gallery-modal__zoom,.pxab-gallery-modal__reset,.pxab-gallery-modal__thumb):disabled{
  opacity:.38!important;
  cursor:wait!important;
  /* Keep disabled controls in the pointer hit-test tree. Removing hit testing
     lets rapid repeat clicks fall through to the modal backdrop and can be
     misinterpreted as a request to close the gallery. */
  pointer-events:auto!important;
}
@media(max-width:520px){
  .pxab-gallery-modal__loader.pxab-configurable-loader{padding:16px}
  .pxab-gallery-modal__load-error{font-size:.88rem}
}
