/* Lightbox for the gallery modules — companion to js/lightbox.js. */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(12, 12, 14, 0.92);
}

.lightbox-overlay.open {
  display: flex;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox-figure {
  margin: 0;
  max-width: min(100%, 1400px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: var(--q2-radius-md, 8px);
  box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.7);
}

.lightbox-caption {
  color: #f2f2f2;
  text-align: center;
  font-size: 0.95rem;
  max-width: 70ch;
}

.lightbox-caption p {
  margin: 0;
}

.lightbox-overlay button {
  position: absolute;
  background: none;
  border: 0;
  color: #f2f2f2;
  cursor: pointer;
  line-height: 1;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  transition: background-color 0.15s ease;
}

.lightbox-overlay button:hover,
.lightbox-overlay button:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.lightbox-close {
  top: 0.75rem;
  right: 1rem;
  font-size: 2.5rem;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
}

.lightbox-prev {
  left: 0.5rem;
}

.lightbox-next {
  right: 0.5rem;
}

.lightbox-item {
  display: block;
  cursor: zoom-in;
}
