/* Overlay */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  touch-action: none;
}

/* Container */
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  text-align: center;
  color: #fff;
  padding-top: 2rem;
}

/* Image */
.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  display: block;
  margin: 0 auto;
}

/* Caption */
.lightbox-caption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Buttons */
.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

.lightbox-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10000;
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  transform: none;
  z-index: 10000;
  font-size: 1.25rem;
}

/* Top-right controls container */
.lightbox-topbar {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 1;
  font-size: 0.85rem;
}

/* Index text */
.lightbox-counter {
  position: fixed;
  top: 1.5rem;
  right: 3.7rem;
  color: #fff;
  font-size: 1.25rem;
  z-index: 10000;
  white-space: nowrap;
}

/* Zoom states */
.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  transition: transform 220ms ease;
  transform-origin: center center;
  will-change: transform;
  cursor: zoom-in;
  user-select: none;
}

.lightbox-content img.is-zoomed {
  cursor: grab;
}

.lightbox-content img.is-dragged {
  cursor: grabbing !important;
}
.lightbox-content img.is-moving {
  transition: none;
}


.lightbox-overlay.is-zoomed .lightbox-prev,
.lightbox-overlay.is-zoomed .lightbox-next,
.lightbox-overlay.is-zoomed .lightbox-caption {
  display: none;
}
