/* ========================================
   Intake Form Styles
   ======================================== */

/* Header */
.intake-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #1f2937;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    font-size: 2rem;
}

.header-help {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.help-icon {
    font-size: 1.5rem;
}

.header-help a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.header-help a:hover {
    text-decoration: underline;
}

/* Welcome Section */
.welcome-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.welcome-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: #ffffff;
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

/* Intake link error (invalid or missing payment link) */
.intake-link-error {
    padding: 4rem 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.intake-link-error-content {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 2rem;
}

.intake-link-error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.intake-link-error-content h1 {
    font-size: 1.5rem;
    color: #991b1b;
    margin-bottom: 1rem;
}

.intake-link-error-message {
    color: #b91c1c;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.intake-link-error-help {
    font-size: 0.875rem;
    color: #6b7280;
}

.intake-link-error-help a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.intake-link-error-help a:hover {
    text-decoration: underline;
}

.welcome-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #ffffff;
}

.welcome-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Help Box */
.help-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    text-align: left;
}

.help-box-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.help-box-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.help-box-content p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.help-box-content a {
    color: #fbbf24;
    text-decoration: underline;
}

/* What You'll Need */
.what-youll-need {
    background: #ffffff;
    color: #1f2937;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: left;
}

.what-youll-need h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.need-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.need-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f3f4f6;
    border-radius: 8px;
}

.need-icon {
    font-size: 1.5rem;
}

.need-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.need-note {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
    margin-top: 1rem;
}

.privacy-note {
    margin-top: 2rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Application Section */
.application-section {
    padding: 3rem 0;
    min-height: 100vh;
    background: #f9fafb;
}

/* Progress Bar */
.progress-bar-container {
    margin-bottom: 3rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 999px;
    transition: width 0.3s ease;
    width: 12.5%; /* 1/8 steps */
}

.progress-text {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
}

/* Form Steps */
.intake-form {
    max-width: 700px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.step-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.step-description {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-input[readonly],
.form-select[readonly] {
    background-color: #f3f4f6 !important;
    cursor: not-allowed !important;
    border-color: #d1d5db !important;
    color: #6b7280 !important;
}

.prefilled-note {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
    font-size: 0.875rem;
}

.required {
    color: #ef4444;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-help {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Security Badge */
.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 9999px;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #166534;
}

.security-icon {
    font-size: 1.25rem;
}

/* Number Selector */
.number-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.number-btn {
    width: 50px;
    height: 50px;
    border: 2px solid #667eea;
    background: #ffffff;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    cursor: pointer;
    transition: all 0.2s;
}

.number-btn:hover {
    background: #667eea;
    color: #ffffff;
}

.number-input {
    width: 100px;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    border: none;
    color: #1f2937;
}

/* Info Box */
.info-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    font-size: 0.875rem;
}

/* HR Contact Section */
.hr-contact-section {
    margin: 2rem 0;
}

.hr-contact-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.contact-list li {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f9fafb;
    border-radius: 8px;
}

/* Template Box */
.template-box {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.template-box h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.template-content {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.8;
    max-height: 400px;
    overflow-y: auto;
}

.template-content hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 1rem 0;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: #ffffff;
    font-weight: bold;
}

.checkbox-text {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.5;
}

.checkbox-text a {
    color: #3b82f6;
    text-decoration: underline;
}

/* File Upload */
.upload-section {
    display: grid;
    gap: 2rem;
}

.upload-group {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 1.5rem;
    background: #f9fafb;
}

.upload-label {
    display: block;
    margin-bottom: 1rem;
}

.upload-title {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.upload-description {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
}

.upload-description a {
    color: #3b82f6;
    text-decoration: underline;
}

.file-upload-area {
    position: relative;
}

.file-input {
    display: none;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #ffffff;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.file-upload-label:hover {
    border-color: #667eea;
    background: #f9fafb;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.upload-text {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
}

.upload-text strong {
    color: #667eea;
}

.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-icon {
    font-size: 1.5rem;
}

.file-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
}

.file-size {
    font-size: 0.75rem;
    color: #6b7280;
}

.file-remove {
    background: #fee2e2;
    border: none;
    color: #dc2626;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.file-remove:hover {
    background: #dc2626;
    color: #ffffff;
}

/* Employer Cards */
.employer-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.employer-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.employer-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.employer-remove {
    background: #fee2e2;
    border: none;
    color: #dc2626;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}

.employer-remove:hover {
    background: #dc2626;
    color: #ffffff;
}

/* Review Section */
.review-section {
    background: #f9fafb;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.review-group {
    margin-bottom: 2rem;
}

.review-group-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.review-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.review-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 0.875rem;
}

.review-value {
    color: #1f2937;
    font-size: 0.875rem;
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #ffffff;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.alert-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.alert-warning {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

/* Success Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 3rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.success-content {
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.success-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f2937;
}

.success-content p {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.next-steps {
    background: #f9fafb;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: left;
}

.next-steps h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f2937;
}

.next-steps ol {
    padding-left: 1.5rem;
}

.next-steps li {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.confirmation-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.help-text-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.help-text-box strong {
    display: block;
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .welcome-content h1 {
        font-size: 2rem;
    }
    
    .help-box {
        flex-direction: column;
        text-align: center;
    }
    
    .intake-form {
        padding: 2rem 1.5rem;
    }
    
    .step-title {
        font-size: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .review-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
    .form-navigation {
        flex-direction: column;
    }
    
    .modal-content {
        padding: 2rem 1.5rem;
    }
}

/* Loading State */
.loading {
    pointer-events: none;
    opacity: 0.6;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Submission Error Alert */
.submission-error-alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: #fef2f2;
    border: 2px solid #ef4444;
    border-radius: 12px;
    margin-bottom: 2rem;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.submission-error-alert .error-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
    line-height: 1;
}

.submission-error-alert .error-content {
    flex: 1;
}

.submission-error-alert .error-content strong {
    display: block;
    color: #dc2626;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.submission-error-alert .error-content p {
    color: #991b1b;
    margin: 0.25rem 0;
    line-height: 1.5;
}

.submission-error-alert .error-help {
    font-size: 0.875rem;
    color: #7f1d1d;
    margin-top: 0.75rem !important;
}

.submission-error-alert .error-help a {
    color: #dc2626;
    text-decoration: underline;
    font-weight: 600;
}

.submission-error-alert .error-help a:hover {
    color: #991b1b;
}

.submission-error-alert .error-details {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(220, 38, 38, 0.05);
    border-radius: 6px;
}

.submission-error-alert .error-details strong {
    color: #991b1b;
    font-size: 0.875rem;
    display: block;
    margin-bottom: 0.5rem;
}

.submission-error-alert .error-details ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style: disc;
}

.submission-error-alert .error-details li {
    color: #7f1d1d;
    font-size: 0.875rem;
    margin: 0.25rem 0;
}

.submission-error-alert .error-close {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.submission-error-alert .error-close:hover {
    background: rgba(220, 38, 38, 0.1);
}

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



