/* ADERA FULL-SCREEN SCROLLABLE PHOTO GALLERY V2 */

.adera-photo-zoomable {
  cursor: zoom-in !important;
  -webkit-tap-highlight-color: transparent;
}

.adera-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  background: rgba(8, 8, 8, 0.97);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.adera-photo-lightbox.is-open {
  display: block;
}

.adera-photo-lightbox-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.adera-photo-lightbox-slide {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding:
    max(70px, env(safe-area-inset-top))
    14px
    max(68px, env(safe-area-inset-bottom));
}

.adera-photo-lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 96vw;
  max-height: 78dvh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.adera-photo-lightbox-caption {
  max-width: 92vw;
  margin-top: 16px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.adera-photo-lightbox-close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  z-index: 5;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.adera-photo-lightbox-counter {
  position: fixed;
  top: max(22px, calc(env(safe-area-inset-top) + 6px));
  left: 18px;
  z-index: 5;
  min-width: 58px;
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.adera-photo-lightbox-hint {
  position: fixed;
  left: 50%;
  bottom: max(15px, env(safe-area-inset-bottom));
  z-index: 5;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  white-space: nowrap;
}

body.adera-lightbox-open {
  overflow: hidden !important;
}

@media (max-width: 760px) {
  .adera-photo-lightbox-slide {
    padding-left: 8px;
    padding-right: 8px;
  }

  .adera-photo-lightbox-image {
    max-width: 100%;
    max-height: 80dvh;
    border-radius: 12px;
  }

  .adera-photo-lightbox-caption {
    font-size: 14px;
  }
}
