/* Lightbox — a native <dialog> that shows one work large, with its catalogue label */

.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: clamp(1rem, 4vw, 2.5rem);
  border: 0;
  background: rgba(26, 19, 16, 0.97);
  color: var(--paper);
}
.lightbox[open] {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 1.25rem;
  animation: lightbox-in 0.25s ease;
}
.lightbox::backdrop {
  background: transparent;
}

.lightbox__figure {
  display: grid;
  grid-template-rows: minmax(0, auto) auto;
  align-content: center;
  justify-items: center;
  gap: 1rem;
  min-height: 0;
}
.lightbox__image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  object-fit: contain;
  align-self: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}
.lightbox__caption {
  display: grid;
  gap: 0.2rem;
  text-align: center;
}
.lightbox__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-style: italic;
}
.lightbox__meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(244, 239, 231, 0.65);
}

.lightbox__actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}
.lightbox__step,
.lightbox__close {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  font: inherit;
  font-size: 1.25rem;
  color: var(--paper);
  background: rgba(244, 239, 231, 0.1);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lightbox__step:hover,
.lightbox__close:hover {
  background: rgba(244, 239, 231, 0.22);
}
.lightbox__close {
  position: absolute;
  top: clamp(0.75rem, 3vw, 1.5rem);
  right: clamp(0.75rem, 3vw, 1.5rem);
  z-index: 1;
  font-size: 1.6rem;
}

@keyframes lightbox-in {
  from {
    opacity: 0;
  }
}
