/* ── Lightbox Overlay ────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ── Image ───────────────────────────────────────── */
.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-img.visible {
  opacity: 1;
}

/* ── Controls ────────────────────────────────────── */
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 2;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 36px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: white;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 40px;
  cursor: pointer;
  padding: 12px 16px;
  line-height: 1;
  border-radius: 50%;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.2);
  color: white;
}

/* ── Info Bar ────────────────────────────────────── */
.lightbox-info {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  text-align: center;
  max-width: 80vw;
  padding: 8px 16px;
  background: rgba(0,0,0,0.4);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lightbox-info:empty {
  display: none;
}

/* ── Actions (delete button for authed users) ──── */
.lightbox-actions {
  position: absolute;
  top: 16px;
  left: 20px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.lightbox-actions button {
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.2s;
}

.lightbox-actions button:hover {
  background: rgba(255,80,80,0.3);
  color: white;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    padding: 8px 12px;
    font-size: 28px;
  }

  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }

  .lightbox-close {
    top: 12px;
    right: 12px;
    font-size: 28px;
  }
}
