.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100dvh;
  background: #000;
  color: #fff;
  touch-action: none;
  outline: none;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__stage {
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 64px;
  box-sizing: border-box;
}

.lightbox__image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  appearance: none;
  outline: none;
  box-shadow: none;
}

.lightbox__close:focus,
.lightbox__nav:focus,
.lightbox__close:focus-visible,
.lightbox__nav:focus-visible {
  outline: none;
  box-shadow: none;
}

.lightbox__close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
}

.lightbox__close svg {
  display: block;
}

.lightbox__nav {
  top: 50%;
  width: 48px;
  height: 64px;
  transform: translateY(-50%);
}

.lightbox__nav--prev {
  left: 8px;
}

.lightbox__nav--next {
  right: 8px;
}

.lightbox__nav[hidden] {
  display: none;
}

.js-lightbox-gallery .gallery-item.image {
  cursor: pointer;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .lightbox__stage {
    padding: 56px 40px;
  }

  .lightbox__nav--prev {
    left: 0;
  }

  .lightbox__nav--next {
    right: 0;
  }
}
