.lightbox {
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: white;
  z-index: 1000;
  animation: lightboxIn 0.4s;
  transition: opacity 0.3s;
}

.lightbox__container {
  margin: 0 auto;
  width: 80%;
  text-align: center;
}

.lightbox__loader {
  width: 38px;
  height: 38px;
  background: url("../icons/loader.svg") center center no-repeat;
}

.lightbox.fadeOut {
  opacity: 0;
}

.lightbox figure {
  animation: lightboxIn 0.4s;
}

.lightbox button {
  cursor: pointer;
  transition: opacity 0.2s;
  text-indent: -3000px;
  z-index: 1001;
}

.lightbox button:hover {
  opacity: 0.5;
}

.lightbox__close {
  width: 50px;
  height: 50px;
  background: url("../icons/close.svg") center center / 20px 20px no-repeat;
  position: fixed;
  top: 2%;
  left: auto;
  right: 1%;
}

.lightbox__next,
.lightbox__prev {
  background: url("../icons/arrow.svg") center center / 20px 26px no-repeat;
  width: 50px;
  height: 50px;
  position: fixed;
  top: 50%;
  right: 0%;
  margin-top: -25px;
}

.lightbox__prev {
  right: auto;
  left: 0%;
  transform: rotate(180deg);
}

.lightbox img {
  object-fit: contain;
  max-height: 80vh;
}

@keyframes lightboxIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media screen and (min-width: 60rem) {
  .lightbox__container {
    width: 100%;
  }
  .lightbox__next {
    right: 1%;
  }

  .lightbox__prev {
    left: 1%;
  }
}
