.gallery-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  font: inherit;
}

.gallery-image-button img {
  display: block;
  width: 100%;
  height: auto;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  background: rgba(0, 0, 0, 0.9);
}

.lightbox.is-open {
  display: block;
}

.lightbox-dialog {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  cursor: zoom-out;
}

.lightbox-figure {
  max-width: min(1300px, 100%);
  max-height: 100%;
  text-align: center;
}

.lightbox-image-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  cursor: default;
}

.lightbox-image {
  max-width: 100%;
  max-height: calc(100vh - 10rem);
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.lightbox-caption {
  margin-top: 1rem;
  color: #fff;
  font-size: 1rem;
  line-height: 1.5;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 4;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;

  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.7);
}

.lightbox-hit-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: 50%;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.lightbox-hit-zone span {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.lightbox-hit-left {
  left: 0;
}

.lightbox-hit-left span {
  left: 1rem;
}

.lightbox-hit-right {
  right: 0;
}

.lightbox-hit-right span {
  right: 1rem;
}

.lightbox-image-wrap:hover .lightbox-hit-zone,
.lightbox-image-wrap:hover .lightbox-close,
.lightbox-hit-zone:focus-visible,
.lightbox-close:focus-visible {
  opacity: 1;
}

@media (max-width: 768px) {
  .lightbox-dialog {
    padding: 1rem;
  }

  .lightbox-image {
    max-height: calc(100vh - 8rem);
  }

  .lightbox-close {
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.75rem;
    opacity: 1;
  }

  .lightbox-hit-zone {
    opacity: 1;
  }

  .lightbox-hit-zone span {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.5rem;
  }

  .lightbox-hit-left span {
    left: 0.75rem;
  }

  .lightbox-hit-right span {
    right: 0.75rem;
  }
}