.modal-window {
    position: fixed;
    z-index: 999999999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;


    display: flex;
    justify-content: center;
    align-items: flex-start;

    padding: 1rem 2rem;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;

    opacity: 0;
    visibility: hidden;

    transition: all 250ms ease-out;

    @media (min-width: $mobileP1) {
        padding: 50px 50px;
    }

    @media (min-width: $tabletSmallP1) {
        align-items: flex-start;
    }
    // .modal-window--active

    &--active {
        opacity: 1;
        visibility: visible;
        transition: all 250ms ease-out;
    }

    // .modal-window__fader

    &__fader {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        // background: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.5) 100%);
        background: #0e211bb3;
    }

    // .modal-window__container

    &__container {
    }

    // .modal-window__item

    &__item {
        width: calc(100% - 10rem);
        position: relative;
        z-index: 5;
        margin: auto;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        visibility: hidden;
        pointer-events: none;

        // .modal-window__item--active

        &--active {
        position: relative;
        top: 0;
        left: 0;
        transform: translate(0);
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        width: 100%;
        }
    }

    // .modal-window__close-icon

    &__close-icon {
        width: 3.2rem;
        height: 3.2rem;
        flex-shrink: 0;
        background-color: $secondary;
        border-radius: 50%;

        position: absolute;
        display: flex;
        align-items: center;
        justify-content: center;

        z-index: 2;
        top: -4rem;
        right: 0rem;


        &::before {
            content: '';
            width: 4.4rem;
            height: 4.4rem;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        
        img,
        svg {
            width: 1.6rem;
            height: 1.6rem;
            object-fit: contain;
        }
    }




    .modal-video-item__wr-iframe {
        position: relative;
        height: 0;
        width: 100%;
        padding-bottom: 56.3%;
        overflow: hidden;

        @media (min-width: $tabletSmallP1) {
            margin: auto;
        }

        iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }
    }
}
body:has(.gallery--white-background) {
    .modal-window__fader {
        background: rgba($white, .5);
    }
}