.modal-photo { cursor: zoom-in; }

.photo-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 60px;
    background: rgba(0, 0, 0, .88);
}
.photo-modal.is-open { display: flex; }

.photo-modal__figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
}
.photo-modal__img {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0, 0, 0, .5);
}
.photo-modal__caption {
    margin-top: 12px;
    color: #fff;
    font-size: 15px;
    text-align: center;
}

.photo-modal__btn {
    position: absolute;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}
.photo-modal__btn:hover,
.photo-modal__btn:focus-visible { background: rgba(255, 255, 255, .3); outline: none; }
.photo-modal__btn[hidden] { display: none; }

.photo-modal__close { top: 16px; right: 16px; }
.photo-modal__prev  { left: 16px;  top: 50%; transform: translateY(-50%); }
.photo-modal__next  { right: 16px; top: 50%; transform: translateY(-50%); }

html.photo-modal-open,
html.photo-modal-open body { overflow: hidden; }

@media (max-width: 600px) {
    .photo-modal { padding: 20px 8px; }
    .photo-modal__prev, .photo-modal__next { width: 40px; height: 40px; font-size: 26px; }
}

[data-photo-text] img { cursor: zoom-in; }