/* ============================================================
   Lightbox — exhibition pages only
   Loaded alongside site.v2.min.css on exhibition pages.
   ============================================================ */

/* Thumbnails become zoomable */
.gallery-item {
  cursor: zoom-in;
}

.gallery-item:focus-visible {
  outline: 3px solid var(--color-accent-red, #fc1c16);
  outline-offset: 2px;
}

/* ── Dialog shell ────────────────────────────────────────── */

dialog.lb-dialog {
  padding: 0;
  border: 0;
  margin: 0;
  background: transparent;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  overflow: hidden;
}

/* Backdrop behind the dialog — kept transparent; lb-inner provides the dark overlay */
dialog.lb-dialog::backdrop {
  background: transparent;
}

/* ── Inner area (dark overlay + flex layout) ─────────────── */

.lb-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
}

/* ── Image figure ─────────────────────────────────────────── */

.lb-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  /* Horizontal padding keeps image clear of the prev/next arrows */
  padding: 1rem 5rem;
  max-width: 100%;
  cursor: default;
}

.lb-img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.7);
}

.lb-caption {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  text-align: center;
  margin-top: 0.75rem;
  max-width: 60ch;
  line-height: 1.4;
}

/* ── Close button ─────────────────────────────────────────── */

.lb-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.lb-close:hover,
.lb-close:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

/* ── Prev / Next arrows ───────────────────────────────────── */

.lb-prev,
.lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }

.lb-prev:hover,
.lb-prev:focus-visible,
.lb-next:hover,
.lb-next:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.lb-prev:disabled,
.lb-next:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* ── Narrow screens ───────────────────────────────────────── */

@media (max-width: 480px) {
  .lb-figure {
    padding: 1rem 3rem;
  }

  .lb-prev { left: 0.5rem; }
  .lb-next { right: 0.5rem; }

  .lb-prev,
  .lb-next {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.5rem;
  }
}
