/**
 * Стили для обработки форм
 * Добавлены для корректной работы валидации и сообщений
 */

/* Подсветка полей с ошибками */
.form-error {
    border-color: #dc3232 !important;
    background-color: #fff0f0 !important;
}

.form-error-wrap {
    border-color: #dc3232 !important;
}

/* Анимация для модальных окон */
.modal.fade.show {
    opacity: 1;
}

.modal {
    transition: opacity 0.3s ease;
}

/* Стили для кнопки отправки */
.wpcf7-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* === УВЕДОМЛЕНИЯ ФОРМ === */
.wpcf7-response-output {
    position: relative !important;
    z-index: 10000 !important;
    display: block !important;
    padding: 15px 20px !important;
    margin: 15px 0 !important;
    border-radius: 6px !important;
    text-align: center !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    font-weight: 500 !important;
    opacity: 1 !important;
    visibility: visible !important;
    animation: fadeInMessage 0.3s ease-in !important;
}

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

/* Успешная отправка */
.wpcf7-response-output[style*="46b450"],
.form-success-message {
    color: #155724 !important;
    border: 2px solid #28a745 !important;
    background-color: #d4edda !important;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2) !important;
}

/* Ошибка */
.wpcf7-response-output[style*="dc3232"],
.form-error-message {
    color: #721c24 !important;
    border: 2px solid #dc3232 !important;
    background-color: #f8d7da !important;
    box-shadow: 0 2px 8px rgba(220, 50, 50, 0.2) !important;
}

/* Убедимся, что сообщение видно в модальном окне */
.modal-body .wpcf7-response-output {
    position: relative !important;
    margin: 20px 0 !important;
    z-index: 10000 !important;
}

/* Разрешаем переполнение в модальном окне для показа уведомлений */
.modal-body {
    overflow: visible !important;
    max-height: none !important;
}

.modal-content {
    overflow: visible !important;
}

.modal-dialog {
    overflow: visible !important;
}

/* Убеждаемся, что self screen-reader-response не мешает */
.screen-reader-response {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 10px;
    }
    
    .modal-lg {
        max-width: 100%;
    }
    
    .wpcf7-response-output {
        font-size: 13px !important;
        padding: 12px 15px !important;
    }
}
