.popup {
    display: none;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    margin: 0;
    z-index: 999;
}

.popup.active {
    display: flex;
    padding: 0;
}
.popup.active .container {
    padding: 0;
}

.popup .close {
    top: 25px;
    right: 25px;
    position: absolute;
}

#client-popup-form {
    color: #0F1929;
    font-weight: 400;
}

#client-popup-form .container {
    position: relative;
    display: flex;
    margin: auto;
    max-height: fit-content;
    background-color: #F6F7F8;
    max-width: fit-content;
    padding: 80px;
}
.apply-for-consultation-block h2 {
    font-size: 24px;
    max-width: 550px;
    margin-bottom: 40px;
}

.checkbox-text {
    font-size: 16px;
    margin-left: 10px;
}
#client-popup-form h3+p {
    margin-top: 9px;
    padding-bottom: 31px;
    border-bottom: 1px solid #556270;
    font-size: 18px;
    color: #7a8e9e;
}

#client-popup-form .row ul {
    margin-top: 22px;
}

#client-popup-form .row li {
    overflow: hidden;
    margin-bottom: 4px;
    font-size: 16px;
}

#client-popup-form .row li .icon {
    float: left;
}

#client-popup-form .row li .phone {
    width: 16px;
    height: 16px;
    margin-top: 5px;
    background-position: -63px 0;
}
#client-popup-form .row li p {
    margin-left: 32px;
    margin-bottom: 0;
}
#client-popup-form .row li a {
    color: #ccd2d6;
    font-size: 1em;
    border-bottom: 0 none;
}
#client-popup-form .law {
    width: 83.3333%;
    margin: 26px auto 0;
    padding-left: 2px;
    font-size: 12px;
    line-height: 17px;
    text-align: left;
}

#client-popup-form .control-label {
    font-size: 20px;
    display: block;
    margin-bottom: 20px;
    margin-top: 20px;
}

/*

.contact-method-group {
    margin-bottom: 20px;
}

.contact-method-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.contact-method-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.radio-option {
    flex: 1;
    min-width: 100px;
}

.contact-method-radio {
    display: none;
}

.contact-method-radio:checked + .radio-label {
    background-color: #f0f8ff;
    border-color: #4a90e2;
    color: #4a90e2;
}

.contact-method-radio:checked + .radio-label .radio-icon {
    opacity: 1;
    transform: scale(1.1);
}

.radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
    text-align: center;
    flex-direction: column;
    min-height: 70px;
}

.radio-label:hover {
    border-color: #b0b0b0;
    background-color: #f9f9f9;
}

.radio-icon {
    font-size: 24px;
    margin-bottom: 5px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.phone-icon {
    color: #4CAF50;
}

.telegram-icon {
    color: #0088cc;
}

.whatsapp-icon {
    color: #25D366;
}

.radio-text {
    font-size: 14px;
    font-weight: 500;
}
*/
.contact-method-list {
    margin-top: 8px;
}

.contact-method-list .radio {
    margin-bottom: 10px;
}

