/* ===========================================
   CONTACT FORM DESIGN SYSTEM - MULTIPLE OPTIONS
   Choose from several professionally designed form styles
   No gradients in default theme - clean, accessible designs
   =========================================== */

/* ===========================================
   BASE FORM VALIDATION STYLES
   =========================================== */
.form-control.is-valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path fill='%23198754' d='m2.3 6.73.13.13.1-.1L7.25 2 7 1.75l-4.52 4.52L.75 3.75.5 4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'><circle cx='6' cy='6' r='4.5'/><path d='m5.5 5.5 1 1m0 0 1 1m-1-1 1-1m-1 1-1 1'/></svg>");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Character Counter */
#character-counter {
    font-weight: 600;
    font-size: 0.875rem;
}

/* SMS Consent Transitions */
#sms-consent-section {
    transition: all 0.3s ease-in-out;
}

/* ===========================================
   DESIGN OPTION 1: PROFESSIONAL CARD
   Clean, modern card design with subtle shadows
   =========================================== */
.contact-form-option-1 {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    padding: 2.5rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.contact-form-option-1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--brand-primary, #3671c9);
}

.contact-form-option-1 .form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f1f5f9;
}

.contact-form-option-1 .form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.contact-form-option-1 .form-subtitle {
    font-size: 1rem;
    color: #64748b;
    font-weight: 400;
}

.contact-form-option-1 .accessible-input {
    font-size: 1rem !important;
    font-weight: 500;
    border: 2px solid #d1d5db !important;
    border-radius: 8px;
    padding: 14px 16px !important;
    transition: all 0.2s ease;
    background-color: #ffffff;
}

