
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    border-radius: 10px;
    box-sizing: border-box;
    z-index: 10000;
}


.modal.open {
    opacity: 1;
    display: block;
    animation: fade ease 0.6s forwards;
}

.modal-bg {
    display: none;
    position: fixed;
    background: rgba(0, 0, 0, 0.8);
    z-index: 5000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.modal-bg.open {
    visibility: visible;
    opacity: 1;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    animation: fadein ease 0.6s forwards;
}

.modal .modal-close {
    position: absolute;
    top: -30px;
    right: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.modal .modal-close:before {
    transform: translate(-50%) rotate(45deg);
}

.modal .modal-close:before, .modal .modal-close:after {
    content: "";
    position: absolute;
    width: 24px;
    height: 2px;
    top: 50%;
    left: 50%;
    background: #fff;
    transform-origin: center;
}
.modal .modal-close:after {
    transform: translate(-50%) rotate(-45deg);
}
.modal .modal-close:before, .modal .modal-close:after {
    content: "";
    position: absolute;
    width: 24px;
    height: 2px;
    top: 50%;
    left: 50%;
    background: #fff;
    transform-origin: center;
}
.modal--slider {
    padding: 0;
}
.modal-container img{
    max-height: 85vh;
    max-width: 85vw;
    width: auto;
}

.modal.fadeout {
    animation: fadeout ease 0.6s forwards;
}

.modal-bg.fadeout {
    animation: fadeout ease 0.6s forwards;
}


.modal--slider .modal-slider {
    position: relative;
    width: auto;
    max-width: 85vw;
    max-height: 85vh;
    margin: 0 auto;
}

.modal--slider .swiper-button-next {
    right: -57px;
    width: 22px;
    height: 40px;
    margin-top: -30px;
    background-size: contain;
    background-origin: content-box;
}

.modal--slider .swiper-button-prev {
    left: -57px;
    width: 22px;
    height: 40px;
    margin-top: -30px;
    background-size: contain;
    background-origin: content-box;
}

.modal--slider .swiper-slide {
    text-align: center;
    overflow: hidden;
}

.modal--slider .swiper-slide {
    text-align: center;
    overflow: hidden;
}

.swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    transition-property: transform;
}

@media screen and (max-width: 767px) {

    .modal .modal-close {
        top: -8vw;
        width: 5.33333vw;
        height: 5.33333vw;
    }
    .modal--slider .modal-slider {
        width: 85vw;
        max-height: 85vh;
    }
    .modal--slider .swiper-button-next {
        right: -6vw;
        width: 5vw;
        height: 8vw;
        margin-top: -6vw;
    }
    .modal--slider .swiper-button-prev {
        left: -6vw;
        width: 5vw;
        height: 8vw;
        margin-top: -6vw;
    }
    .modal--slider .swiper-slide img {
        width: 100%;
        height: auto;
    }
}
