/* Модальное окно для формы заявки */
#applicationModal .modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

#applicationModal .modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-bottom: none;
    padding: 20px 30px;
}

#applicationModal .modal-title {
    font-weight: 600;
    font-size: 1.3rem;
}

#applicationModal .modal-body {
    padding: 30px;
}

#applicationModal .modal-footer {
    border-top: 1px solid #eee;
    padding: 20px 30px;
    gap: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* Прогресс-бар */
#applicationModal .progress {
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    height: 10px;
    margin-bottom: 20px;
}

#applicationModal .progress-bar {
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    border-radius: 5px;
    transition: width 0.5s ease;
}

/* Стили для шагов формы */
.form-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.form-step.active {
    display: block;
}

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

.step-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: center;
}

.step-description {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* Стили для полей формы */
.form-field {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(230, 166, 189, 0.1); /* Изменено на e6a6bd */
}

.form-input.error {
    border-color: var(--accent-color);
    background-color: rgba(231, 76, 60, 0.05);
}

.error-message {
    color: var(--accent-color);
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Стили для радиокнопок и чекбоксов */
.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.radio-option {
    position: relative;
}

.radio-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background-color: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
    min-height: 60px;
}

.radio-label:hover {
    border-color: var(--secondary-color);
    background-color: rgba(230, 166, 189, 0.05); /* Изменено на e6a6bd */
}

.radio-input:checked + .radio-label {
    border-color: var(--secondary-color);
    background-color: rgba(230, 166, 189, 0.1); /* Изменено на e6a6bd */
    color: var(--secondary-color);
    font-weight: 600;
}

/* Стили для слайдера */
.slider-container {
    padding: 20px 10px;
}

.slider-value {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.slider-value span {
    color: var(--secondary-color);
}

.custom-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(230, 166, 189, 0.3); /* Изменено на e6a6bd */
}

.custom-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.85rem;
    color: #666;
}

/* Стили для списка городов */
.city-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.city-option {
    position: relative;
}

.city-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background-color: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
}

.city-label:hover {
    border-color: var(--secondary-color);
    background-color: rgba(230, 166, 189, 0.05); /* Изменено на e6a6bd */
}

.city-input:checked + .city-label {
    border-color: var(--secondary-color);
    background-color: rgba(230, 166, 189, 0.1); /* Изменено на e6a6bd */
    color: var(--secondary-color);
    font-weight: 600;
}

.other-city-input {
    margin-top: 10px;
    display: none;
}

.other-city-input.show {
    display: block;
}

/* ===================== СТИЛИ ДЛЯ КНОПОК ===================== */
/* Контейнер для кнопок */
.modal-footer .btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Стили для кнопки "Назад" */
#prevStepBtn {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 120px;
}

#prevStepBtn:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #495057;
}

/* Стили для кнопки "Далее" */
#nextStepBtn {
    background-color: #e6a6bd !important; /* ИЗМЕНЕНО на e6a6bd */
    border: 1px solid #e6a6bd !important; /* ИЗМЕНЕНО на e6a6bd */
    color: white !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 120px;
}

#nextStepBtn:hover {
    background-color: #d48aa6 !important; /* ИЗМЕНЕНО на d48aa6 */
    border-color: #d48aa6 !important; /* ИЗМЕНЕНО на d48aa6 */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 166, 189, 0.3); /* ИЗМЕНЕНО на e6a6bd */
}

/* Стили для кнопки "Отправить заявку" */
#submitApplicationBtn {
    background: linear-gradient(135deg, #e6a6bd, #d48aa6) !important; /* ИЗМЕНЕНО на e6a6bd */
    border: none !important;
    color: white !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 120px;
}

#submitApplicationBtn:hover {
    background: linear-gradient(135deg, #d48aa6, #e6a6bd) !important; /* ИЗМЕНЕНО на e6a6bd */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 166, 189, 0.3); /* ИЗМЕНЕНО на e6a6bd */
}

#submitApplicationBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Иконки в кнопках */
#prevStepBtn .fa-arrow-left {
    margin-right: 8px;
    color: #6c757d !important; /* ИЗМЕНЕНО: цвет иконки */
}

#nextStepBtn .fa-arrow-right {
    margin-left: 8px;
    color: white !important; /* ИЗМЕНЕНО: белый цвет для контраста */
}

#submitApplicationBtn .fa-paper-plane {
    margin-right: 8px;
    color: white !important; /* ИЗМЕНЕНО: белый цвет для контраста */
}

