.adv-popup {
    position: relative;

    width: 652px;
    height: auto;

    box-sizing: border-box;

    overflow: hidden;

    border-radius: 22px;

    background:
        radial-gradient(
            circle at 90% 100%,
            #65ef00 0%,
            #43bd00 20%,
            #1d3719 45%,
            #1b1b1b 68%
        );

    color: #ffffff;

 
}


/*
|--------------------------------------------------------------------------
| Content
|--------------------------------------------------------------------------
*/
#adv-popup-early .modal-close{
    color: #000;
}
#adv-popup-late .modal-close{
    color: #000;
}

.adv-popup__content {
    position: relative;
    padding: 38px 20px;
    width: 100%;
    height: 100%;
}


/*
|--------------------------------------------------------------------------
| Text
|--------------------------------------------------------------------------
*/

.adv-popup--exit{  
    color: black;
}

.adv-popup__title {
    margin: 0;

    font-size: 35px;
    line-height: 1.08;
    font-weight: 500;

    letter-spacing: -0.8px;
}


.adv-popup__description {
    margin-top: 27px;

    max-width: 420px;

    font-size: 24px;
    line-height: 1.1;
    font-weight: 400;

    letter-spacing: -0.4px;
}


/*
|--------------------------------------------------------------------------
| Buttons
|--------------------------------------------------------------------------
*/

.adv-popup__buttons {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-top: 52px;
}


.adv-popup__button {
    height: 51px;

    padding: 0 27px;

    border: 0;
    border-radius: 70px;

    font-family: inherit;

    font-size: 16px;
    line-height: 1;

    cursor: pointer;

    white-space: nowrap;
}


.adv-popup__button--primary {
    background: #63f500;
    color: #151515;
}


.adv-popup__button--secondary {
    background: #ffffff;
    color: #29263b;
}


/*
|--------------------------------------------------------------------------
| Close
|--------------------------------------------------------------------------
*/

.adv-popup__close {
    position: absolute;

    top: 29px;
    right: 28px;

    z-index: 5;

    width: 32px;
    height: 32px;

    padding: 0;

    border: 0;

    background: transparent;

    cursor: pointer;
}


.adv-popup__close span {
    position: absolute;

    top: 15px;
    left: 1px;

    display: block;

    width: 30px;
    height: 3px;

    border-radius: 2px;

    background: #ffffff;
}


.adv-popup__close span:first-child {
    transform: rotate(45deg);
}


.adv-popup__close span:last-child {
    transform: rotate(-45deg);
}


/*
|--------------------------------------------------------------------------
| Image
|--------------------------------------------------------------------------
*/

.adv-popup__image {
    position: absolute;

    right: 31px;
    top: 136px;

    z-index: 1;

    width: 180px;
    height: 180px;

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


.adv-popup__image img {
    display: block;

    max-width: 100%;
    max-height: 100%;

    object-fit: contain;
}
.adv-popup-wrapper {
    position: fixed;
    inset: 0;

    z-index: 999999;

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

    padding: 20px;

    box-sizing: border-box;

    pointer-events: none;
}
.modal-dialog .modal-content {
    padding: 0;
    border: none;
}
.modal-new span.modal-close { 
    /* color: white; */
}
.adv-popup-modal .modal-dialog {
    max-width: 652px;
}
#adv-popup-early{

}
.modal.show .modal-dialog {
    transform: none;
    padding: 0;
}
.modal-close{
    color: #000;
}
.adv-popup-wrapper .adv-popup {
    pointer-events: auto;
}
  .modal-dialog .modal-content .modal-body {
    padding: 0;
    margin: 0;
    background: transparent;
}
.adv-popup--exit {
    background: linear-gradient(
        180deg,
        #79F316 0%,
        #D8FE39 100%
    );
}
#adv-popup-modal[data-adv-popup-main="true"] {
    pointer-events: none;
}

 #adv-popup-modal span.modal-close{
    color: black;
 }
 div#adv-popup-modal[data-adv-popup-main="true"] span.modal-close{
    color: white;

 }
