/**
 * Shared "larger image" popup (TwentyOneC\Core\Lightbox, assets/js/lightbox.js).
 * z-index sits above the 21C Exhibitions overlay and curtains (100000).
 */

[data-c21-lightbox] img {
  cursor: zoom-in;
}

[data-c21-lightbox] img:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.c21-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.c21-lightbox[hidden] {
  display: none;
}

.c21-lightbox .c21-lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  margin: 0;
  padding: 0;
}

.c21-lightbox .c21-lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  margin: 0;
  border: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.c21-lightbox .c21-lightbox__caption {
  max-width: 90vw;
  margin: 0.75rem 0 0;
  padding: 0.35rem 0.75rem;
  border-radius: 0.25rem;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.4;
  text-align: center;
}

.c21-lightbox .c21-lightbox__caption[hidden] {
  display: none;
}

.c21-lightbox .c21-lightbox__button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}

.c21-lightbox .c21-lightbox__button:hover {
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
}

.c21-lightbox .c21-lightbox__button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

.c21-lightbox .c21-lightbox__button[hidden] {
  display: none;
}

.c21-lightbox .c21-lightbox__close {
  top: 1rem;
  right: 1rem;
}

.c21-lightbox .c21-lightbox__prev {
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
}

.c21-lightbox .c21-lightbox__next {
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
}
