/**
 * Professional Contact Form Styles
 */

/* Field error states */
.contact-form input.error,
.contact-form textarea.error {
    border-color: #e74c3c !important;
    background-color: #fff5f5;
}

.field-error {
    display: none;
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Loading state */
.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

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

/* Form messages */
.form-message {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: 500;
    text-align: center;
    animation: slideIn 0.3s ease-out;
}

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

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

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

/* Enhanced form styling */
.contact-form {
    position: relative;
}

.contact-form input,
.contact-form textarea {
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(16, 117, 134, 0.1);
    outline: none;
}

/* Submit button enhancements */
.btn-submit {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-submit:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-submit:hover:before {
    width: 300px;
    height: 300px;
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .btn-submit {
        width: 100%;
    }
}