body.lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0c0f0e;
  color: #fff;
}

.image-lightbox::backdrop {
  background: #0c0f0e;
}

.image-lightbox-shell {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 54px 74px 46px;
}

.image-lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 118px);
  object-fit: contain;
  background: #fff;
  box-shadow: 0 24px 70px rgb(0 0 0 / 45%);
  transition: opacity 160ms ease;
}

.image-lightbox-close,
.image-lightbox-nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 50%;
  background: rgb(255 255 255 / 7%);
  color: #fff;
  font: 400 1.6rem/1 var(--font-body, ui-sans-serif, sans-serif);
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.image-lightbox-close:hover,
.image-lightbox-nav:hover {
  border-color: rgb(255 255 255 / 42%);
  background: rgb(255 255 255 / 14%);
}

.image-lightbox-close:focus-visible,
.image-lightbox-nav:focus-visible {
  outline: 2px solid #f4d58d;
  outline-offset: 3px;
}

.image-lightbox-close {
  top: 14px;
  right: 16px;
}

.image-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}

.image-lightbox-prev {
  left: 16px;
}

.image-lightbox-next {
  right: 16px;
}

.image-lightbox-caption {
  position: absolute;
  bottom: 15px;
  left: 50%;
  max-width: calc(100% - 130px);
  margin: 0;
  transform: translateX(-50%);
  color: #c9d0cb;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.image-lightbox-status {
  position: absolute;
  bottom: 38px;
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
  color: #f4d58d;
  font-size: 0.8rem;
  text-align: center;
}

.forms-preview-visual img,
.forms-detail-preview,
.forms-detail-preview img,
.fill-result-grid img,
.fill-page-canvas {
  cursor: zoom-in;
}

@media (max-width: 600px) {
  .image-lightbox-shell {
    padding: 56px 12px 50px;
  }

  .image-lightbox img {
    max-height: calc(100dvh - 132px);
  }

  .image-lightbox-close,
  .image-lightbox-nav {
    width: 42px;
    height: 42px;
  }

  .image-lightbox-prev {
    left: 8px;
  }

  .image-lightbox-next {
    right: 8px;
  }

  .image-lightbox-caption {
    max-width: calc(100% - 40px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .image-lightbox img {
    transition: none;
  }
}