/* Убедитесь, что кнопки видны при display: inline-block */
#prevStepBtn,
#nextStepBtn,
#submitApplicationBtn {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Состояние когда кнопка скрыта */
#prevStepBtn[style*="display: none"],
#nextStepBtn[style*="display: none"],
#submitApplicationBtn[style*="display: none"] {
    display: none !important;
}

/* Индикатор загрузки */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    #applicationModal .modal-dialog {
        margin: 10px;
    }
    
    #applicationModal .modal-body {
        padding: 20px;
    }
    
    .radio-group {
        grid-template-columns: 1fr;
    }
    
    .city-list {
        grid-template-columns: 1fr;
    }
    
    .form-input {
        padding: 12px 15px;
    }
    
    .radio-label, .city-label {
        padding: 14px;
        min-height: 55px;
    }
    
    #prevStepBtn, #nextStepBtn, #submitApplicationBtn {
        min-width: auto;
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .modal-footer {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-footer .btn-group {
        width: 100%;
        justify-content: space-between;
    }
    
    .modal-footer .btn {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 576px) {
    #applicationModal .modal-header {
        padding: 15px 20px;
    }
    
    #applicationModal .modal-body {
        padding: 15px;
    }
    
    #applicationModal .modal-footer {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .step-title {
        font-size: 1.1rem;
    }
    
    .step-description {
        font-size: 0.9rem;
    }
    
    .slider-value {
        font-size: 1.3rem;
    }
    
    #prevStepBtn, #nextStepBtn, #submitApplicationBtn {
        padding: 10px 15px;
        min-width: 100px;
    }
    
    .modal-footer .btn {
        margin: 5px 0;
    }
}

/* Анимация успешной отправки */
.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 4rem;
    color: #e6a6bd !important; /* ИЗМЕНЕНО на e6a6bd */
    margin-bottom: 20px;
    animation: bounce 1s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.success-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.success-description {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Стили для алертов */
.alert {
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: rgba(230, 166, 189, 0.1) !important; /* ИЗМЕНЕНО на e6a6bd */
    border: 1px solid rgba(230, 166, 189, 0.2) !important; /* ИЗМЕНЕНО на e6a6bd */
    color: #8a5d6b !important; /* Темно-розовый текст для контраста */
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
    color: #856404;
}

.alert-info {
    background-color: rgba(230, 166, 189, 0.1) !important; /* ИЗМЕНЕНО на e6a6bd */
    border: 1px solid rgba(230, 166, 189, 0.2) !important; /* ИЗМЕНЕНО на e6a6bd */
    color: #8a5d6b !important; /* Темно-розовый текст для контраста */
}

/* Уведомление о сохранении черновика */
.draft-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #e6a6bd !important; /* ИЗМЕНЕНО на e6a6bd */
    color: white !important;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 1060;
    display: none;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.draft-notification.show {
    display: block;
}

/* Кнопки в навигации сайта */
.btn-application {
    background: linear-gradient(135deg, #e6a6bd, #d48aa6) !important; /* ИЗМЕНЕНО на e6a6bd */
    border: none !important;
    color: white !important;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 166, 189, 0.3); /* ИЗМЕНЕНО на e6a6bd */
}

.btn-application:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 166, 189, 0.4); /* ИЗМЕНЕНО на e6a6bd */
}

/* Обновление существующих кнопок в главной секции */
.hero .btn-primary {
    background: linear-gradient(135deg, #e6a6bd, #d48aa6) !important; /* ИЗМЕНЕНО на e6a6bd */
    border: none !important;
    box-shadow: 0 4px 15px rgba(230, 166, 189, 0.3); /* ИЗМЕНЕНО на e6a6bd */
}

.hero .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 166, 189, 0.4); /* ИЗМЕНЕНО на e6a6bd */
}

/* WhatsApp-specific стили (оставлено на случай если еще используется) */
.btn-success.whatsapp {
    background: #303845;
    border: none;
    transition: all 0.3s ease;
}

.btn-success.whatsapp:hover {
    background: #1f252f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(48, 56, 69, 0.3);
}

/* Стили для WhatsApp иконок */
.fa-whatsapp {
    color: #25D366 !important;
}

