/* Modern lightbox replacing legacy Prototype/lightbox stack. */

body.nf-lightbox-open {
  overflow: hidden;
}

#nf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#nf-lightbox[hidden] {
  display: none;
}

.nf-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 85%);
}

.nf-lightbox__dialog {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1100px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.nf-lightbox__img {
  max-width: 96vw;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 8px 40px rgb(0 0 0 / 45%);
  background: #000;
}

.nf-lightbox__caption {
  margin: 0;
  color: #fff;
  font:
    14px / 1.4 Georgia,
    "Times New Roman",
    serif;
  text-align: center;
}

.nf-lightbox__close,
.nf-lightbox__prev,
.nf-lightbox__next {
  position: absolute;
  border: 0;
  background: rgb(0 31 71 / 80%);
  color: #fff;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: 4px;
}

.nf-lightbox__close {
  top: -8px;
  right: -8px;
}

.nf-lightbox__prev,
.nf-lightbox__next {
  top: 50%;
  transform: translateY(-50%);
}

.nf-lightbox__prev {
  left: -56px;
}

.nf-lightbox__next {
  right: -56px;
}

@media (max-width: 800px) {
  .nf-lightbox__prev {
    left: 8px;
  }

  .nf-lightbox__next {
    right: 8px;
  }

  .nf-lightbox__close {
    right: 8px;
    top: 8px;
  }
}
