.gallery-modal-trigger {
 cursor: zoom-in;
 transition: opacity 0.2s ease, transform 0.2s ease;
}

.gallery-modal-trigger:hover {
 opacity: 0.86;
 transform: scale(1.015);
}

.gallery-modal-open {
 overflow: hidden;
}

.gallery-image-modal {
 align-items: center;
 display: flex;
 inset: 0;
 justify-content: center;
 opacity: 0;
 pointer-events: none;
 position: fixed;
 transition: opacity 0.25s ease;
 z-index: 9999;
}

.gallery-image-modal.is-open {
 opacity: 1;
 pointer-events: auto;
}

.gallery-image-modal__backdrop {
 background: rgba(0, 0, 0, 0.88);
 border: 0;
 cursor: zoom-out;
 inset: 0;
 padding: 0;
 position: absolute;
}

.gallery-image-modal__dialog {
 align-items: center;
 display: flex;
 flex-direction: column;
 max-height: 94vh;
 max-width: min(94vw, 1200px);
 position: relative;
 width: auto;
 z-index: 1;
}

.gallery-image-modal__close {
 align-items: center;
 background: #fff;
 border: 0;
 border-radius: 50%;
 color: #000;
 cursor: pointer;
 display: flex;
 font-size: 34px;
 height: 46px;
 justify-content: center;
 line-height: 1;
 position: absolute;
 right: -18px;
 top: -18px;
 width: 46px;
 z-index: 2;
}

.gallery-image-modal__image-wrap {
 align-items: center;
 display: flex;
 justify-content: center;
 max-height: 82vh;
 max-width: 94vw;
}

.gallery-image-modal__image-wrap img {
 background: #090909;
 border: 1px solid rgba(255, 255, 255, 0.18);
 box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
 display: block;
 height: auto;
 max-height: 82vh;
 max-width: 94vw;
 object-fit: contain;
 width: auto;
}

.gallery-image-modal__caption {
 color: #fff;
 margin-top: 16px;
 max-width: min(94vw, 900px);
 text-align: center;
}

.gallery-image-modal__caption h3 {
 color: #fff;
 font-size: 22px;
 line-height: 1.25;
 margin: 0;
}

.gallery-image-modal__caption p {
 color: rgba(255, 255, 255, 0.78);
 font-size: 15px;
 margin: 6px 0 0;
 min-height: auto;
}

@media (max-width: 767px) {
 .gallery-image-modal__dialog {
  max-height: 92vh;
  max-width: 92vw;
 }

 .gallery-image-modal__close {
  font-size: 30px;
  height: 42px;
  right: -10px;
  top: -14px;
  width: 42px;
 }

 .gallery-image-modal__image-wrap,
 .gallery-image-modal__image-wrap img {
  max-height: 76vh;
  max-width: 92vw;
 }

 .gallery-image-modal__caption h3 {
  font-size: 18px;
 }

 .gallery-image-modal__caption p {
  font-size: 14px;
 }
}
