html.with--no_scroll {
    overflow: hidden;
    margin-right: 17px;
}

.popup__layout {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(31, 35, 50, 0.6);
    z-index: 10000;
    will-change: top;
    visibility: visible;
    -webkit-transition: opacity 300ms cubic-bezier(.2, 0, .2, 1), visibility 0ms 0ms;
    transition: opacity 300ms cubic-bezier(.2, 0, .2, 1), visibility 0ms 0ms;
}

.popup__container {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    text-align: center;
    visibility: visible;
    overflow-y: scroll;
    padding: 50px 0;
}

.popup__container:before {
    content: '';
    display: none;
    height: 100%;
    vertical-align: middle;
}

.popup__body {
    background-color: #F5F6FA;
    pointer-events: auto;
    position: relative;
    min-width: 380px;
    display: inline-block;
    vertical-align: middle;
    margin: 0 auto 0 -3px;
    transition: all 300ms cubic-bezier(.2, 0, .2, 1), visibility 0ms 0ms;
    visibility: visible;
    transform: translateY(0);
    opacity: 1;
    padding: 0;
    border-radius: 24px;
    max-width: 551px;
    overflow: hidden;
}

.popup__body.modal__trap {
    border-radius: 15px;
    padding: 25px;
}

.modal__trap .popup__heading {
    font-size: 23px;
    font-weight: bold;
}

.popup__close {
    position: absolute;
    right: 20px;
    top: 20px;
    cursor: pointer;
    color: #ABB5CE;
    width: 24px;
    height: 24px;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}
