/* Enhanced Form Styles for AJAX Contact Forms */

/* Form field error states */
.form-control.error,
.text-input.error,
.email.error,
.phone.error,
.text-area.error {
    border: 2px solid #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Form field focus states */
.form-control:focus,
.text-input:focus,
.email:focus,
.phone:focus,
.text-area:focus {
    border-color: #0073a8 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 115, 168, 0.25) !important;
    outline: none !important;
}

/* Error message styling */
.error-message {
    color: #dc3545 !important;
    font-size: 12px !important;
    margin-top: 5px !important;
    display: block !important;
    font-weight: 500 !important;
}

/* Success message styling */
.form-message.success-message {
    background-color: #d4edda !important;
    color: #155724 !important;
    padding: 15px !important;
    border: 1px solid #c3e6cb !important;
    border-radius: 5px !important;
    margin: 15px 0 !important;
    text-align: center !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

/* Error message styling */
.form-message.error-message {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    padding: 15px !important;
    border: 1px solid #f5c6cb !important;
    border-radius: 5px !important;
    margin: 15px 0 !important;
    text-align: center !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

/* Loading spinner */
.form-spinner {
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #f3f3f3 !important;
    border-top: 2px solid #0073a8 !important;
    border-radius: 50% !important;
    animation: spin 1s linear infinite !important;
    margin-left: 10px !important;
}

/* Spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Submit button loading state */
.submit-btn:disabled,
.thm-btn:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

/* Form container enhancements */
.contactform,
.comment-form {
    position: relative;
}

/* Input field enhancements */
.form-control,
.text-input,
.email,
.phone,
.text-area {
    transition: all 0.3s ease !important;
    border-radius: 4px !important;
    border: 1px solid #ddd !important;
    padding: 10px !important;
    width: 100% !important;
    font-size: 14px !important;
}

/* Label styling */
label {
    font-weight: 500 !important;
    color: #333 !important;
}

/* Required field indicator */
.form-control[required]::after {
    content: " *";
    color: #dc3545;
}

/* Form validation feedback */
.form-control.valid {
    border-color: #28a745 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-message {
        margin: 10px 0 !important;
        padding: 12px !important;
        font-size: 14px !important;
    }
    
    .error-message {
        font-size: 11px !important;
    }
}

/* Animation for form messages */
.form-message {
    animation: slideIn 0.3s ease-out;
}

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

/* Focus improvements for accessibility */
.form-control:focus,
.text-input:focus,
.email:focus,
.phone:focus,
.text-area:focus {
    outline: 2px solid #0073a8 !important;
    outline-offset: 2px !important;
}

/* Button hover effects */
.submit-btn:hover:not(:disabled),
.thm-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}
