/* ====================================================
   ФОРМА ЗАКАЗА ЗВОНКА - callback.css
   Стили на основе personal.css
   ==================================================== */

/* ---------- Контейнер формы ---------- */
.callback-form-container {
    max-width: 1024px;
    width: 100%;
    margin: 30px auto;
    padding: 0 15px;
}

.callback-form-inner {
    background: #ffffff;
    border-radius: 8px;
    padding: 30px 35px 35px;
    box-shadow: 0px 10px 40px 0px rgba(50, 44, 136, 0.12);
    border: 1px solid #ddd;
    transition: box-shadow 0.3s ease;
}

.callback-form-inner:hover {
    box-shadow: 0px 15px 50px 0px rgba(50, 44, 136, 0.18);
}

/* ---------- Заголовки ---------- */
.callback-form-title {
    font-family: 'GothamPro', 'Arial', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #095197;
    text-align: center;
    margin: 0 0 6px 0;
    padding-bottom: 14px;
    border-bottom: 2px solid #095197;
}

.callback-form-subtitle {
    font-family: 'GothamPro', 'Arial', sans-serif;
    font-size: 15px;
    color: #666;
    text-align: center;
    margin: 0 0 22px 0;
    font-weight: 400;
}

/* ---------- Ряд полей (горизонтально) ---------- */
.callback-row {
    display: flex;
    gap: 20px;
    margin-bottom: 5px;
}

.callback-field-group {
    flex: 1;
    margin-bottom: 18px;
}

.callback-field-group label {
    display: block;
    font-family: 'GothamPro', 'Arial', sans-serif;
    font-weight: 600;
    color: #333;
    font-size: 15px;
    margin-bottom: 5px;
}

.required-star {
    color: #d32f2f;
    margin-left: 2px;
}

/* ---------- Поля ввода ---------- */
.callback-input {
    width: 100%;
    padding: 11px 15px;
    font-family: 'GothamPro', 'Arial', sans-serif;
    font-size: 16px;
    color: #333;
    background: #fcfcfc;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.callback-input:focus {
    border-color: #095197;
    outline: none;
    box-shadow: 0 0 0 3px rgba(9, 81, 151, 0.15);
    background: #ffffff;
}

.callback-input.error {
    border-color: #d32f2f;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}

.callback-input.error:focus {
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.20);
}

/* ---------- Ошибки валидации ---------- */
.callback-error {
    display: none;
    color: #d32f2f;
    font-size: 13px;
    font-family: 'GothamPro', 'Arial', sans-serif;
    margin-top: 5px;
}

.callback-error.visible {
    display: block;
}

/* ---------- Поле "Нужна ли техническая консультация" ---------- */
.callback-field-consultation {
    margin-bottom: 15px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Состояние ошибки для всего блока радиокнопок */
.callback-field-consultation.radio-error {
    background-color: rgba(211, 47, 47, 0.05);
    border: 1px solid #d32f2f;
    padding: 5px 10px;
    border-radius: 4px;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

/* Подсветка для радиокнопок при ошибке */
.callback-field-consultation.radio-error .callback-radio-custom {
    border-color: #d32f2f;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.15);
}

.callback-field-consultation.radio-error .callback-consultation-label {
    color: #d32f2f;
}

/* Подсветка для отдельных радиокнопок при ошибке */
.callback-field-consultation.radio-error .callback-radio-label input[type="radio"]:not(:checked) + .callback-radio-custom {
    border-color: #d32f2f;
    animation: radioShake 0.4s ease;
}

.callback-consultation-label {
    display: block;
    font-family: 'GothamPro', 'Arial', sans-serif;
    font-weight: 600;
    color: #333;
    font-size: 15px;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.callback-radio-group {
    display: flex;
    gap: 30px;
    padding: 5px 0;
}

.callback-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-family: 'GothamPro', 'Arial', sans-serif;
    font-size: 15px;
    color: #444;
    position: relative;
    user-select: none;
}

/* Скрываем стандартные радиокнопки */
.callback-radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

/* Кастомные радиокнопки */
.callback-radio-custom {
    display: inline-block;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid #095197;
    border-radius: 50%;
    background: #ffffff;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Внутренняя точка (круг) */
.callback-radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    background: #095197;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

/* Состояние checked - показываем точку */
.callback-radio-label input[type="radio"]:checked + .callback-radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Ховер эффект */
.callback-radio-label:hover .callback-radio-custom {
    border-color: #1B6BA5;
    box-shadow: 0 0 0 3px rgba(9, 81, 151, 0.15);
}

/* Фокус */
.callback-radio-label input[type="radio"]:focus + .callback-radio-custom {
    box-shadow: 0 0 0 3px rgba(9, 81, 151, 0.25);
}

/* Текст радиокнопок */
.callback-radio-text {
    color: #444;
    font-weight: 400;
}

#callbackConsultationError {
    margin-top: 5px;
}

/* Анимация встряски для радиокнопок при ошибке */
@keyframes radioShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ---------- Чекбокс согласия (кастомный) ---------- */
.callback-checkbox-group {
    margin: 8px 0 5px 0;
}

.callback-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-family: 'GothamPro', 'Arial', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #444;
    font-weight: 400;
    position: relative;
}

/* Скрываем стандартный чекбокс */
.callback-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

/* Кастомный чекбокс */
.callback-checkbox-custom {
    display: inline-block;
    width: 20px;
    min-width: 20px;
    height: 20px;
    border: 2px solid #095197;
    border-radius: 4px;
    background: #ffffff;
    position: relative;
    margin-top: 1px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Состояние checked */
.callback-checkbox-label input[type="checkbox"]:checked + .callback-checkbox-custom {
    background: #095197;
    border-color: #095197;
}

/* Галочка внутри */
.callback-checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 8px;
    height: 13px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Показываем галочку */
.callback-checkbox-label input[type="checkbox"]:checked + .callback-checkbox-custom::after {
    opacity: 1;
}

/* Ховер эффект */
.callback-checkbox-label:hover .callback-checkbox-custom {
    border-color: #1B6BA5;
    box-shadow: 0 0 0 3px rgba(9, 81, 151, 0.15);
}

/* Фокус */
.callback-checkbox-label input[type="checkbox"]:focus + .callback-checkbox-custom {
    box-shadow: 0 0 0 3px rgba(9, 81, 151, 0.25);
}

/* Текст чекбокса */
.callback-checkbox-text {
    display: inline;
    color: #444;
}

.callback-checkbox-text a {
    color: #095197;
    text-decoration: underline;
    font-weight: 500;
}

.callback-checkbox-text a:hover {
    color: #1B6BA5;
    text-decoration: none;
}

#callbackConsentError {
    margin: -2px 0 15px 32px;
}

/* ---------- Кнопка отправки ---------- */
.callback-btn {
    width: 100%;
    padding: 14px 20px;
    font-family: 'GothamPro', 'Arial', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #095197;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 -3px #063a6b inset;
    margin-top: 8px;
}

.callback-btn:hover {
    background: #1B6BA5;
    box-shadow: 0 -3px #0d4a7a inset;
    transform: translateY(-1px);
}

.callback-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.callback-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 -3px #063a6b inset;
}

