.image-lightbox-trigger {
  cursor: zoom-in;
}

.image-lightbox-trigger:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 5px;
}

body.image-lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 72px 24px 24px;
  overflow: auto;
  background: rgba(8, 8, 12, 0.94);
  opacity: 1;
  transition: opacity 180ms ease;
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 94vw;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  cursor: zoom-in;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.42);
}

.image-lightbox__image[hidden],
.image-lightbox__graphic[hidden] {
  display: none !important;
}

.image-lightbox__graphic {
  box-sizing: border-box;
  width: min(94vw, 1800px);
  max-height: calc(100vh - 80px);
  padding: clamp(12px, 2vw, 28px);
  overflow: hidden;
  color: #212121;
  background: #fff7e7;
  cursor: zoom-in;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.42);
}

.image-lightbox__graphic > svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 120px);
}

.image-lightbox.is-actual-size {
  display: block;
}

.image-lightbox.is-actual-size .image-lightbox__image {
  width: min(1800px, 180vw);
  max-width: none;
  max-height: none;
  margin: 0 auto;
  cursor: zoom-out;
}

.image-lightbox.is-actual-size .image-lightbox__graphic {
  width: min(1800px, 180vw);
  max-height: none;
  margin: 0 auto;
  cursor: zoom-out;
}

.image-lightbox.is-actual-size .image-lightbox__graphic > svg {
  max-height: none;
}

.image-lightbox__toolbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 56px;
  padding: max(8px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  background: linear-gradient(to bottom, rgba(8, 8, 12, 0.98), rgba(8, 8, 12, 0.82));
}

.image-lightbox__zoom,
.image-lightbox__close {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.image-lightbox__zoom {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font: 500 13px/1 Arial, sans-serif;
  letter-spacing: 0.02em;
}

.image-lightbox__close {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  font: 300 30px/38px Arial, sans-serif;
  text-align: center;
}

.image-lightbox__zoom:hover,
.image-lightbox__zoom:focus-visible,
.image-lightbox__close:hover,
.image-lightbox__close:focus-visible {
  border-color: #fff;
  background: #fff;
  color: #08080c;
  outline: none;
}

@media (max-width: 767px) {
  .image-lightbox {
    padding: 68px 12px 20px;
  }

  .image-lightbox__image {
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 84px);
  }

  .image-lightbox__graphic {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 84px);
    padding: 12px;
  }

  .image-lightbox__graphic > svg {
    max-height: calc(100vh - 108px);
  }

  .image-lightbox.is-actual-size .image-lightbox__image {
    width: 200vw;
  }

  .image-lightbox.is-actual-size .image-lightbox__graphic {
    width: 200vw;
  }
}

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