/* ==========================================================================
   Gallery lightbox (single-post [gallery] shortcode)
   ========================================================================== */

.gallery-lightbox:not([open]) {
  display: none;
}

.gallery-lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
}

.gallery-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.92);
}

.gallery-lightbox__image {
  display: block;
  position: relative;
  z-index: 0;
  max-width: min(96vw, 100%);
  max-height: 90vh;
  width: auto;
  height: auto;
  margin: auto;
  object-fit: contain;
  pointer-events: none;
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
  position: fixed;
  z-index: 2;
  border: none;
  background: transparent;
  color: var(--color-white);
  cursor: pointer;
  line-height: 1;
  padding: 0.5rem;
}

.gallery-lightbox__close {
  top: 0.75rem;
  right: 0.75rem;
  font-size: 2.5rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  pointer-events: auto;
}

.gallery-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
}

.gallery-lightbox__prev {
  left: 0.5rem;
}

.gallery-lightbox__next {
  right: 0.5rem;
}

.gallery-lightbox__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__nav:not(:disabled):hover {
  opacity: 0.85;
}

.gallery-lightbox__close:focus-visible,
.gallery-lightbox__nav:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}