/* ---------- Спиннер на кнопке ---------- */
.callback-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: callbackSpin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes callbackSpin {
    to { transform: rotate(360deg); }
}

/* ---------- Textarea (Суть вопроса) ---------- */
.callback-textarea {
    min-height: 80px;
    resize: vertical;
    font-family: 'GothamPro', 'Arial', sans-serif;
    line-height: 1.5;
}

.callback-textarea:focus {
    min-height: 100px;
}

/* ====================================================
   АДАПТИВНОСТЬ
   ==================================================== */

/* Планшеты и маленькие ноутбуки */
@media (max-width: 1024px) {
    .callback-form-container {
        max-width: 100%;
        padding: 0 20px;
    }
}

@media (max-width: 992px) {
    .callback-form-inner {
        padding: 25px 25px 30px;
    }
    .callback-row {
        gap: 15px;
    }
}

/* Мобильные устройства - переключаем в колонку */
@media (max-width: 768px) {
    .callback-form-container {
        max-width: 100%;
        padding: 0 10px;
    }
    .callback-form-inner {
        padding: 20px 15px 25px;
    }
    .callback-form-title {
        font-size: 22px;
        padding-bottom: 10px;
    }
    
    .callback-row {
        flex-direction: column;
        gap: 0;
    }
    
    .callback-field-group {
        margin-bottom: 15px;
    }
    
    .callback-field-name {
        margin-bottom: 5px;
    }
    
    .callback-input {
        font-size: 15px;
        padding: 10px 12px;
    }
    .callback-btn {
        font-size: 15px;
        padding: 12px 16px;
    }
    .callback-checkbox-label {
        font-size: 12px;
    }
    #callbackConsentError {
        margin-left: 0;
    }
    .callback-checkbox-custom {
        width: 18px;
        min-width: 18px;
        height: 18px;
    }
    .callback-checkbox-custom::after {
        left: 4px;
        top: 0px;
        width: 7px;
        height: 12px;
    }
    
    .callback-textarea {
        min-height: 70px;
        font-size: 15px;
    }
    .callback-textarea:focus {
        min-height: 80px;
    }
    
    .callback-radio-group {
        gap: 20px;
    }
    
    .callback-radio-label {
        font-size: 14px;
    }
    
    .callback-consultation-label {
        font-size: 14px;
    }
    
    #callbackConsultationError {
        margin-left: 0;
    }
    
    .callback-field-consultation.radio-error {
        padding: 5px 8px;
    }
}

