/* ---------------------------------------------------
   LIGHTBOX OVERLAY
--------------------------------------------------- */

.basicLightbox {
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
}

.basicLightbox__placeholder {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.basicLightbox__placeholder > * {
  pointer-events: auto;
}


/* ---------------------------------------------------
   LIGHTBOX LAYOUT
--------------------------------------------------- */

.lightbox-gallery {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  padding: 2rem 4.5rem;
  box-sizing: border-box;
  overflow: hidden;
}

.lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.lightbox-image {
  position: absolute;
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: opacity;
}

.lightbox-image.is-active {
  z-index: 2;
  opacity: 1;
  transition: opacity 0.42s ease;
}

.lightbox-image.is-buffer {
  z-index: 3;
  opacity: 0;
  transition: opacity 0.42s ease;
}

.lightbox-image.is-buffer.is-visible {
  opacity: 1;
}

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


/* ---------------------------------------------------
   LIGHTBOX ARROWS
--------------------------------------------------- */

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  width: 60px;
  height: 60px;
  opacity: 0.65;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  z-index: 20;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-prev:focus,
.lightbox-next:focus {
  outline: none;
  opacity: 1;
}

.lightbox-prev svg,
.lightbox-next svg {
  width: 50px;
  height: 50px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.lightbox-prev {
  left: 4px;
}

.lightbox-next {
  right: 4px;
}


/* ---------------------------------------------------
   LIGHTBOX CLOSE
--------------------------------------------------- */

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: 0;
  color: #ffffff;
  font-size: 2.25rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
  padding: 0;
  width: 44px;
  height: 44px;
  appearance: none;
  -webkit-appearance: none;
  transition: opacity 0.2s ease;
  z-index: 20;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-close:focus {
  outline: none;
  opacity: 1;
}


/* ---------------------------------------------------
   GALLERY GRID UX
--------------------------------------------------- */

.js-lightbox {
  cursor: zoom-in;
}

.gallery-grid-item {
  overflow: hidden;
}

.gallery-grid-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.35s ease;
}

@media (hover: hover) and (pointer: fine) {
  .gallery-grid-item:hover img {
    transform: scale(1.04);
  }
}


/* ---------------------------------------------------
   OPENING ANIMATION
--------------------------------------------------- */

.basicLightbox--visible .lightbox-gallery {
  animation: lightboxFadeIn 0.2s ease;
}

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


/* ---------------------------------------------------
   LIGHTBOX COUNTER
--------------------------------------------------- */

.lightbox-counter {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 20;

  padding: 0.35rem 0.7rem;
  border-radius: 999px;

  background: rgba(0, 0, 0, 0.42);
  color: rgba(255, 255, 255, 0.9);

  font-size: 0.875rem;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;

  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}



/* ---------------------------------------------------
   RESPONSIVE
--------------------------------------------------- */

@media (max-width: 575.98px) {
  .lightbox-counter {
    bottom: 0.9rem;
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }
}


@media (max-width: 991.98px) {
  .lightbox-gallery {
    padding: 1.5rem 4rem;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }
}

@media (max-width: 767.98px) {
  .lightbox-gallery {
    padding: 1rem 3.25rem;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 52px;
    height: 52px;
  }

  .lightbox-prev svg,
  .lightbox-next svg {
    width: 42px;
    height: 42px;
  }

  .lightbox-close {
    top: 0.75rem;
    right: 0.75rem;
    font-size: 2rem;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 575.98px) {
  .lightbox-gallery {
    padding: 0.75rem 2.75rem;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 46px;
    height: 46px;
  }

  .lightbox-prev svg,
  .lightbox-next svg {
    width: 36px;
    height: 36px;
  }
}