/* ==========================================================================
   Полноэкранный просмотр фото (18, VgSdf): страница экспоната, фотоархив материалов
   и историй. Разметка — components/lightbox.html, сценарий — js/lightbox.js.
   Тёмный фон на весь экран — и на мобайле, и на десктопе.
   ========================================================================== */
.lightbox {
  background: var(--camera-bg);
  color: var(--cream);
}

.lightbox__panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 16px 26px;
}

.lightbox__top {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lightbox__close,
.lightbox__spacer {
  flex: none;
  width: 42px;
  height: 42px;
}

.lightbox__close {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--line-on-dark);
  color: var(--cream);
}

.lightbox__close .icon {
  width: 19px;
  height: 19px;
}

.lightbox__counter {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--line-on-dark);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* Фото листается свайпом (scroll-snap), стрелками и клавишами ← →. */
.lightbox__stage {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
}

.lightbox__track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overscroll-behavior: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.lightbox__track::-webkit-scrollbar {
  display: none;
}

.lightbox__slide {
  display: flex;
  flex: 0 0 100%;
  align-items: center;
  justify-content: center;
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.lightbox__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox__arrow {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 50%;
  background: var(--overlay-ink-72);
  color: var(--cream);
}

.lightbox__arrow .icon {
  width: 20px;
  height: 20px;
}

.lightbox__arrow--prev {
  left: 0;
}

.lightbox__arrow--next {
  right: 0;
}

/* Нижняя часть фиксированной высоты (как в макете): длина подписи не двигает фото. */
.lightbox__bottom {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  min-height: 128px;
}

.lightbox__caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: min(100%, 640px);
  text-align: center;
}

.lightbox__exhibit {
  color: var(--text-on-camera);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.lightbox__text {
  font-size: 12.5px;
  font-weight: 300;
  line-height: 19px;
}

.lightbox__dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.lightbox__dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgb(255 255 255 / 0.32); /* #FFFFFF52 в макете, в tokens.css нет */
  transition: width 0.2s ease, background-color 0.2s ease;
}

.lightbox__dot.is-active {
  width: 18px;
  background: var(--cream);
}

@media (hover: hover) {
  .lightbox__close:hover,
  .lightbox__arrow:hover {
    filter: brightness(1.3);
  }
}
