/* Tazers Lightbox - site-wide image viewer. */

.tz-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 10, 10, 0.97);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  cursor: zoom-out;
}
.tz-lightbox.is-open { display: flex; }

.tz-lightbox__figure {
  margin: 0;
  max-width: 95vw;
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  cursor: default;
}
.tz-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.tz-lightbox__caption {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--tz-cream);
  text-align: center;
  max-width: 65ch;
  opacity: 0.85;
}
.tz-lightbox__caption:empty { display: none; }

/* Nav buttons */
.tz-lightbox__close,
.tz-lightbox__prev,
.tz-lightbox__next {
  position: absolute;
  background: transparent;
  border: 1px solid rgba(245, 239, 226, 0.3);
  color: var(--tz-cream);
  width: 48px;
  height: 48px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.tz-lightbox__close:hover,
.tz-lightbox__prev:hover,
.tz-lightbox__next:hover {
  background: var(--tz-red);
  border-color: var(--tz-red);
  color: var(--tz-cream);
}
.tz-lightbox__close:focus-visible,
.tz-lightbox__prev:focus-visible,
.tz-lightbox__next:focus-visible {
  outline: 2px solid var(--tz-cream);
  outline-offset: 2px;
}
.tz-lightbox__close { top: 20px; right: 20px; }
.tz-lightbox__prev  { left: 20px;  top: 50%; transform: translateY(-50%); }
.tz-lightbox__next  { right: 20px; top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
  .tz-lightbox { padding: 16px; }
  .tz-lightbox__prev,
  .tz-lightbox__next { top: auto; bottom: 20px; transform: none; }
  .tz-lightbox__prev { left: 50%;  margin-left: -52px; }
  .tz-lightbox__next { right: 50%; margin-right: -52px; }
}

/* Body lock when lightbox open */
body.tz-lightbox-open { overflow: hidden; }

/* Make any element wired to the lightbox feel clickable */
[data-tz-lightbox] { cursor: zoom-in; }
