/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2025-2026 Robworks Software LLC */

/* ============================================================
   Lightbox Modal - Click-to-enlarge for content images
   ============================================================ */

/* ---- Clickable image indicators ---- */

.lightbox-ready {
  cursor: zoom-in;
  transition: opacity 0.15s ease;
}

.lightbox-ready:hover {
  opacity: 0.85;
}

/* ---- Modal overlay ---- */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  cursor: zoom-out;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ---- Modal image ---- */

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  transform: scale(0.95);
  transition: transform 0.2s ease;
  cursor: default;
}

.lightbox-overlay.active img {
  transform: scale(1);
}

/* ---- Close button ---- */

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ---- Prevent background scroll ---- */

body.lightbox-open {
  overflow: hidden;
}
