/* =========================================================
   GlowWithBella - Fullscreen Lightbox CSS
   ========================================================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox[aria-hidden="true"] { display: none; }

.lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  cursor: pointer;
}

/* Close button */
.lightbox__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 10;
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition-fast);
}
.lightbox__close:hover { background: rgba(255,255,255,0.25); }

/* Counter */
.lightbox__counter {
  position: absolute;
  top: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: rgba(255,255,255,0.75);
  font-size: var(--font-size-sm);
  font-weight: 500;
  background: rgba(0,0,0,0.4);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

/* Navigation arrows */
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 52px; height: 52px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition-fast);
}
.lightbox__nav:hover { background: rgba(255,255,255,0.25); }
.lightbox__nav--prev { left: var(--space-4); }
.lightbox__nav--next { right: var(--space-4); }

/* Main content area */
.lightbox__content {
  position: relative;
  z-index: 5;
  max-width: 90vw;
  max-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__content img {
  max-width: 90vw;
  max-height: calc(100vh - 180px);
  object-fit: contain;
  border-radius: var(--radius-md);
  user-select: none;
}

.lightbox__content video {
  max-width: 90vw;
  max-height: calc(100vh - 180px);
  border-radius: var(--radius-md);
}

.lightbox__content iframe {
  width: 80vw;
  height: 60vh;
  border-radius: var(--radius-md);
  border: none;
}

/* Bottom thumbnail strip */
.lightbox__thumbs {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: rgba(0,0,0,0.7);
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.lightbox__thumbs::-webkit-scrollbar { display: none; }

.lightbox__thumb {
  flex-shrink: 0;
  width: 56px; height: 70px;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(255,255,255,0.25);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
  position: relative;
  background: none;
  padding: 0;
}
.lightbox__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox__thumb.active { border-color: var(--color-primary); transform: scale(1.08); }
.lightbox__thumb:hover { border-color: rgba(255,255,255,0.6); }
.lightbox__thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  font-size: 14px;
  color: #fff;
}

/* Zoom animation for opening */
@keyframes lightboxOpen {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
.lightbox__content { animation: lightboxOpen 0.25s ease forwards; }

/* Swipe hint on mobile */
@media (max-width: 767px) {
  .lightbox__nav { display: none; }
  .lightbox__thumbs { gap: 6px; padding: var(--space-2) var(--space-4); }
  .lightbox__thumb { width: 44px; height: 55px; }
  .lightbox__content { max-width: 100vw; max-height: calc(100vh - 140px); }
  .lightbox__content img, .lightbox__content video { max-width: 100vw; }
}
