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

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}

.gallery-lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.gallery-lightbox__figure {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 64px 20px 24px;
}

.gallery-lightbox__img {
  max-width: min(960px, 100%);
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.gallery-lightbox__caption {
  max-width: min(960px, 100%);
  margin: 16px 0 0;
  color: #fff;
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
}

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