.popup__close svg{
    stroke: #ABB5CE;
}
.popup__close:hover svg{
    stroke: #FC0631;
}
.promocode-modal-header {
    padding: 0 16px 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    border-bottom: 1px solid #D2D7E5;
}
.promocode-modal-logo {
    width: 118px;
    height: 68px;
    object-fit: contain;
}
.promocode-modal-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
}
.promocode-modal-data {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
}
.promocode-modal-add-data {
    white-space: nowrap;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 400;
    line-height: 20px;
    text-align: left;
    color: #7D8DB3;
}
.promocode-modal-add-data.usings-counter:before, .promocode-modal-add-data.date-end:before {
    width: 16px;
    height: 16px;
    min-width: 16px;
    opacity: 0.8;
}
.copy-promocode {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    width: 100%;
    /*margin-top: 12px;*/
}
.modal-promocode-text {
    width: 100%;
    padding: 0 12px;
    border-radius: 16px;
    height: 40px;
    line-height: 40px;
    background: #EBEDF3;
    border: 1px solid #EBEDF3;
    font-size: 18px;
    font-weight: 500;
    line-height: 40px;
    letter-spacing: 0.07em;
    text-align: center;
    color: #4D77E4;
    text-transform: uppercase;
}
.modal-promocode-text.copied:after {
    content: 'Промокод скопирован';
    display: block;
    font-size: 9px;
    text-transform: none;
    letter-spacing: normal;
    height: 8px;
    line-height: 8px;
    color: green;
}
.copy-promocode-btn {
    border: 1px solid #C5D7F8;
    border-radius: 16px;
    height: 40px;
    width: 96px;
    min-width: 96px;
    background: #F5F6FA url('/wp-content/themes/promocoderu/assets/images/copy.svg') center center / 24px no-repeat;
    cursor: pointer;
}
.copy-promocode-btn:hover {
    background: #C5D7F8 url('/wp-content/themes/promocoderu/assets/images/copy.svg') center center / 24px no-repeat;
}
.modal-instruction {
    padding: 16px;
}
.modal-instruction ol {
    counter-reset: item;
    margin-left: 0;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
}
.modal-instruction ol li {
    display: flex;
    flex-direction: row;
    gap: 12px;
    text-align: left;
    color: #7D8DB3;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}
.modal-instruction ol li b {
    display: block;
    color: #495780;
    font-size: 16px;
    font-weight: 700;
    line-height: 19.54px;
    text-align: left;
}
.modal-instruction ol li:before {
    display: inline-block;
    content: counter(item);
    width: 39px;
    min-width: 39px;
    height: 39px;
    line-height: 39px;
    color: #FFFFFF;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    counter-increment: item;
    background: #ABB5CE;
    border-radius: 12px;
}
.modal-gif {
    padding: 0 60px 24px 60px;
    background: #EBEDF3;
}
.modal-gif-title {
    height: 46px;
    line-height: 46px;
    color: #495780;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}
.modal-gif-img {
   width: calc(100% - 72px);
    height: auto;
    object-fit: contain;
}
.modal-redirect-btn {
    padding: 8px 36px;
    background: #FC0631;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
    color: #fff !important;
    text-decoration: none;
    display: inline-block;
    margin-top: 8px;
}
.modal-instruction .modal-redirect-btn {
    padding: 8px 25px;
}
.modal-redirect-btn:hover {
    background: #343D58;
}
.modal-footer-btns {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    justify-content: center;
    padding-top: 24px;
}
.modal-footer-btns a {
    margin-top: 0;
}
.close-modal-btn {
    background: none;
    border: 1px solid #C5D7F8;
    padding: 7px 36px;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    text-align: center;
    color: #4D77E4;
    border-radius: 16px;
    cursor: pointer;
}
.close-modal-btn:hover {
    background: #fff;
}

.brand-promocode-modal {
    min-width: 360px;
}

.brand-promocode-modal-header-img {
    width: 210px;
    height: 80px;
    margin: auto;
    display: flex;
    flex-direction: column;
}

.brand-promocode-modal-logo {
    width: 100%;
    /*height: auto;*/
    margin: auto;
}

.brand-promocode-modal-header {
    padding: 12px 24px;
    background: #EBEDF3;
}

.brand-promocode-modal-content {
    margin: 24px 0;
    padding: 0 24px;
    text-align: left;
    min-height: 328px;
    max-height: 328px;
    overflow: auto;
}

.brand-promocode-modal-title {
    color: #1F2332;
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
    margin-bottom: 16px;
}

.brand-promocode-modal-details {
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    text-align: left;
    color: #3C4768;
}
.brand-promocode-modal-footer {
    margin: 24px 0 48px;
}

.modal-promocode__details {
    cursor: pointer;
    text-decoration: underline;
}

.modal-promocode__details:hover {
    color: #FC0631;
}

@media (min-width: 768px) {
    .popup__container {
        padding: 50px 0;
    }
    .popup__body {
        min-width: auto;
    }

    .popup__body.brand-promocode-modal {
        min-width: 551px;
    }

    html.with--no_scroll {
        margin-right: 0;
    }
    .promocode-modal-header {
        margin-bottom: 16px;
        padding: 16px 48px 12px 48px;
    }
    .promocode-modal-title {
        font-size: 24px;
        font-weight: 700;
        line-height: 32px;
    }
    .modal-instruction {
        padding: 0 48px 16px 48px;
    }
    .modal-instruction ol li {
        gap: 17.5px;
        font-size: 14px;
        font-weight: 400;
        line-height: 24px;
        text-align: left;
    }
    .modal-instruction ol li b {
        font-size: 18px;
        font-weight: 700;
        line-height: 21.98px;
        text-align: left;
    }
    .modal-instruction ol li:before {
        width: 52px;
        min-width: 52px;
        height: 52px;
        line-height: 52px;
        font-size: 32px;
    }
    .modal-gif {
        padding: 0 115.5px 16px 115.5px;
    }
    .modal-gif-title {
        height: 53px;
        line-height: 53px;
        font-size: 24px;
        font-weight: 700;
    }
    .popup__body.modal__trap {
        max-width: 450px;
    }
    .modal-gif-img {
        width: auto;
    }
    .popup__container:before {
        display: inline-block;
    }
    .brand-promocode-modal-header {
        padding: 48px 24px;
    }
}
.popup__heading:empty,
.popup__content:empty{
    display: none;
}

@media (max-width: 400px) {
    .popup__body {
        min-width: unset;
    }

    .copy-promocode {
        flex-direction: column;
    }

    .modal-gif {
        padding-left: unset;
        padding-right: unset;
    }

    .modal-footer-btns {
        flex-direction: column;
    }

    .modal-instruction ol li:before {
        width: 16px;
        height: 16px;
        line-height: 16px;
        font-size: 12px;
        min-width: 16px;
        border-radius: 4px;
    }

    .modal-instruction .modal-redirect-btn {
        padding: 6px 10px;
        font-size: 14px;
    }
}
