/* Site-wide lightbox (src/frontend/lib/lightbox.ts). Colours/visibility come from global settings variables. */
.zx-lb {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--zx-lightbox-bg, rgba(0, 0, 0, 0.92));
  color: var(--zx-lightbox-color, #fff);
  animation: zx-lb-in 0.2s ease-out;
  touch-action: pan-y;
  user-select: none;
}
html.zx-lb-open {
  overflow: hidden;
}
.zx-lb__stage {
  max-width: 92vw;
  max-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.zx-lb__img {
  max-width: 92vw;
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  cursor: var(--zx-lightbox-zoom, zoom-in);
  transition: transform 0.25s ease;
}
.zx-lb.is-zoomed .zx-lb__img {
  transform: scale(2);
  cursor: zoom-out;
}
.zx-lb__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  text-align: center;
  font: 14px/1.4 system-ui, sans-serif;
  padding: 0 64px;
  display: var(--zx-lightbox-caption, block);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.zx-lb__counter {
  position: absolute;
  top: 14px;
  left: 16px;
  font: 600 13px/1 system-ui, sans-serif;
  opacity: 0.85;
  display: var(--zx-lightbox-counter, block);
}
.zx-lb__caption[hidden],
.zx-lb__counter[hidden] {
  display: none;
}
.zx-lb__btn {
  position: absolute;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font: 28px/44px system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.15s ease;
}
.zx-lb__btn:hover,
.zx-lb__btn:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  outline: none;
}
.zx-lb__close {
  top: 12px;
  right: 12px;
}
.zx-lb__prev {
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}
.zx-lb__next {
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}
@keyframes zx-lb-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .zx-lb,
  .zx-lb__img {
    animation: none;
    transition: none;
  }
}
/* Video items (media carousel, T188): an iframe / <video> in place of the image. */
.zx-lb__video {
  width: min(92vw, calc(86vh * 16 / 9));
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.zx-lb__video iframe,
.zx-lb__video video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
