.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

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

.img-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.img-lightbox__body {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(92vw, 720px);
  max-height: min(88vh, 960px);
}

.img-lightbox__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(88vh, 960px);
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.img-lightbox__close {
  position: absolute;
  top: calc(0.75rem + env(safe-area-inset-top));
  right: calc(0.75rem + env(safe-area-inset-right));
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.img-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.img-lightbox__close:focus-visible {
  outline: 2px solid #90be20;
  outline-offset: 2px;
}

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

[data-image-lightbox-src] {
  cursor: zoom-in;
}

[data-image-lightbox-src]:focus-visible {
  outline: 2px solid #90be20;
  outline-offset: 2px;
}
