/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #2d3748;
}

.section-description {
    font-size: 1.1rem;
    color: #718096;
    margin-bottom: 2rem;
}

.bg-light {
    background-color: white;
}

/* Search Box */
.search-box {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.search-box input,
.search-box select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 1rem;
}

.search-box input:focus,
.search-box select:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 44px;
}

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

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

.btn-secondary {
    background: #4a5568;
    color: white;
}

.btn-secondary:hover {
    background: #2d3748;
    transform: translateY(-2px);
}

/* Cards */
.card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.card h3 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.card p {
    color: #718096;
    margin-bottom: 1rem;
}

/* Paperwork Options Grid */
.paperwork-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Results Container */
.results-container {
    margin-top: 2rem;
    min-height: 100px;
}

.result-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
}

.result-item h4 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.result-item p {
    color: #718096;
    margin-bottom: 0.5rem;
}

.result-item .tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.tag {
    background: #edf2f7;
    color: #4a5568;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

/* Disability Form */
.disability-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.disability-form h3 {
    margin-bottom: 1rem;
    color: #2d3748;
}

.disability-form input,
.disability-form select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 1rem;
}

/* Info Box */
.info-box {
    background: #f7fafc;
    border-left: 4px solid #667eea;
    padding: 1.5rem;
    border-radius: 5px;
    margin-top: 2rem;
}

.info-box h4 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.info-box ul {
    list-style-position: inside;
    color: #4a5568;
}

.info-box li {
    margin-bottom: 0.5rem;
}

/* Doctor Search */
.doctor-search {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.doctor-search input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 1rem;
}

.checkbox-group {
    margin: 1rem 0;
}

.checkbox-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* AI Tools Grid */
.ai-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.ai-card {
    border-top: 4px solid #667eea;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
}

/* Wizard Container */
.wizard-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    display: none;
}

.wizard-step {
    margin-bottom: 2rem;
}

.wizard-step h4 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.wizard-step input,
.wizard-step textarea,
.wizard-step select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.wizard-step textarea {
    min-height: 100px;
    resize: vertical;
}

.wizard-navigation {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 2rem;
}

/* Quick Links */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.quick-link-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border-top: 3px solid #667eea;
}

.quick-link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.quick-link-card h4 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.quick-link-card p {
    color: #718096;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: #2d3748;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

footer p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 2rem;
    color: #718096;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        text-align: center;
    }

    .nav-menu {
        margin-top: 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .nav-menu a,
    .nav-menu button {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.75rem 1rem;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .section h2 {
        font-size: 1.5rem;
    }
    
    .section {
        padding: 2rem 0;
    }

    .paperwork-options,
    .ai-tools-grid,
    .quick-links {
        grid-template-columns: 1fr;
    }
    
    /* Add safe area insets for notched phones */
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    header {
        padding-top: env(safe-area-inset-top);
    }
}

/* Success/Error Messages */
.message {
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

.message-success {
    background: #c6f6d5;
    color: #22543d;
    border-left: 4px solid #38a169;
}

.message-error {
    background: #fed7d7;
    color: #742a2a;
    border-left: 4px solid #e53e3e;
}

.message-info {
    background: #bee3f8;
    color: #2c5282;
    border-left: 4px solid #3182ce;
}

/* AI Assistant Widget Styles */
.ai-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
}

.ai-widget-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    animation: pulse 2s infinite;
}

.ai-widget-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(102, 126, 234, 0.8);
    }
}

.ai-icon {
    font-size: 1.5rem;
    animation: wave 1s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.ai-assistant-panel {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 420px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

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

.ai-panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    position: relative;
}

.ai-panel-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.ai-panel-header p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.95;
}

.ai-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.ai-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ai-chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f7fafc;
}

.ai-welcome-message {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    margin-bottom: 1rem;
}

.ai-welcome-message ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.ai-welcome-message li {
    margin-bottom: 0.5rem;
}

.ai-messages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-message {
    padding: 1rem;
    border-radius: 10px;
    max-width: 85%;
    animation: fadeIn 0.3s;
}

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

