/**
 * Contact Form Enhancements
 * Additional styling for contact form feedback and user experience
 */

/* Form message container */
.form-message-container {
    margin-bottom: 1.5rem;
}

/* Alert styles */
.alert {
    border-radius: 5px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    animation: slideDown 0.3s ease-out;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Field error styling */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #d32f2f !important;
    background-color: #fff5f5;
}

.field-error {
    color: #d32f2f;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Loading state for submit button */
button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
}

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

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

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(42, 82, 152, 0.3);
    border-radius: 50%;
    border-top-color: #2a5298;
    animation: spin 1s linear infinite;
}

/* Form focus states - enhanced */
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

/* Success message icon */
.alert-success::before {
    font-size: 24px;
    margin-right: 15px;
}

/* Error message icon */
.alert-error::before {
    font-size: 24px;
    margin-right: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .alert {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .field-error {
        font-size: 0.8rem;
    }
}

/* Smooth transitions for better UX */
.form-group input,
.form-group select,
.form-group textarea {
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

button[type="submit"] {
    transition: opacity 0.3s ease, background-color 0.3s ease, transform 0.1s ease;
}

button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button[type="submit"]:active:not(:disabled) {
    transform: translateY(0);
}