body.overlay-lock {
    overflow: hidden;
}

.overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1000;
}

.dark.overlay {
    background: rgba(12,12,12,.9);
}

.popup {
    display: none;
    background: #fff;
    padding: 1rem;
    overflow-x: hidden;
    visibility: visible;
    overflow-y: auto;
    position: fixed;
    z-index: 1001;
    box-sizing: border-box;
}

@media (max-width: 1296px) {
    .popup {
        padding: 16px;
    }
}

.popup.active {
    display: block;
}

.popup-right {
    right: 0;
    top: 0;
    height: 100%;
    width: 50%;
}

.iframe-popup.popup-right {
    width: 100%;
}

@media (max-width: 1295px) {
    .popup-right {
        /* чтобы не перекрывалось кнопками мобильной навигации */
        padding: 1rem 1rem 5rem 1rem;
    }

    .popup-right {
        width: 100%;
    }
}

.popup > header {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-right > header {
    padding-top: 4rem;
    justify-content: left;
}

.popup > header > .close {
    background: transparent;
    padding: 0.5rem;
    border: none;
    outline: 0;

    position: absolute;
    top: -16px;
    right: -16px;
}

.popup-right > header > .close {
    top: 0;
    right: 0;
}

.popup > header > .close:before {
    content: ' ';
    display: block;
    width: 20px;
    height: 20px;
    background: url(close.png) center center no-repeat;
}

.popup-right > header > .close:before {
    content: ' ';
    display: block;
    width: 32px;
    height: 19px;
    background: url(back.png) center center no-repeat;
}

.popup-right > header > .steps {
    display: none;
    position: absolute;
    width: 100%;
    text-align: center;
    top: 2rem;
    color: #4a80ff;
    font-size: 0.75em;
}

.popup-right > header > h3 {
    font-size: 1.75em;
}

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

@media (max-device-width: 1040px) {
    .popup > header > h3 {
        width: 100%;
        text-align: center;
        padding: 0 16px;
        font-size: 1.125em;
    }

    .popup > header > .close {
        left: 0;
        top: initial;
    }

    .popup > header > .close:before {
        width: 7px;
        height: 13px;
        background: url(back.svg) center center no-repeat;
    }

    .popup > header > .steps {
        display: block;
    }

}

.popup-dialog {
    border-radius: 16px;
    -webkit-box-shadow: 0 4px 40px rgba(217,218,224,.5);
    box-shadow: 0 4px 40px rgba(217,218,224,.5);

    position: fixed;
    top:50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
}

.popup-wide {
    min-width: 80%;
}

.popup-wide h3 {
    font-size: 1.75em;
}

@media (max-device-width: 1040px) {
    .popup-dialog {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}
