:root {
    --accent-color: #4b65f6;
    --accent-hover: #3751e3;
    --bg-field: #f6f6f9;
    --text-main: #0b0f19;
    --border: #e2e8f0;
}

.cf-steps-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 35px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

.cf-step-indicator {
    font-size: 14px;
    font-weight: 500;
    opacity: 1;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.cf-step-indicator span {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-color);
    margin-right: 8px;
}

.cf-step-content {
    display: none;
}

.cf-step-content.active {
    display: block;
    animation: cfFadeIn 0.35s ease-in-out;
}

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

/* --- ИСПРАВЛЕННЫЙ БЛОК: Сетка для полей на десктопе --- */
.cf-input-group {
    display: flex;
    flex-direction: row; /* На десктопе всегда в один ряд */
    gap: 20px;
    width: 100%;
}

/* Все прямые потомки (input, select, textarea, .cf-file-upload) делят строку поровну */
.cf-input-group > input,
.cf-form-container select,
.cf-input-group textarea,
.cf-input-group .cf-file-upload {
    flex: 1;
    min-width: 0; /* Предотвращает распирание flex-элементов */
}
/* ----------------------------------------------------- */

.cf-form-container input[type="text"],
.cf-form-container input[type="tel"],
.cf-form-container input[type="email"],
.cf-form-container input[type="number"],
.cf-form-container input[type="date"],
.cf-form-container select,
.cf-form-container textarea {
    height: 56px;
    padding: 0 24px;
    background: var(--bg-field);
    border: 1px solid var(--border);
    border-radius: 28px;
    font-size: 15px;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
    width: 100%; /* Занимают всю ширину выделенного flex-слота */
    box-sizing: border-box;
}

.cf-form-container textarea {
    height: 110px;
    padding: 16px 24px;
    border-radius: 20px;
    resize: none;
}

.cf-form-container input:focus,
.cf-form-container select:focus,
.cf-form-container textarea:focus {
    border-color: var(--accent-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(75, 101, 246, 0.12);
}

.cf-file-upload {
    position: relative;
}

.cf-file-upload input {
    display: none;
}

.cf-file-upload label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    background: var(--bg-field);
    border: 2px dashed #cbd5e1;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
    font-weight: 600;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.cf-file-upload label:hover {
    background: #edf2f7;
}

.cf-form-footer {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
}

.cf-checkbox-label {
    display: block;
    font-size: 13px;
    color: #718096;
    cursor: pointer;
    line-height: 1.5;
    transition: opacity 0.3s ease;
}

.cf-checkbox-label a {
    color: var(--accent-color);
    text-decoration: none;
}

/* Полупрозрачность и запрет кликов на 1-3 шагах */
.disabled-state {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(60%);
}

.cf-navigation {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.cf-navigation button {
    height: 56px;
    padding: 0 32px;
    border-radius: 28px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cf-navigation button[data-btn-action="prev"] {
    background: #e2e8f0;
    color: #4a5568;
}

.cf-btn-primary {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 14px rgba(75, 101, 246, 0.25);
}

.cf-btn-primary:hover {
    background: var(--accent-hover);
}

.cf-btn-submit {
    background: #2ecc71 !important;
    box-shadow: 0 4px 14px rgba(46, 204, 113, 0.25);
}

.cf-response-msg {
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    margin-top: 15px;
}

/* --- АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ --- */
@media (max-width: 768px) {
    .cf-steps-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .cf-input-group {
        flex-direction: column; /* На смартфонах перестраиваем обратно в столбик */
        gap: 15px;
    }

    .cf-step-indicator {
        margin-bottom: 5px;
    }

    .cf-form-container input[type="text"], .cf-form-container input[type="tel"], .cf-form-container input[type="email"], .cf-form-container input[type="number"], .cf-form-container input[type="date"], .cf-form-container select, .cf-form-container textarea {
        line-height: 56px;
    }

}