/* =========================================================
   CALLBACK POPUP
   ========================================================= */

#cb-overlay {
    position: fixed;
    inset: 0;

    display: none;

    padding: 24px 15px;

    background: rgba(6, 48, 76, 0.68);

    overflow-y: auto;

    z-index: 999999;
}


/* Box sizing только внутри popup */

#cb-overlay *,
#cb-overlay *::before,
#cb-overlay *::after {
    box-sizing: border-box;
}


/* =========================================================
   ОКНО
   ========================================================= */

#cb-popup {
    position: relative;

    width: 100%;
    max-width: 360px;

    margin: 4vh auto;

    padding: 0 28px 28px;

    background: #ffffff;

    border: 1px solid #d9e6ee;
    border-radius: 16px;

    box-shadow:
        0 25px 70px rgba(6, 48, 76, 0.30);

    overflow: hidden;

    font-family: Arial, Helvetica, sans-serif;

    color: #06304C;
}


/* =========================================================
   ЗАГОЛОВОК
   ========================================================= */

#cb-popup h3 {
    position: relative;

    margin: 0 -28px 26px;
    padding: 25px 60px 24px 28px;

    background: #06304C;

    color: #ffffff;

    font-size: 23px;
    font-weight: 700;
    line-height: 1.25;

    text-align: left;
}


/* Небольшая декоративная линия */

#cb-popup h3::after {
    content: "";

    position: absolute;

    left: 28px;
    bottom: 0;

    width: 52px;
    height: 3px;

    background: #ff6b57;

    border-radius: 3px 3px 0 0;
}


/* =========================================================
   КРЕСТИК
   ========================================================= */

#cb-close {
    position: absolute;

    top: 14px;
    right: 16px;

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

    width: 34px;
    height: 34px;

    border-radius: 50%;

    color: rgba(255, 255, 255, 0.8);

    font-size: 27px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    z-index: 10;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


#cb-close:hover {
    background: rgba(255, 255, 255, 0.13);

    color: #ffffff;

    transform: rotate(90deg);
}


/* =========================================================
   ПОЛЯ
   ========================================================= */

#cb-popup input,
#cb-popup textarea {
    display: block;

    width: 100%;

    margin: 0;
    padding: 12px 14px;

    background: #f8fbfd;

    border: 1px solid #cddce6;
    border-radius: 8px;

    outline: none;

    color: #16374e;

    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}


#cb-popup input {
    height: 44px;
}


#cb-popup textarea {
    min-height: 90px;

    resize: vertical;
}


/* Placeholder */

#cb-popup input::placeholder,
#cb-popup textarea::placeholder {
    color: #7c8d99;

    opacity: 1;
}


/* Focus */

#cb-popup input:focus,
#cb-popup textarea:focus {
    background: #ffffff;

    border-color: #4f7e9b;

    box-shadow:
        0 0 0 3px rgba(6, 48, 76, 0.08);
}


/* Расстояние между полями */

#cb-popup .cb-field {
    margin-bottom: 14px;
}


/* =========================================================
   ОШИБКИ
   ========================================================= */

#cb-popup .cb-error {
    padding-top: 5px;

    color: #c53b32;

    font-size: 12px;
    line-height: 1.3;
}


#cb-errors-global {
    margin: 0 0 12px;
    padding: 9px 12px;

    background: #fff1ef;

    border-radius: 6px;

    color: #b52d25;

    font-size: 13px;
}


/* =========================================================
   CAPTCHA
   ========================================================= */

#cb-recaptcha {
    margin: 2px 0 14px;

    overflow: hidden;
}


#cb-popup .g-recaptcha {
    margin: 0;
}


/* =========================================================
   КНОПКА ОТПРАВИТЬ
   ========================================================= */

#cb-popup button[type="submit"] {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 48px;

    padding: 10px 20px;

    background: #ff6b57;

    border: 0;
    border-radius: 8px;

    box-shadow:
        0 7px 0 rgba(255, 107, 87, 0.12);

    color: #ffffff;

    font-family: inherit;
    font-size: 16px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


#cb-popup button[type="submit"]:hover {
    background: #f35d49;

    transform: translateY(-1px);

    box-shadow:
        0 9px 18px rgba(243, 93, 73, 0.20);
}


#cb-popup button[type="submit"]:active {
    transform: translateY(0);

    box-shadow: none;
}


/* =========================================================
   СОГЛАСИЕ
   ========================================================= */

#cb-popup .checkbox-legal {
    display: flex !important;

    flex-direction: row !important;
    align-items: flex-start !important;

    gap: 10px;

    width: 100% !important;

    margin: 18px 0 0 !important;
    padding: 16px 14px !important;

    background: #f4f8fb;

    border: 1px solid #e0e9ef;
    border-radius: 8px;

    color: #41596a;
}


/* Сам checkbox */

#cb-popup .checkbox-legal input {
    flex: 0 0 auto;

    width: 16px !important;
    height: 16px !important;

    margin: 2px 0 0 !important;

    accent-color: #06304C;

    cursor: pointer;
}


/* Текст */

#cb-popup .checkbox-legal .checkbox-label {
    margin: 0;

    color: #41596a;

    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;

    text-align: left;
}


/* Ссылки */

#cb-popup .checkbox-legal a {
    color: #17658f;

    text-decoration: underline;
    text-underline-offset: 2px;
}


#cb-popup .checkbox-legal a:hover,
#cb-popup .checkbox-legal a:active,
#cb-popup .checkbox-legal a:focus {
    color: #06304C;
}


/* =========================================================
   МОБИЛЬНАЯ ВЕРСИЯ
   ========================================================= */

@media (max-width: 480px) {

    #cb-overlay {
        padding: 12px 10px;
    }


    #cb-popup {
        max-width: 100%;

        margin: 10px auto;

        padding: 0 18px 20px;

        border-radius: 14px;
    }


    #cb-popup h3 {
        margin: 0 -18px 22px;

        padding:
            22px
            52px
            21px
            18px;

        font-size: 20px;
    }


    #cb-popup h3::after {
        left: 18px;
    }


    #cb-close {
        top: 11px;
        right: 11px;
    }


    #cb-popup .checkbox-legal {
        padding: 13px 12px !important;
    }

}



#cb-errors-global {
    margin: 0 0 14px;
    padding: 11px 13px;

    background: #fff2f0;

    border: 1px solid #ffd4ce;
    border-radius: 8px;

    color: #b83228;

    font-size: 13px;
    line-height: 1.4;
}











/* =========================================================
   CALLBACK SUCCESS
   ========================================================= */

#cb-success {
    display: none;

    padding: 40px 15px 35px;

    text-align: center;

    color: #06304C;
}


#cb-success .cb-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 62px;
    height: 62px;

    margin: 0 auto 18px;

    background: #06304C;

    border-radius: 50%;

    color: #ffffff;

    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}


#cb-success .cb-success-title {
    margin-bottom: 8px;

    font-size: 23px;
    font-weight: 700;
    line-height: 1.25;
}


#cb-success .cb-success-text {
    max-width: 320px;

    margin: 0 auto;

    color: #5d6f7c;

    font-size: 14px;
    line-height: 1.5;
}


#cb-popup button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}