.img-preview__target {
    cursor: zoom-in;
}

body.img-preview-open {
    overflow: hidden;
}

.img-preview__dialog {
    margin: 0;
    border: 0;
    padding: 0;
    max-width: none;
    max-height: none;
    width: 100vw;
    height: 100vh;
    background: transparent;
}

.img-preview__dialog::backdrop {
    background: rgba(0, 0, 0, 0.8);
}

.img-preview__content {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.img-preview__full {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.img-preview__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    border: 0;
    background: #fff;
    color: #104656;
    border-radius: 0.5rem;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.img-preview__close:hover,
.img-preview__close:focus-visible {
    background: #104656;
    color: #fff;
}

.doc .imageblock.img-preview img,
.doc img.img-preview,
.doc .img-preview img {
    max-width: min(100%, 720px);
}

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

    .img-preview__close {
        top: 0.75rem;
        right: 0.75rem;
    }
}