.ai-message.user {
    background: #667eea;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 3px;
}

.ai-message.assistant {
    background: white;
    color: #2d3748;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 3px;
}

.ai-message.system-info {
    background: #e6f3ff;
    color: #0066cc;
    font-size: 0.85rem;
    padding: 0.5rem;
    border-radius: 5px;
    margin: 0.5rem auto;
    max-width: 100%;
    text-align: center;
    border: 1px solid #99ccff;
}

.ai-message.typing-indicator {
    background: white;
    color: #2d3748;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 3px;
    padding: 1rem;
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    display: inline-block;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.ai-suggestions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.ai-suggestion-btn {
    background: #f7fafc;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s;
    font-weight: 500;
    min-height: 44px;
}

.ai-suggestion-btn:hover {
    background: #667eea;
    color: white;
    transform: translateX(5px);
}

.ai-quick-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.quick-action-btn {
    background: #edf2f7;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    min-height: 44px;
    transition: all 0.3s;
    color: #4a5568;
}

.quick-action-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.ai-input-area {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border-top: 2px solid #e2e8f0;
}

.ai-input-area input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
}

.ai-input-area input:focus {
    outline: none;
    border-color: #667eea;
}

.ai-input-area button {
    padding: 0.75rem 1.5rem;
}

/* AI Assessment Styles */
.ai-assessment-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.assessment-benefits h3,
.assessment-action h3 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.assessment-benefits ul {
    list-style: none;
    padding: 0;
}