/* Успешное сообщение WhatsApp */
.success-message .fa-whatsapp {
    color: #25D366 !important;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Стили для email отправки */
.success-message .fa-envelope {
    color: #e6a6bd !important; /* ИЗМЕНЕНО на e6a6bd */
    animation: bounce 1s ease;
}

/* Для отладки - можно добавить при необходимости */
.debug-button {
    border: 2px solid #ff0000 !important;
    background-color: rgba(255, 0, 0, 0.1) !important;
}

/* Переменные для цветов, если не определены */
:root {
    --primary-color: #2c3e50 !important;
    --secondary-color: #e6a6bd !important; /* ИЗМЕНЕНО на e6a6bd */
    --accent-color: #e74c3c !important;
    --success-color: #e6a6bd !important; /* ИЗМЕНЕНО на e6a6bd */
    --info-color: #e6a6bd !important; /* ИЗМЕНЕНО на e6a6bd */
}

/* Для кастомных стилей если используются другие цвета */
.custom-primary { color: var(--primary-color, #2c3e50) !important; }
.custom-secondary { color: var(--secondary-color, #e6a6bd) !important; }
.custom-accent { color: var(--accent-color, #e74c3c) !important; }

/* Финальные правки для гарантированного отображения кнопок */
#applicationModal .modal-footer {
    min-height: 70px;
}

#applicationModal .modal-footer button {
    position: relative;
    z-index: 1;
}

/* Улучшение видимости кнопок при любом состоянии */
#prevStepBtn:not([style*="display: none"]),
#nextStepBtn:not([style*="display: none"]),
#submitApplicationBtn:not([style*="display: none"]) {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Анимация появления кнопок */
#prevStepBtn,
#nextStepBtn,
#submitApplicationBtn {
    animation: buttonFadeIn 0.3s ease;
}

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

/* ДОПОЛНИТЕЛЬНЫЕ ИСПРАВЛЕНИЯ ДЛЯ ФОРМЫ - ВСЕ СИНИЕ ЦВЕТА */
.radio-label:hover {
    background-color: rgba(230, 166, 189, 0.05) !important; /* e6a6bd */
}

.radio-input:checked + .radio-label {
    background-color: rgba(230, 166, 189, 0.1) !important; /* e6a6bd */
}

.city-label:hover {
    background-color: rgba(230, 166, 189, 0.05) !important; /* e6a6bd */
}

.city-input:checked + .city-label {
    background-color: rgba(230, 166, 189, 0.1) !important; /* e6a6bd */
}

/* УДАЛЕНИЕ ВСЕХ СИНИХ ТЕНЕЙ И ГРАДИЕНТОВ */
.form-input:focus {
    box-shadow: 0 0 0 3px rgba(230, 166, 189, 0.25) !important; /* e6a6bd */
}

#nextStepBtn {
    box-shadow: none !important;
}

#nextStepBtn:hover {
    box-shadow: 0 5px 15px rgba(230, 166, 189, 0.3) !important; /* e6a6bd */
}

#submitApplicationBtn:hover {
    box-shadow: 0 5px 15px rgba(230, 166, 189, 0.3) !important; /* e6a6bd */
}

.btn-application {
    box-shadow: 0 4px 15px rgba(230, 166, 189, 0.3) !important; /* e6a6bd */
}

.btn-application:hover {
    box-shadow: 0 6px 20px rgba(230, 166, 189, 0.4) !important; /* e6a6bd */
}

.hero .btn-primary {
    box-shadow: 0 4px 15px rgba(230, 166, 189, 0.3) !important; /* e6a6bd */
}

.hero .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(230, 166, 189, 0.4) !important; /* e6a6bd */
}

/* ВАЖНО: Переопределение синих цветов в переменных */
:root {
    --bs-blue: #e6a6bd !important;
    --bs-indigo: #e6a6bd !important;
    --bs-purple: #e6a6bd !important;
    --bs-pink: #e6a6bd !important;
    --bs-red: #e74c3c !important;
    --bs-orange: #e6a6bd !important;
    --bs-yellow: #e6a6bd !important;
    --bs-green: #e6a6bd !important;
    --bs-teal: #e6a6bd !important;
    --bs-cyan: #e6a6bd !important;
    --bs-primary: #e6a6bd !important;
    --bs-success: #e6a6bd !important;
    --bs-info: #e6a6bd !important;
}

/* Значение площади должно быть контрастным на розовом фоне. */
#applicationModal #areaValue {
    display: inline-block;
    min-width: 64px;
    background-color: #e6a6bd !important;
    color: #fff !important;
    text-align: center;
}
