/* Contact Email Form Styles - Forced Uniformity & Compactness */

.contact-email-wrapper {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.contact-email-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem !important;
    /* Forced gap */
    width: 100%;
}

/* Form Row Layout */
.form-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem !important;
    width: 100%;
    margin: 0 !important;
}

.form-row.full-width {
    width: 100%;
}

.form-group {
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

.form-group.half {
    flex: 1 1 50%;
    min-width: 0;
}

/* Forced Input Styles */
.contact-email-form input[type="text"],
.contact-email-form input[type="email"],
.contact-email-form input[type="tel"],
.contact-email-form input[type="number"],
.contact-email-form .form-control {
    box-sizing: border-box !important;
    height: 40px !important;
    padding: 0 12px !important;
    /* Vertical padding 0 with fixed height centers text better usually, or small padding */
    font-size: 14px !important;
    line-height: 40px !important;
    /* Match height for vertical centering */
    color: #333 !important;
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    margin: 0 !important;
    box-shadow: none !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Specific overrides for Textarea to not be 40px height */
.contact-email-form textarea.form-control {
    height: auto !important;
    min-height: 120px !important;
    padding: 12px !important;
    line-height: 1.4 !important;
}

.contact-email-form .form-control:focus {
    outline: none !important;
    border-color: #0066cc !important;
}

.contact-email-form .form-control::placeholder {
    color: #999 !important;
}

/* Submit Button - Modern Flat Design & Full Width */
.submit-group {
    margin-top: 0.5rem !important;
    width: 100%;
}

.submit-btn {
    width: 100% !important;
    padding: 14px 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #fff !important;
    background-color: #0066cc !important;
    background-image: none !important;
    border: none !important;
    outline: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    box-shadow: none !important;
    font-family: inherit !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
}

.submit-btn:hover {
    background-color: #0052a3 !important;
}

.submit-btn:active {
    background-color: #003d7a !important;
}

.submit-btn:disabled {
    background-color: #ccc !important;
    cursor: not-allowed !important;
}

/* Loading Animation */
.btn-loading {
    display: inline-block;
}

.btn-loading::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Messages */
.form-message {
    display: none;
    padding: 10px 15px;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    font-size: 14px;
}

.form-message.show {
    display: block;
}

.form-message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.form-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .form-group.half {
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }
}