/* Enhanced Contact Form Styles */

/* Form Container */
#contactForm {
    max-width: 100%;
}

/* Form Fields */
#contactForm .form-control {
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#contactForm .form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#contactForm .form-control.is-invalid {
    border-color: #dc3545;
}

#contactForm .form-control.is-valid {
    border-color: #28a745;
}

/* Error Messages */
.text-error {
    color: #dc3545 !important;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    display: block;
    line-height: 1.3;
}

/* Field-specific error spans */
#firstName-error,
#company-error,
#email-error,
#phone-error,
#phoneNumber-error,
#subject-error,
#message-error {
    color: #dc3545 !important;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    display: none;
    line-height: 1.3;
    padding-left: 0.25rem;
}

/* Show error state */
.form-control.is-invalid {
    border-color: #dc3545 !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Submit Button - Original Red Styling */
#csubmit-btn {
    background-color: #d92e33 !important;
    border-color: #d92e33 !important;
    color: #fff !important;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    min-width: 120px;
    border: 1px solid transparent;
}

#csubmit-btn:hover:not(:disabled) {
    background-color: #c1252a !important;
    border-color: #c1252a !important;
    transform: translateY(-1px);
}

#csubmit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Character Counter */
#count {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Success/Error Messages */
#submit-msg {
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

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

#submit-msg.error {
    background-color: #f8d7da;
    border: 1px solid #f1aeb5;
    color: #721c24;
}

/* Loading Animation */
.fa-spinner.fa-spin {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Responsiveness */
@media (max-width: 768px) {
    #contactForm .form-control {
        font-size: 16px; /* Prevents zoom on mobile */
    }
    
    #csubmit-btn {
        width: 100%;
        margin-top: 1rem;
    }
}

/* Accessibility Improvements */
#contactForm input:focus,
#contactForm textarea:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Required Field Indicators */
#contactForm input[required]::after,
#contactForm textarea[required]::after {
    content: " *";
    color: #dc3545;
}