.assessment-benefits li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.assessment-action {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-hero {
    background: white;
    color: #667eea;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

/* Featured Card Styles */
.featured-card {
    position: relative;
    border: 3px solid #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.featured-badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(253, 160, 133, 0.5);
}

/* Document Upload Zone */
.upload-zone {
    border: 3px dashed #cbd5e0;
    border-radius: 10px;
    padding: 3rem;
    text-align: center;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.3s;
    margin: 1rem 0;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.upload-zone.processing {
    border-color: #48bb78;
    background: rgba(72, 187, 120, 0.05);
}

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

.uploaded-files {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-item .file-name {
    font-weight: 500;
    color: #2d3748;
}

.file-item .file-status {
    color: #48bb78;
    font-size: 0.9rem;
}

.extracted-data {
    background: #f0fff4;
    border: 2px solid #48bb78;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.extracted-data h4 {
    color: #22543d;
    margin-bottom: 1rem;
}

.data-field {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #c6f6d5;
}

.data-field:last-child {
    border-bottom: none;
}

.data-label {
    font-weight: 600;
    color: #2d3748;
}

.data-value {
    color: #4a5568;
}

.form-preview {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 2rem;
    margin-top: 2rem;
}

.form-preview h3 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.form-field {
    margin-bottom: 1.5rem;
}

.form-field label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 1rem;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: #667eea;
}

.auto-filled {
    background: #f0fff4 !important;
    border-color: #48bb78 !important;
}

.confidence-indicator {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.confidence-high {
    background: #c6f6d5;
    color: #22543d;
}

.confidence-medium {
    background: #feebc8;
    color: #7c2d12;
}

.confidence-low {
    background: #fed7d7;
    color: #742a2a;
}

.process-navigation {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    border: 2px solid #667eea;
    margin-top: 2rem;
}

.process-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.process-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.process-step::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    z-index: -1;
}

.process-step:last-child::after {
    display: none;
}

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #718096;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.process-step.active .step-circle {
    background: #667eea;
    color: white;
}

.process-step.completed .step-circle {
    background: #48bb78;
    color: white;
}

.step-label {
    font-size: 0.85rem;
    color: #718096;
}

.process-step.active .step-label {
    color: #2d3748;
    font-weight: 600;
}

@media (max-width: 768px) {
    .ai-assistant-panel {
        right: 10px;
        left: 10px;
        bottom: 10px;
        width: auto;
        max-width: none;
        max-height: 70vh;
        height: auto;
    }
    
    .ai-widget {
        bottom: 10px;
        right: 10px;
    }
    
    .ai-assessment-box {
        grid-template-columns: 1fr;
    }
    
    .process-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    .process-step::after {
        display: none;
    }
}

/* Comprehensive Intake System Styles */
.intake-container {
    padding: 2rem;
}

.progress-bar-container {
    background: #e2e8f0;
    border-radius: 10px;
    height: 30px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    color: #2d3748;
}

.intake-question {
    margin-bottom: 2rem;
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.intake-question label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.required {
    color: #e53e3e;
}

.helper-text {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.checkbox-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: normal !important;
}

.checkbox-label input {
    margin-right: 0.5rem;
}

.intake-navigation {
    margin-top: 2rem;
    text-align: center;
}

/* Intake Complete Styles */
.intake-complete {
    padding: 2rem;
}

.success-header {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    text-align: center;
}

.success-header h2 {
    margin-bottom: 0.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid;
}

.alert-critical {
    background: #fed7d7;
    border-color: #e53e3e;
    color: #742a2a;
}

.alert-high {
    background: #feebc8;
    border-color: #dd6b20;
    color: #7c2d12;
}

.alert-info {
    background: #bee3f8;
    border-color: #3182ce;
    color: #2c5282;
}

.alert-success {
    background: #c6f6d5;
    border-color: #38a169;
    color: #22543d;
}

.recommendations-section {
    margin-bottom: 2rem;
}

.recommendations-section h3 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.recommendation-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-bottom: 1rem;
}

.recommendation-card.urgent {
    border-left-color: #e53e3e;
    background: #fff5f5;
}

.recommendation-card h4 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.special-instructions {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.special-instructions ul {
    margin-left: 1.5rem;
}

.special-instructions li {
    margin-bottom: 0.75rem;
}

.next-steps-section h3 {
    color: #2d3748;
    margin-bottom: 1.5rem;
}

.step-card {
    display: flex;
    gap: 1rem;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
}

.step-card.urgent {
    border-left-color: #e53e3e;
    background: #fff5f5;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.step-card.urgent .step-number {
    background: #e53e3e;
}

.step-content h4 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.how-to {
    color: #4a5568;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    justify-content: center;
}

/* Doctor Finder Tool Styles */
.doctor-finder-tool {
    padding: 2rem;
}

.section-box {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #667eea;
}

.section-box h3 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.specialist-list {
    list-style: none;
    padding: 0;
}

.specialist-list li {
    padding: 0.75rem;
    background: #f7fafc;
    margin-bottom: 0.5rem;
    border-radius: 5px;
}

.flags-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.red-flags,
.green-flags {
    padding: 1.5rem;
    border-radius: 8px;
}

.red-flags {
    background: #fff5f5;
    border-left: 4px solid #e53e3e;
}

.green-flags {
    background: #f0fff4;
    border-left: 4px solid #38a169;
}

.red-flags h4 {
    color: #e53e3e;
}

.green-flags h4 {
    color: #38a169;
}

/* Limitation Documentor Styles */
.limitation-documentor {
    padding: 2rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 1rem;
}

.limitation-category {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #667eea;
}

.limitation-category h3 {
    color: #2d3748;
    margin-bottom: 1.5rem;
}

.limitation-question {
    margin-bottom: 1.5rem;
}

.limitation-question label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.limitation-question select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 1rem;
}

.limitation-results {
    padding: 2rem;
}

.documentation-box {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    border: 2px solid #667eea;
    margin: 2rem 0;
}

.narrative-summary pre {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    color: #2d3748;
}

.rfc-recommendations {
    background: #f0fff4;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #38a169;
    margin-bottom: 2rem;
}

.rfc-recommendations h3 {
    color: #22543d;
    margin-bottom: 1rem;
}

.rfc-recommendations ul {
    margin-left: 1.5rem;
}

.rfc-recommendations li {
    margin-bottom: 0.5rem;
    color: #2d3748;
}

@media (max-width: 768px) {
    .flags-container {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons button {
        width: 100%;
    }
}

/* Universal Help Section Styles */
.universal-scenarios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.scenario-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-top: 4px solid #667eea;
    text-align: center;
}

.scenario-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

.scenario-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2d3748;
}

.scenario-card p {
    color: #4a5568;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.universal-promise {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    padding: 2.5rem;
    border-radius: 12px;
    margin-top: 3rem;
    border-left: 6px solid #38a169;
}

.universal-promise h3 {
    color: #22543d;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.universal-promise ul {
    list-style: none;
    padding: 0;
    max-width: 800px;
    margin: 0 auto;
}

.universal-promise li {
    padding: 1rem;
    margin-bottom: 1rem;
    background: white;
    border-radius: 8px;
    font-size: 1.1rem;
    color: #2d3748;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Location Services Section */
.location-input-box {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 3rem;
}

.location-input-box h3 {
    color: #2d3748;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.location-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.location-option {
    padding: 1.5rem;
    background: #f7fafc;
    border-radius: 8px;
    text-align: center;
}

.location-option input {
    width: 100%;
    padding: 0.75rem;
    margin: 1rem 0;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.location-option input:focus {
    outline: none;
    border-color: #667eea;
}

.what-we-find {
    margin-top: 3rem;
}

.what-we-find h4 {
    color: #2d3748;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.facility-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.facility-type-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease;
}

.facility-type-card:hover {
    transform: translateY(-5px);
}

.facility-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.facility-type-card h4 {
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.facility-type-card p {
    color: #718096;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.facility-type-card p strong {
    color: #2d3748;
}

/* Pathway Container Styles */
.pathway-container {
    padding: 2rem;
    max-height: 80vh;
    overflow-y: auto;
}

.pathway-section {
    background: #f7fafc;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 4px solid #667eea;
}

.pathway-section h3 {
    color: #2d3748;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.pathway-step {
    display: flex;
    gap: 1.5rem;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.program-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #38a169;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.program-card h4 {
    color: #2d3748;
    margin-bottom: 0.75rem;
}

.program-card p {
    color: #4a5568;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.badge-success {
    background: #c6f6d5;
    color: #22543d;
}

/* Dental Options */
.dental-option {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 6px solid #38a169;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dental-option.priority-highest {
    border-left-color: #e53e3e;
    background: linear-gradient(135deg, #fff5f5 0%, white 100%);
}

.dental-option.priority-high {
    border-left-color: #dd6b20;
}

.priority-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #38a169;
    color: white;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.dental-option.priority-highest .priority-badge {
    background: #e53e3e;
}

.dental-option.priority-high .priority-badge {
    background: #dd6b20;
}

.dental-option h4 {
    color: #2d3748;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.how-to-box {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.how-to-box h5 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.how-to-box ol {
    margin-left: 1.5rem;
}

.how-to-box li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: #4a5568;
}

.program-card.comprehensive {
    border-left-color: #667eea;
    border-left-width: 6px;
}

.cost-free {
    font-size: 1.2rem;
    color: #38a169;
    font-weight: 700;
    margin-top: 1rem;
}

/* Facility Recommendations */
.nearest-facilities-container {
    margin-top: 2rem;
}

.facility-recommendation {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 4px solid #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.facility-recommendation h4 {
    color: #2d3748;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.find-instructions {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.find-instructions h5 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.find-instructions pre {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.find-instructions ul {
    margin-left: 1.5rem;
}

.find-instructions li {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.call-today-section {
    background: linear-gradient(135deg, #fff5f5 0%, white 100%);
    padding: 2rem;
    border-radius: 12px;
    border-left: 6px solid #e53e3e;
    margin-top: 2rem;
}

.call-today-section h4 {
    color: #742a2a;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.call-action {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.call-action strong {
    color: #2d3748;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.call-action em {
    color: #667eea;
    font-weight: 600;
    display: block;
    margin-top: 0.5rem;
}

/* Improved Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 2.25rem;
    color: #2d3748;
}

h3 {
    font-size: 1.75rem;
    color: #2d3748;
}

.section-description {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #4a5568;
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* Enhanced Buttons */
.btn-primary,
.btn-secondary,
.btn-hero {
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary:active,
.btn-secondary:active,
.btn-hero:active {
    transform: translateY(0);
}

/* Loading States */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Improved Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    h2 {
        font-size: 1.875rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .universal-scenarios {
        grid-template-columns: 1fr;
    }
    
    .location-options {
        grid-template-columns: 1fr;
    }
    
    .facility-types-grid {
        grid-template-columns: 1fr;
    }
    
    .pathway-step {
        flex-direction: column;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }
    
    .hero h2 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .ai-widget,
    .btn-primary,
    .btn-secondary,
    footer {
        display: none;
    }
    
    .section {
        page-break-inside: avoid;
    }
}

/* PWA Install Button Styles */
.install-button {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
    font-size: 0.95rem;
    min-height: 44px;
}

.install-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669, #047857);
}

.install-button:active {
    transform: translateY(0);
}

/* Offline indicator */
.offline-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #f59e0b;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    font-weight: 600;
}

/* PWA-specific styles */
@media (display-mode: standalone) {
    .navbar {
        padding-top: env(safe-area-inset-top);
    }
    
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }
}


/* Document Upload Styles */
.upload-zone {
    border: 3px dashed #cbd5e0;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    border-color: #8b5cf6;
    background: #faf5ff;
}

.upload-zone .upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.upload-zone h3 {
    color: #2d3748;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.upload-zone p {
    color: #718096;
    font-size: 1rem;
}

/* Document Item Styles */
.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: background 0.2s ease;
}

.document-item:hover {
    background: #edf2f7;
}

/* Chat Message Styles */
.chat-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    animation: slideIn 0.3s ease;
}

.chat-message.user {
    background: white;
    border-left: 3px solid #8b5cf6;
}

.chat-message.assistant {
    background: #e6f7ff;
    border-left: 3px solid #48bb78;
}

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

/* Responsive adjustments for upload zone */
@media (max-width: 768px) {
    .upload-zone {
        padding: 2rem 1rem;
    }
    
    .upload-zone .upload-icon {
        font-size: 3rem;
    }
    
    .document-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .document-item > div:last-child {
        margin-top: 1rem;
        width: 100%;
    }
    
    .document-item button {
        width: 48%;
        margin-right: 0 !important;
    }
}

/* Smart Search Styles */
.smart-search-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 0;
}

.search-hero h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.search-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.smart-search-box {
    display: flex;
    gap: 0.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.smart-search-box input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

.btn-search {
    padding: 1rem 2rem;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-search:hover {
    background: #38a169;
}

.search-suggestions {
    background: white;
    border-radius: 8px;
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.suggestion-item {
    padding: 1rem;
    cursor: pointer;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #f7fafc;
}

#search-results-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.search-results {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-message {
    font-size: 1.2rem;
    color: #2d3748;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #e6fffa;
    border-left: 4px solid #48bb78;
    border-radius: 4px;
}

.search-primary-action {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #e6f7ff 0%, #f0e6ff 100%);
    border-radius: 12px;
    margin-bottom: 2rem;
    align-items: center;
}

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

.action-content h3 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.action-content p {
    color: #718096;
    margin-bottom: 1rem;
}

.search-related-actions h4,
.search-documents h4,
.search-suggestions-results h4 {
    font-size: 1.2rem;
    color: #2d3748;
    margin-bottom: 1rem;
}

.related-action-item,
.suggestion-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.related-action-item:hover,
.suggestion-result-item:hover {
    background: #e6f7ff;
    transform: translateX(5px);
}

.search-documents {
    margin-top: 2rem;
}

.document-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.document-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.doc-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.document-item strong {
    display: block;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.document-item p {
    color: #718096;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .smart-search-box {
        flex-direction: column;
    }
    
    .btn-search {
        width: 100%;
    }
    
    .search-primary-action {
        flex-direction: column;
        text-align: center;
    }
    
    .action-icon {
        font-size: 2.5rem;
    }
}
