.D_ModalContent, .D_ModalContentImg {
    background: #fff;
    max-width: 90%;
    padding: 10px;
    transform: scale(1);
    margin: auto;
    word-break: break-word;
}

.D_ModalContentImg{
    background-color: rgb(0 0 0 / 0%);
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.D_ModalContentImg>img{
    max-height:100%;
    max-width:100%;
}

.D_ModalClose {
    width: 45px;
    height: 45px;
    position: fixed;
    top: 0px;
    right: 15px;
    cursor: pointer;
    display: block;
    content: url('data:image/svg+xml; utf8, <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-x" fill="white" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/></svg>');
}

.D_ModalCounter{
    width: 40px;
    height: 40px;
    position: fixed;
    right: 50%;
    left: 50%;
    color: white;
    top: 10px;
    font-size: 19px;
    display: block;
}

.D_ModalCloseImg{
    width: 45px;
    height: 45px;
    position: fixed;
    top: 0px;
    right: 15px;
    cursor: pointer;
    display: block;
    content: url('data:image/svg+xml; utf8, <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-x" fill="white" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/></svg>');
}

.D_ModalArrowRight{
    width: 40px;
    height: 100%;
    position: fixed;
    right: 18px;
    padding-right: 5px;
    cursor: pointer;
    display: block;
    content:url('data:image/svg+xml; utf8, <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-chevron-right" fill="white" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/></svg>');
}

.D_ModalArrowLeft{
    width: 40px;
    height: 100%;
    position: fixed;
    left: 18px;
    padding-left: 5px;
    cursor: pointer;
    display: block;
    content: url('data:image/svg+xml; utf8, <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-chevron-left" fill="white" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/></svg>');
}

#D_Overlay {
    z-index: 1000;
    position: fixed;
    background-color: rgba(0, 0, 0, 0.7);
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
    display: none;
}

.D_ModalWindow, .D_ModalWindowImg {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    overflow: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: none;
    flex-flow: column nowrap;
    justify-content: flex-start;
    align-items: center;
    z-index: 1001;
    padding: 30px 0;
}

.D_ModalWindowImg{
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.D_modal_lock_scroll {
    position: fixed;
    right: 0;
    left: 0;
}

@media (max-width: 768px) {
    .D_ModalClose, .D_ModalCloseImg {
        top: 2px;
        right: 2px;
        background: none;
    }
    .D_ModalArrowLeft, .D_ModalArrowRight{
        display:none;
    }
    .D_ModalWindow, .D_ModalWindowImg{
        padding: 40px 0;
    }
}