* =========================
   LIGHTBOX
========================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 40px;

  background: rgba(0, 0, 0, 0.9);

  /* Hidden by default */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}


/* Open state */

.lightbox.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}


/* =========================
   LIGHTBOX CONTENT
========================= */

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;

  text-align: center;
}


/* =========================
   LIGHTBOX IMAGE
========================= */

.lightbox-image {
  display: block;

  width: auto;
  height: auto;

  max-width: 100%;
  max-height: 82vh;

  margin: 0 auto;

  opacity: 1;

  transition: opacity 0.35s ease;
}


/* Used while changing images */

.lightbox-image.is-fading {
  opacity: 0;
}


/* =========================
   CAPTION
========================= */

.lightbox-caption {
  margin-top: 15px;

  color: #f8f3e0;
  font-size: 1rem;

  opacity: 1;

  transition: opacity 0.35s ease;
}


/* Fade caption too */

.lightbox-caption.is-fading {
  opacity: 0;
}


/* =========================
   CLOSE BUTTON
========================= */

.lightbox-close {
  position: absolute;

  top: 20px;
  right: 25px;

  z-index: 2;

  padding: 0;

  border: 0;
  background: transparent;

  color: #ba4446;

  font-size: 48px;
  line-height: 1;

  cursor: pointer;

  transition: opacity 0.2s ease;
}


/* =========================
   ARROWS
========================= */

.lightbox-arrow {
  position: absolute;

  top: 50%;

  z-index: 2;

  transform: translateY(-50%);

  padding: 20px;

  border: 0;
  background: transparent;

  color: #ba4446;

  font-size: 60px;
  line-height: 1;

  cursor: pointer;

  transition: opacity 0.2s ease;
}


.lightbox-prev {
  left: 20px;
}


.lightbox-next {
  right: 20px;
}


/* =========================
   BUTTON HOVERS
========================= */

.lightbox-close:hover,
.lightbox-arrow:hover {
  opacity: 0.6;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {



  .lightbox {
    padding: 20px;
  }


  .lightbox-image {
    max-height: 78vh;
  }


  .lightbox-arrow {
    padding: 10px;
    font-size: 40px;
  }


  .lightbox-prev {
    left: 5px;
  }


  .lightbox-next {
    right: 5px;
  }


  .lightbox-close {
    top: 10px;
    right: 15px;

    font-size: 40px;
  }

}
