/* lightbox.css — FLIP expand from grid to centered overlay. */

.lb {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.lb.is-open { display: flex; opacity: 1; }

.lb__stage {
  position: relative;
  max-width: min(92vw, 1400px);
  max-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb__media {
  max-width: 92vw;
  max-height: 86vh;
  width: auto; height: auto;
  object-fit: contain;
  will-change: transform;
}
.lb__media.placeholder {
  width: min(80vw, 1100px);
  aspect-ratio: 16 / 10;
  max-height: 86vh;
}

.lb__close {
  position: fixed;
  top: var(--space); right: var(--space);
  z-index: 2;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
}
.lb__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 28px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.lb__nav:hover { opacity: 1; }
.lb__nav--prev { left: var(--space); }
.lb__nav--next { right: var(--space); }
.lb__counter {
  position: fixed;
  left: 50%; bottom: var(--space);
  transform: translateX(-50%);
  z-index: 2;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.lb__caption {
  position: fixed;
  left: 50%; bottom: calc(var(--space) + 26px);
  transform: translateX(-50%);
  z-index: 2;
  font-size: var(--fs-label);
  color: var(--color-text);
  text-align: center;
  max-width: 80vw;
}

@media (prefers-reduced-motion: reduce) {
  .lb, .lb__media { transition: none; }
}