.contact-form-option-1 .accessible-input:focus {
    border-color: var(--brand-primary, #3671c9) !important;
    box-shadow: 0 0 0 3px rgba(54, 113, 201, 0.1) !important;
    outline: none;
}

.contact-form-option-1 .btn-primary {
    background-color: var(--brand-primary, #3671c9);
    border-color: var(--brand-primary, #3671c9);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.contact-form-option-1 .btn-primary:hover {
    background-color: var(--brand-primary-hover, #2c5aa0);
    border-color: var(--brand-primary-hover, #2c5aa0);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(54, 113, 201, 0.3);
}

/* ===========================================
   DESIGN OPTION 2: ELEVATED FORM WITH ACCENT
   Form with colored background header and white form area
   Enhanced with proper branding and typography
   =========================================== */
.contact-form-option-2 {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(54, 113, 201, 0.1);
    margin: 3rem 0;
    overflow: hidden;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.contact-form-option-2 .form-header {
    background: var(--brand-primary, #3671c9);
    color: white;
    text-align: center;
    padding: 2rem 2rem 1.5rem 2rem;
    margin: 0;
    position: relative;
    box-shadow: 0 4px 20px rgba(54, 113, 201, 0.3);
}

.contact-form-option-2 .form-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20" fill="none"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="20" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.contact-form-option-2 .form-header::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 24px solid transparent;
    border-right: 24px solid transparent;
    border-top: 12px solid var(--brand-primary, #3671c9);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.contact-form-option-2 .form-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: white !important;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
    font-family: var(--brand-font-heading, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: -0.025em;
}

.contact-form-option-2 .form-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    position: relative;
    z-index: 2;
    line-height: 1.5;
    max-width: 500px;
    margin: 0 auto;
}

.contact-form-option-2 .form-body {
    padding: 3rem 3rem 3rem 3rem;
    background: #ffffff;
    position: relative;
}

.contact-form-option-2 .accessible-input {
    font-size: 1rem !important;
    font-weight: 500;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px;
    padding: 18px 20px !important;
    transition: all 0.3s ease;
    background: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.contact-form-option-2 .accessible-input:focus {
    border-color: var(--brand-secondary, #2fc090) !important;
    box-shadow: 0 0 0 4px rgba(47, 192, 144, 0.15), 0 2px 8px rgba(0,0,0,0.1) !important;
    outline: none;
    transform: translateY(-1px);
}

.contact-form-option-2 .accessible-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.contact-form-option-2 .btn-primary {
    background: var(--brand-secondary, #2fc090);
    border: none;
    font-size: 1.125rem;
    font-weight: 600;
    padding: 18px 48px;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 16px rgba(47, 192, 144, 0.3);
    position: relative;
    overflow: hidden;
}

.contact-form-option-2 .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.6s;
}

.contact-form-option-2 .btn-primary:hover {
    background: #26a676;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(47, 192, 144, 0.4);
}

.contact-form-option-2 .btn-primary:hover::before {
    left: 100%;
}

.contact-form-option-2 .sms-consent-container {
    background: #f8fffe !important;
    border: 2px solid #d1fae5 !important;
    border-radius: 12px !important;
    border-left: 5px solid var(--brand-secondary, #2fc090) !important;
    margin: 1.5rem 0 !important;
}

/* ===========================================
   DESIGN OPTION 3: MINIMAL BORDERED
   Clean, minimal design with focus on content
   =========================================== */
.contact-form-option-3 {
    background: #ffffff;
    border: 3px solid var(--brand-primary, #3671c9);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
}

.contact-form-option-3 .form-header {
    text-align: left;
    margin-bottom: 1.5rem;
    padding: 0;
}

.contact-form-option-3 .form-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--brand-primary, #3671c9);
    margin-bottom: 0.5rem;
}

.contact-form-option-3 .form-subtitle {
    font-size: 1rem;
    color: #4b5563;
    font-weight: 500;
}

.contact-form-option-3 .accessible-input {
    font-size: 1rem !important;
    font-weight: 500;
    border: 2px solid #d1d5db !important;
    border-radius: 6px;
    padding: 12px 16px !important;
    transition: all 0.2s ease;
}

.contact-form-option-3 .accessible-input:focus {
    border-color: var(--brand-primary, #3671c9) !important;
    box-shadow: 0 0 0 3px rgba(54, 113, 201, 0.1) !important;
    outline: none;
}

.contact-form-option-3 .btn-primary {
    background-color: var(--brand-primary, #3671c9);
    border-color: var(--brand-primary, #3671c9);
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.contact-form-option-3 .btn-primary:hover {
    background-color: var(--brand-primary-hover, #2c5aa0);
    border-color: var(--brand-primary-hover, #2c5aa0);
}

/* ===========================================
   DESIGN OPTION 4: SUBTLE BACKGROUND ACCENT
   Contemporary design with soft background differentiation
   =========================================== */
.contact-form-option-4 {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 2.5rem;
    margin: 2rem 0;
    position: relative;
}

.contact-form-option-4 .form-header {
    text-align: center;
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.contact-form-option-4 .form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.contact-form-option-4 .form-subtitle {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 400;
}

.contact-form-option-4 .accessible-input {
    font-size: 1rem !important;
    font-weight: 500;
    border: 2px solid #d1d5db !important;
    border-radius: 8px;
    padding: 14px 18px !important;
    transition: all 0.2s ease;
    background: #ffffff;
}

.contact-form-option-4 .accessible-input:focus {
    border-color: var(--brand-primary, #3671c9) !important;
    box-shadow: 0 0 0 3px rgba(54, 113, 201, 0.1) !important;
    outline: none;
}

.contact-form-option-4 .btn-primary {
    background: var(--brand-primary, #3671c9);
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.contact-form-option-4 .btn-primary:hover {
    background: var(--brand-primary-hover, #2c5aa0);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(54, 113, 201, 0.3);
}

/* ===========================================
   SHARED ACCESSIBILITY ENHANCEMENTS
   Applied to all form designs for consistency
   =========================================== */
[class*="contact-form-option"] .accessible-input {
    font-size: 1rem !important; /* Minimum 16px for accessibility */
    min-height: 48px; /* Minimum touch target size */
}

[class*="contact-form-option"] .btn-primary {
    min-height: 48px;
    min-width: 120px;
}

[class*="contact-form-option"] .sms-consent-container {
    background: #f8f9fa !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    border-left: 4px solid var(--brand-primary, #3671c9) !important;
}

[class*="contact-form-option"] .form-check-input {
    width: 20px !important;
    height: 20px !important;
    margin-top: 2px !important;
    border: 2px solid #6c757d !important;
    border-radius: 4px !important;
}

[class*="contact-form-option"] .form-check-input:checked {
    background-color: var(--brand-primary, #3671c9) !important;
    border-color: var(--brand-primary, #3671c9) !important;
}

/* Error List Styling */
[class*="contact-form-option"] .validation-error-list {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

[class*="contact-form-option"] .validation-success-list {
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Responsive Design for All Options */
@media (max-width: 768px) {
    [class*="contact-form-option"] {
        margin: 1rem 0;
        padding: 1.5rem;
    }
    
    .contact-form-option-2 .form-header {
        padding: 1.5rem;
    }
    
    .contact-form-option-2 .form-body {
        padding: 1.5rem;
    }
    
    .contact-form-option-4 .form-header {
        padding: 1rem;
    }
    
    [class*="contact-form-option"] .form-title {
        font-size: 1.5rem;
    }
    
    [class*="contact-form-option"] .form-subtitle {
        font-size: 0.9rem;
    }
    
    [class*="contact-form-option"] .accessible-input {
        padding: 12px 14px !important;
    }
    
    [class*="contact-form-option"] .btn-primary {
        width: 100%;
        margin-top: 1rem;
    }
}

/* Focus indicators for accessibility */
[class*="contact-form-option"] *:focus {
    outline: 2px solid var(--brand-primary, #3671c9);
    outline-offset: 2px;
}

[class*="contact-form-option"] .accessible-input:focus {
    outline: none; /* Custom focus styling handles this */
}

.sms-consent-text p:last-child {
    margin-bottom: 0;
}

/* Terms and Policy Section */
.enhanced-contact-form .form-check-label a {
    color: #007bff;
    text-decoration: underline;
}

.enhanced-contact-form .form-check-label a:hover {
    color: #0056b3;
    text-decoration: none;
}

/* Validation Summary */
#form-validation-summary .alert {
    text-align: left;
}

#form-validation-summary ul {
    padding-left: 1.5rem;
}

#form-validation-summary li {
    margin-bottom: 0.25rem;
}

/* Loading and Status Messages */
.enhanced-contact-form .loading {
    color: #6c757d;
    font-style: italic;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.enhanced-contact-form .error-message {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.enhanced-contact-form .sent-message {
    color: #0f5132;
    background-color: #d1eddd;
    border: 1px solid #badbcc;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

/* Submit Button Enhancement */
.enhanced-contact-form #submit-button {
    position: relative;
    min-width: 160px;
    transition: all 0.3s ease;
}

.enhanced-contact-form #submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Field Help Text */
.enhanced-contact-form .form-text {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.enhanced-contact-form .form-text.text-muted {
    color: #6c757d !important;
}

/* Dropdown Enhancements */
.enhanced-contact-form .form-select {
    cursor: pointer;
}

.enhanced-contact-form .form-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Ensure consistent dropdown behavior in contact form */
.contact section {
    /* Add extra bottom padding to provide space for dropdowns */
    padding-bottom: 100px;
}

.contact .form-select {
    /* Prevent auto-flipping of dropdowns */
    position: relative;
}

/* Ensure dropdown container has enough space */
.contact .row.g-3.mb-3 {
    margin-bottom: 3rem !important;
}

/* Required Field Indicator */
.enhanced-contact-form .form-label span[aria-hidden="true"] {
    font-weight: bold;
    margin-left: 2px;
}

/* Phone Number Field Enhancement */
.enhanced-contact-form input[type="tel"] {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Message Status Indicators */
#message-status .text-success,
#message-status .text-warning,
#message-status .text-danger {
    font-weight: 500;
    font-size: 0.875rem;
}

/* Accessibility Improvements */
.enhanced-contact-form [aria-hidden="true"] {
    user-select: none;
}

.enhanced-contact-form [aria-live] {
    position: relative;
}

/* Focus Styles for Better Accessibility */
.enhanced-contact-form input:focus,
.enhanced-contact-form select:focus,
.enhanced-contact-form textarea:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.enhanced-contact-form .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
    .enhanced-contact-form .float-end {
        float: none !important;
        display: block;
        text-align: right;
        margin-top: 0.25rem;
    }
    
    .enhanced-contact-form #submit-button {
        width: 100%;
        min-width: auto;
    }
    
    .sms-consent-text {
        font-size: 0.85rem;
        padding: 1rem;
    }
    
    #form-validation-summary {
        margin-top: 1rem;
    }
}

/* Print Styles */
@media print {
    .enhanced-contact-form .loading,
    .enhanced-contact-form .error-message,
    .enhanced-contact-form .sent-message,
    .enhanced-contact-form #submit-button {
        display: none !important;
    }
}