/* Маленькие телефоны */
@media (max-width: 480px) {
    .callback-form-inner {
        padding: 15px 10px 20px;
    }
    .callback-form-title {
        font-size: 19px;
    }
    .callback-form-subtitle {
        font-size: 14px;
    }
    .callback-input {
        font-size: 14px;
        padding: 9px 11px;
    }
    .callback-btn {
        font-size: 14px;
        padding: 11px 14px;
    }
    .callback-checkbox-label {
        font-size: 11px;
        gap: 8px;
    }
    .callback-checkbox-custom {
        width: 16px;
        min-width: 16px;
        height: 16px;
    }
    .callback-checkbox-custom::after {
        left: 3px;
        top: 0px;
        width: 6px;
        height: 10px;
        border-width: 0 2px 2px 0;
    }
    #callbackConsentError {
        margin-left: 0;
    }
    
    .callback-textarea {
        min-height: 85px;
        font-size: 14px;
    }
    .callback-textarea:focus {
        min-height: 70px;
    }
    
    .callback-radio-group {
        gap: 15px;
    }
    
    .callback-radio-label {
        font-size: 13px;
    }
    
    .callback-radio-custom {
        width: 18px;
        height: 18px;
        min-width: 18px;
    }
    
    .callback-radio-custom::after {
        width: 8px;
        height: 8px;
    }
    
    .callback-consultation-label {
        font-size: 13px;
    }
    
    #callbackConsultationError {
        margin-left: 0;
    }
    
    .callback-field-consultation.radio-error {
        padding: 5px 6px;
    }
}

/* ====================================================
   РАДИОКНОПКИ (КАСТОМНЫЕ)
   ==================================================== */
.callback-radio-group {
    display: flex;
    gap: 20px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.callback-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: 'GothamPro', 'Arial', sans-serif;
    font-size: 15px;
    color: #333;
    position: relative;
    padding: 5px 0;
    user-select: none;
}

/* Скрываем стандартную радиокнопку */
.callback-radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

/* Кастомная радиокнопка */
.callback-radio-custom {
    display: inline-block;
    width: 20px;
    min-width: 20px;
    height: 20px;
    border: 2px solid #095197;
    border-radius: 50%;
    background: #ffffff;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Точка внутри при выборе */
.callback-radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #095197;
    transition: transform 0.2s ease;
}

/* Состояние checked */
.callback-radio-label input[type="radio"]:checked + .callback-radio-custom {
    border-color: #095197;
}

.callback-radio-label input[type="radio"]:checked + .callback-radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Ховер эффект */
.callback-radio-label:hover .callback-radio-custom {
    border-color: #1B6BA5;
    box-shadow: 0 0 0 3px rgba(9, 81, 151, 0.15);
}

/* Фокус */
.callback-radio-label input[type="radio"]:focus + .callback-radio-custom {
    box-shadow: 0 0 0 3px rgba(9, 81, 151, 0.25);
}

/* Текст радиокнопки */
.callback-radio-text {
    display: inline;
    color: #333;
    font-weight: 500;
}

/* Honeypot — скрываем от пользователей */
.callback-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ====================================================
   АДАПТИВ ДЛЯ РАДИОКНОПОК
   ==================================================== */
@media (max-width: 768px) {
    .callback-radio-group {
        gap: 15px;
    }
    .callback-radio-label {
        font-size: 14px;
    }
    .callback-radio-custom {
        width: 18px;
        min-width: 18px;
        height: 18px;
    }
    .callback-radio-custom::after {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 480px) {
    .callback-radio-group {
        gap: 12px;
    }
    .callback-radio-label {
        font-size: 13px;
        gap: 6px;
    }
    .callback-radio-custom {
        width: 16px;
        min-width: 16px;
        height: 16px;
    }
    .callback-radio-custom::after {
        width: 7px;
        height: 7px;
    }
}

/* ====================================================
   РЯД "КОНСУЛЬТАЦИЯ + EMAIL"
   ==================================================== */

/* На ПК — 50/50 в одну строку (по умолчанию .callback-row уже flex) */
.callback-row-consultation {
    align-items: flex-start; /* чтобы колонки выравнивались по верху */
    margin-bottom: 0;        /* компенсируем margin у вложенных групп */
}

/* Консультация занимает чуть больше — потому что там 2 радиокнопки */
.callback-row-consultation .callback-consultation-group {
    flex: 1 1 55%;
    min-width: 0;
}

/* E-mail — компактнее */
.callback-row-consultation .callback-email-group {
    flex: 1 1 40%;
    min-width: 0;
}

/* E-mail не обязательный — убираем отступ снизу как у остальных ошибок */
.callback-row-consultation .callback-email-group .callback-error {
    margin-top: 5px;
}

/* ====================================================
   МОБИЛЬНАЯ ВЕРСИЯ — E-MAIL ПОД РАДИОКНОПКАМИ
   ==================================================== */
@media (max-width: 768px) {
    .callback-row-consultation {
        flex-direction: column;
        gap: 0;
    }

    .callback-row-consultation .callback-consultation-group,
    .callback-row-consultation .callback-email-group {
        flex: 1 1 100%;
        width: 100%;
    }

    /* Небольшой отступ, чтобы e-mail не прилипал к радиокнопкам */
    .callback-row-consultation .callback-email-group {
        margin-top: 6px;
    }
}