/* Full-screen lightbox for private collection thumbnails */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(10, 12, 15, 0.82);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.gallery-lightbox[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  cursor: zoom-out;
}

.gallery-lightbox__inner {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}

.gallery-lightbox__mode--single img {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.gallery-lightbox__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
  transition: background 0.2s ease, color 0.2s ease;
}

.gallery-lightbox__close:hover {
  background: var(--mat);
  color: var(--nav-active);
}

.gallery-lightbox__close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body.gallery-lightbox-open {
  overflow: hidden;
}

/* Available: one image at a time (Swiper in lightbox) */
.gallery-lightbox--available .gallery-lightbox__inner {
  max-width: 100%;
  width: min(100%, 1200px);
  max-height: 92vh;
  align-items: stretch;
}

.gallery-lightbox__mode--available {
  width: 100%;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
}

.gallery-lightbox-available-swiper.swiper {
  width: 100%;
  max-width: min(96vw, 1200px);
  overflow: hidden;
  position: relative;
  padding: 0 0 2.25rem;
  --swiper-theme-color: var(--accent, #1f8a62);
  --swiper-navigation-size: 1.1rem;
  --swiper-navigation-color: rgba(255, 255, 255, 0.95);
  --swiper-pagination-color: var(--accent, #1f8a62);
  --swiper-pagination-bullet-size: 6px;
  --swiper-pagination-bullet-inactive-color: rgba(255, 255, 255, 0.35);
  --swiper-pagination-bullet-inactive-opacity: 1;
  box-sizing: border-box;
}

.gallery-lightbox-available-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.gallery-lightbox__carousel-figure {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: min(75vh, 700px);
}

.gallery-lightbox__carousel-figure img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  display: block;
  user-select: none;
}

.gallery-lightbox-available-swiper .swiper-button-prev,
.gallery-lightbox-available-swiper .swiper-button-next {
  width: 2.5rem;
  height: 2.5rem;
  margin-top: 0;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  color: #fff;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.gallery-lightbox-available-swiper .swiper-button-prev:hover,
.gallery-lightbox-available-swiper .swiper-button-next:hover {
  background: rgba(0, 0, 0, 0.5);
}

.gallery-lightbox-available-swiper .swiper-button-prev::after,
.gallery-lightbox-available-swiper .swiper-button-next::after {
  font-size: 0.9rem;
  font-weight: 700;
}

.gallery-lightbox-available-swiper .swiper-button-disabled {
  opacity: 0.25;
}

@media (max-width: 520px) {
  .gallery-lightbox__carousel-figure {
    min-height: min(65vh, 520px);
  }

  .gallery-lightbox-available-swiper .swiper-button-prev,
  .gallery-lightbox-available-swiper .swiper-button-next {
    width: 2.1rem;
    height: 2.1rem;
  }
}