#adv-popup-modal[data-adv-popup-main="true"] .modal-dialog {
    pointer-events: auto;
    align-items: end;
    bottom: 5%;
}

.adv-popup-modal .custom-modal-content {
    padding: 0 !important;
}
.adv-popup--exit .adv-popup__button--primary {
    background: #000;
    color: #fff;
}

.adv-popup--exit .adv-popup__button--secondary {
    background: #fff;
    color: #000;
}
/*
|--------------------------------------------------------------------------
| Hidden
|--------------------------------------------------------------------------
*/

.adv-popup.is-hidden {
    display: none;
}

/* Рекламный попап — самый нижний слой */
#adv-popup-modal {
    z-index: 1061 !important;
}
#adv-popup-modal[data-adv-popup-main="true"] {
    z-index: 1050 !important;
}
/* Подложка формы — над рекламным попапом */
body > .modal-backdrop:last-of-type {
    z-index: 1060 !important;
}

/* Форма — над подложкой */
#mainModal {
    z-index: 1070 !important;
}
/*

|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/
/* Рекламный попап */
#adv-popup-modal {
    z-index: 1055;
}

/* Отдельная подложка формы */
#adv-popup-form-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1060;
    background: rgba(0, 0, 0, 0.5);
}

/* Форма поверх подложки */
#mainModal {
    z-index: 1070;
}
@media (max-width: 700px) {

    #adv-popup-modal .modal-dialog {
        align-items: flex-start;
        top: 8%;
    }

    #adv-popup-modal[data-adv-popup-main="true"] .modal-dialog {
        pointer-events: auto;
        align-items: center;
        bottom: auto;
    }.adv-popup__content { 
        padding: 0; 
    }
    .adv-popup {
        width: calc(100vw - 30px);
        height: auto;
        min-height: auto;

        border-radius:  8px;

    }


    .adv-popup__text {
        position: relative;

        top: auto;
        left: auto;

        width: auto;

        padding: 20px 16px 16px;
    }


    .adv-popup__title {
        font-size: 18px;
        font-weight: 600;
        width: 70%;
    }


    .adv-popup__description {
        margin-top: 19px;
        font-size: 14px;
        width: 100%;
    }

    .adv-popup__image {
            position: absolute;
        top: 28px;
        right: 22px;
        width: 50px;
        height: 50px;
        margin: 0 auto 25px;
    }
    .adv-popup__buttons {
              flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-top: 15px;
    }
    div#adv-popup-modal{
        padding-right: 0!important;
    }
    #adv-popup-modal .modal-dialog{
width: 100%;
        margin: 0 auto;
        padding: 0 21px;
    }
    .adv-popup__button {
     width: 100%;
        height: auto;
        font-size: 14px;
        border-radius: 5px;
        padding: 8px 0;
        text-align: center;
        font-weight: 600;
    }

    .adv-popup__image {
               position: absolute;
        top: 22px;
        right: 26px;
        width: 50px;
        height: 50px;
        margin: 0 auto 25px;
    }
    .adv-popup {
        position: relative;
        width: 100%;
        height: auto;
        box-sizing: border-box;
        overflow: hidden;
        border-radius: 8px;
        background: radial-gradient(circle at 90% 70%, #65ef00 0%, #2f8500 -1%, #1d3719 45%, #1b1b1b 68%);
    }
 #adv-popup-modal .modal-dialog .modal .modal-body{
        height: auto;
 } #adv-popup-modal 
    .modal-new span.modal-close {
                 font-size: 22px;
        right: 6px;
        top: 0px;
        padding: 6px;
        font-weight: 100;
    }

.adv-popup--exit {
    background: linear-gradient(
        180deg,
        #79F316 0%,
        #D8FE39 100%
    );
}

}