.contact-method-list label {
    font-weight: normal;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.contact-method-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.phone-icon {
    color: #4CAF50;
}

.telegram-icon {
    color: #0088cc;
}

.whatsapp-icon {
    color: #25D366;
}

/* Стандартные стили для радио-кнопок */
.contact-method-list input[type="radio"] {
    margin-right: 8px;
    margin-top: 0;
    vertical-align: middle;
}

/* Для Bootstrap */
.contact-method-list .radio {
    padding-left: 20px;
}

.contact-method-list .radio input[type="radio"] {
    margin-left: -20px;
    margin-right: 10px;
}
/* Для мобильных устройств */
@media (max-width: 576px) {/*
    .contact-method-options {
        flex-direction: column;
    }

    .radio-label {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        min-height: auto;
    }

    .radio-icon {
        margin-bottom: 0;
        margin-right: 10px;
        font-size: 20px;
    }*/
}

/*Стили для инпута*/

 .form-control.border-bottom-only {
     border: none;
     border-bottom: 2px solid #ccc;
     border-radius: 0;
     padding: 10px 0;
     background: transparent;
     text-transform: uppercase;
     font-size: 16px;
     transition: all 0.3s ease;
     box-shadow: none;
     outline: none;
     width: 100%;
     margin-bottom: 5px;
 }

/* Placeholder стили */
.form-control.border-bottom-only::placeholder {
    color: #999;
    opacity: 0.8;
    font-size: 15px;
    transition: all 0.3s ease;
}

/* Фокус состояния */
.form-control.border-bottom-only:focus {
    border-bottom-color: #0F1929;
    box-shadow: 0 2px 0 0 rgba(74, 144, 226, 0.2);
    background-color: rgba(74, 144, 226, 0.02);
}

.form-control.border-bottom-only:focus::placeholder {
    color: #0F1929;
    opacity: 0.6;
    transform: translateY(-5px);
    font-size: 12px;
}

/* Анимация при клике/активации */
.form-control.border-bottom-only:active {
    border-bottom-color: #2c6cb0;
    transform: translateY(1px);
}

/* Ховер эффект */
.form-control.border-bottom-only:hover {
    border-bottom-color: #888;
    background-color: rgba(0, 0, 0, 0.02);
}

/* Состояние с ошибкой */
.form-control.border-bottom-only.error {
    border-bottom-color: #e74c3c;
    animation: shake 0.5s ease-in-out;
}

/* Анимация shake для ошибок */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

/* Анимация плавающего лейбла (если будет лейбл над полем) */
.form-group.floating-label {
    position: relative;
    margin-bottom: 25px;
}

.form-group.floating-label label {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 12px;
    color: #0F1929;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.form-group.floating-label input:focus + label,
.form-group.floating-label input:not(:placeholder-shown) + label {
    opacity: 1;
    transform: translateY(-20px);
}

/* Анимация расширения бордера */
.form-control.border-bottom-only.grow {
    animation: borderGrow 0.3s ease-out;
}

@keyframes borderGrow {
    from { border-bottom-width: 2px; }
    to { border-bottom-width: 4px; }
}

/* Пульсирующая анимация для required полей */
.form-control.border-bottom-only.required:focus {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { border-bottom-color: #0F1929; }
    50% { border-bottom-color: #2c6cb0; }
    100% { border-bottom-color: #0F1929; }
}

/* Плавное появление */
.form-control.border-bottom-only.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .form-control.border-bottom-only {
        font-size: 14px;
        padding: 8px 0;
    }

    .form-control.border-bottom-only:focus {
        border-bottom-width: 3px;
    }
}

/* Цветовые вариации */
.form-control.border-bottom-only.success {
    border-bottom-color: #2ecc71;
}

.form-control.border-bottom-only.warning {
    border-bottom-color: #f39c12;
}

/* Эффект "волны" при фокусе */
.form-control.border-bottom-only.wave-effect {
    position: relative;
    overflow: hidden;
}

.form-control.border-bottom-only.wave-effect:focus::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(74, 144, 226, 0.6);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
    animation: wave 0.5s ease-out;
}

@keyframes wave {
    0% { transform: scale(0, 0); opacity: 0.5; }
    100% { transform: scale(30, 30); opacity: 0; }
}

/*Стили для radio*/

     /* Основные стили для радио кнопок */
 .contact-method-list .radio {
     margin-bottom: 15px;
     position: relative;
     cursor: pointer;
     user-select: none;
     transition: all 0.3s ease;
 }

/* Скрываем стандартный radio */
.contact-method-list input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Создаем кастомный radio кружок */
.contact-method-list .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #F6F7F8;
    border: 1px solid #7A848F;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ховер эффект */
.contact-method-list .radio:hover input ~ .checkmark {
    border-color: #0F1929;
    background-color: #f0f8ff;
    transform: scale(1.05);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
}

/* Выбранное состояние */
.contact-method-list input:checked ~ .checkmark {
    background-color: #0F1929;
    border-color: #0F1929;
    animation: radioSelect 0.4s ease;
}

/* Внутренняя точка при выборе */

.contact-method-list input:checked + label .checkmark::after {
    content: "";
    position: absolute;
    display: block;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #7A848F;
    animation: dotAppear 0.3s ease;
}

/* Показываем точку при выборе */
.contact-method-list input:checked ~ .checkmark:after {
    display: block;
    animation: dotAppear 0.3s ease;
}

/* Анимация выбора */
@keyframes radioSelect {
    0% {
        transform: scale(0.8);
        box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.7);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(74, 144, 226, 0);
    }
}

/* Анимация появления точки */
@keyframes dotAppear {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Текст метки */
.contact-method-list .radio-text {
    font-size: 16px;
    color: #7A848F;
    padding-left: 26px;
    transition: color 0.3s ease;
    display: block;
    min-height: 20px;
    line-height: 20px;
    text-transform: uppercase;
}

.contact-method-list input:checked ~ label .radio-text {
    color: #7A848F;
    font-weight: 500;
}

/* Фокус состояние */
.contact-method-list input:focus ~ .checkmark {
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
    outline: none;
}

/* Активное состояние (при нажатии) */
.contact-method-list input:active ~ .checkmark {
    transform: scale(0.95);
}

/* Анимация пульсации для активного элемента */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(74, 144, 226, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 144, 226, 0); }
}

.contact-method-list .checkmark.pulse {
    animation: pulse 1.5s infinite;
}

/* Вариации цветов для разных опций */
.contact-method-list .radio.phone input:checked ~ .checkmark {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

.contact-method-list .radio.telegram input:checked ~ .checkmark {
    background-color: #0088cc;
    border-color: #0088cc;
}

.contact-method-list .radio.whatsapp input:checked ~ .checkmark {
    background-color: #25D366;
    border-color: #25D366;
}

/* Для мобильных */
@media (max-width: 768px) {
    .contact-method-list .radio {
        margin-bottom: 12px;
    }

    .contact-method-list .checkmark {
        height: 22px;
        width: 22px;
    }

    .contact-method-list .checkmark:after {
        width: 8px;
        height: 8px;
    }

    .contact-method-list .radio-text {
        font-size: 15px;
        padding-left: 30px;
    }
}


/**Стили для чекбокса*/
     /* Контейнер кастомного чекбокса */
 .custom-checkbox {
     position: relative;
     margin: 0;
     padding: 0;
 }

/* Скрываем стандартный чекбокс */
.checkbox-hidden {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Стили для label */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    padding: 5px 0;
    position: relative;
    margin-bottom: 20px;
}

.captcha-block{
    margin-bottom: 20px;
}


/* Кастомный чекбокс */
.checkbox-custom {
    position: relative;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-right: 12px;
    margin-top: 2px;
    border: 1px solid #7A848F;
    border-radius: 4px;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Ховер эффект */
.checkbox-label:hover .checkbox-custom {
    border-color: #7A848F;
    background-color: #7A848F;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}

/* Выбранное состояние */
.checkbox-hidden:checked + .checkbox-label .checkbox-custom {
    background-color: #7A848F;
    border-color: #7A848F;
    animation: checkboxCheck 0.4s ease;
}

/* Галочка */
.checkmarkbox {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: all 0.3s ease;
}

.checkmark-svg {
    width: 14px;
    height: 14px;
    stroke: white;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Показываем галочку при выборе */
.checkbox-hidden:checked + .checkbox-label .checkmarkbox {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    animation: checkmarkAppear 0.3s ease 0.1s both;
}

/* Текст чекбокса */
.checkbox-text {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    flex: 1;
    transition: color 0.3s ease;
}

.checkbox-hidden:checked + .checkbox-label .checkbox-text {
    color: #333;
}

/* Анимация выбора */
@keyframes checkboxCheck {
    0% {
        transform: scale(0.8);
        box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.7);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(74, 144, 226, 0);
    }
}

/* Анимация появления галочки */
@keyframes checkmarkAppear {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-45deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2) rotate(10deg);
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0);
        opacity: 1;
    }
}

/* Фокус состояние */
.checkbox-hidden:focus + .checkbox-label .checkbox-custom {
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
    outline: none;
}

/* Активное состояние (при нажатии) */
.checkbox-label:active .checkbox-custom {
    transform: scale(0.95);
}

/* Состояние с ошибкой */
.custom-checkbox.error .checkbox-custom {
    border-color: #e74c3c;
    animation: shake 0.5s ease-in-out;
}

.custom-checkbox.error .checkbox-text {
    color: #e74c3c;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

/* Для обязательного поля */
.custom-checkbox.required .checkbox-text:after {
    content: " *";
    color: #e74c3c;
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    .checkbox-custom {
        background: #F6F7F8;
        border-color: #7A848F;
    }

    .checkbox-text {
        color: #0F1929;
    }
    .checkbox-text a {
        text-decoration: underline;
    }

    .checkbox-hidden:checked + .checkbox-label .checkbox-text {
        color: #0F1929;
        font-weight: 500;
    }
}

/* Для мобильных */
@media (max-width: 768px) {
    .checkbox-custom {
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }

    .checkmark-svg {
        width: 12px;
        height: 12px;
    }

    .checkbox-text {
        font-size: 13px;
        line-height: 1.4;
    }
}


/* Кнопка отправки */
.form-group.submit {
    display: flex;
    justify-content: center;
}
.form-group.submit button.g-recaptcha {
    padding: 16px 40px;
    background: #7A848F;
    color: #F6F7F8;
    border: none;
    border-radius: 0;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 1px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(122, 132, 143, 0.2);
}

/* Эффект пульсации */
.form-group.submit button.g-recaptcha::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.form-group.submit button.g-recaptcha:hover {
    background: #8B95A1;
    transform: scale(1.05);
}

.form-group.submit button.g-recaptcha:hover::before {
    width: 300px;
    height: 300px;
}

/*Error*/
.help-block.error {
    color: red;
    font-size: 12px;
}

/* Анимация для закрытия попапа */
#client-popup-form {
    transition: opacity 0.3s ease;
    z-index: 9999;
}
#client-popup-form.fade-out {
    opacity: 0;
    pointer-events: none;
}
.popup-open {
    overflow: hidden;
}
.success-message {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: green;
}


@media (max-width: 768px) {
    .popup {
        overflow: auto;
    }
    #client-popup-form .container {
        padding: 20px;
    }
    .apply-for-consultation-block h2 {
        font-size: 20px;
        max-width: 90%;
        margin-bottom: 30px;
    }
}