img[data-zoom],
[data-zoom-scope] img {
    cursor: zoom-in;
}

.zoom-box {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 4vh 4vw;
    background: rgba(8, 10, 13, 0.94);
}

.zoom-box.is-open {
    display: flex;
}

.zoom-box.is-zoomed {
    align-items: flex-start;
}

.zoom-box__backdrop {
    position: absolute;
    inset: 0;
}

.zoom-box__img {
    position: relative;
    display: block;
    max-width: 92vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    cursor: zoom-out;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.zoom-box__img.is-actual {
    max-width: none;
    max-height: none;
    cursor: zoom-in;
}

.zoom-box__btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 50%;
    background: rgba(15, 18, 22, 0.72);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.zoom-box__btn[hidden] {
    display: none;
}

.zoom-box__btn:hover,
.zoom-box__btn:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    border-color: #fff;
    outline: none;
}

.zoom-box__btn--close {
    top: 20px;
    right: 20px;
}

.zoom-box__btn--prev {
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
}

.zoom-box__btn--next {
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
}

.zoom-box__caption {
    position: absolute;
    left: 50%;
    bottom: 18px;
    max-width: 80vw;
    margin: 0;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.zoom-box__caption:empty {
    display: none;
}

body.zoom-lock {
    overflow: hidden;
}

@media (max-width: 640px) {
    .zoom-box__btn {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .zoom-box__btn--prev {
        left: 8px;
    }

    .zoom-box__btn--next {
        right: 8px;
    }
}
