/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap');

/* CSS Custom Properties (Light theme) */
:root {
    --bg-primary: #F1F5F9;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-solid: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.8);
    --bg-input: rgba(255, 255, 255, 0.8);
    --bg-section: #f8fafc;
    --text-primary: #1E293B;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --accent: #0EA5E9;
    --accent-dark: #0284C7;
    --accent-glow: rgba(14, 165, 233, 0.15);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.95);
    --bg-card-solid: #1e293b;
    --bg-header: rgba(15, 23, 42, 0.9);
    --bg-input: rgba(30, 41, 59, 0.8);
    --bg-section: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --border-light: #1e293b;
    --accent: #38bdf8;
    --accent-dark: #0ea5e9;
    --accent-glow: rgba(56, 189, 248, 0.2);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] img { filter: brightness(0.9); }

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: var(--bg-header);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 1rem 2rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0.5rem;
    z-index: 100;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.2);
}

.logo-section {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 56px;
    width: auto;
}

.auth-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Authentication Buttons */
.auth-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-auth {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-login {
    background: transparent;
    color: #0EA5E9;
    border: 1px solid #0EA5E9;
}

.btn-login:hover {
    background: #0EA5E9;
    color: white;
}

.btn-register {
    background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
    color: white;
}

.btn-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-demo {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-demo:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* User Menu */
.user-menu-enhanced {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: #0EA5E9;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.user-name {
    font-weight: 600;
    color: #1E293B;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #334155;
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    padding: 1rem 2rem;
    border-radius: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #93c5fd;
}

.login-status {
    background: linear-gradient(135deg, #E0F2FE 0%, #BAE6FD 100%);
    padding: 0.75rem 1.5rem;
    border-radius: 1.5rem;
    margin-bottom: 2rem;
    color: #0369A1;
    font-weight: 500;
    border: 1px solid #7DD3FC;
}

/* Main Content */
.main-content {
    flex: 1;
    text-align: center;
    padding: 2rem 0;
}

.main-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1E293B;
    line-height: 1.1;
}

.subtitle {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 3rem;
    font-weight: 400;
}

/* Form Styles */
.lookup-form {
    max-width: 600px;
    margin: 0 auto 3rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

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

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

.form-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 1.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-input:focus {
    outline: none;
    border-color: #0EA5E9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
    background: white;
}

/* ZIP Code Section */
.zip-details {
    margin: 1.5rem 0;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.5);
}

.zip-summary {
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    cursor: pointer;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
    list-style: none;
}

.zip-summary:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.zip-summary::-webkit-details-marker {
    display: none;
}

.zip-content {
    padding: 1rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
}

.zip-input, .visit-input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 1.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.zip-input:focus, .visit-input:focus {
    outline: none;
    border-color: #0EA5E9;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.15);
}

/* Feature Links */
.feature-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.feature-link {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #0EA5E9;
    text-decoration: none;
    border-radius: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.feature-link:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    transform: translateY(-1px);
}

.feature-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
    color: white;
    border: none;
    border-radius: 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(14, 165, 233, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Autocomplete */
.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.autocomplete-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.autocomplete-item:hover {
    background: #f8fafc;
}

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

/* Results Section */
.results-section {
    max-width: 800px;
    margin: 2rem auto;
}

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

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

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

/* Consolidated Results Card */
.consolidated-results-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 2rem;
    transition: background-color 0.3s ease;
}

.results-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.results-icon {
    color: #0EA5E9;
    flex-shrink: 0;
}

.results-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1E293B;
    margin: 0;
}

.results-grid {
    padding: 2rem;
    display: grid;
    gap: 1.5rem;
}

/* Section Cards */
.results-section-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.2s ease;
}

.results-section-card:hover {
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.section-header {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.pdgm-section .section-header {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.payment-section .section-header {
    background: linear-gradient(135deg, #E0F2FE 0%, #BAE6FD 100%);
}

.lupa-section .section-header {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.lupa-header {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.section-icon {
    flex-shrink: 0;
}

.pdgm-section .section-icon {
    color: #0EA5E9;
}

.payment-section .section-icon {
    color: #0284C7;
}

.lupa-section .section-icon {
    color: #dc2626;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: #1E293B;
}

.section-content {
    padding: 1.5rem;
}

/* Info Rows */
.info-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8fafc;
    align-items: start;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.info-value {
    color: #1E293B;
    font-size: 0.875rem;
    word-break: break-word;
}

/* Special Row Styling */
.focus-row {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 1rem;
    border-radius: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid #bae6fd;
}

.focus-value {
    font-weight: 500;
    color: #0c4a6e;
}

.pdgm-group-row {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    padding: 0.75rem;
    border-radius: 1.5rem;
    border: 1px solid #BAE6FD;
}

.pdgm-group-value {
    font-weight: 600;
    color: #0369A1;
    background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.billable-row {
    background: rgba(248, 250, 252, 0.5);
    padding: 0.75rem;
    border-radius: 1.5rem;
}

.billable-yes {
    color: #0369A1;
    font-weight: 600;
    background: #E0F2FE;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid #BAE6FD;
}

.billable-no {
    color: #dc2626;
    font-weight: 600;
    background: #fee2e2;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid #fecaca;
}

.icd-code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Payment Section Styling */
.payment-amount-row {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    padding: 1rem;
    border-radius: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid #BAE6FD;
}

.payment-amount-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0369A1;
}

.payment-detail-value {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: #f8fafc;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.payment-disclaimer {
    background: #fef3c7;
    padding: 0.75rem;
    border-radius: 1.5rem;
    font-size: 0.875rem;
    color: #92400e;
    border: 1px solid #fde68a;
    margin-top: 1rem;
    font-style: italic;
}

/* LUPA Alert Styling */
.lupa-alert {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    padding: 1rem;
    border-radius: 1.5rem;
    color: #dc2626;
    font-weight: 600;
    border: 1px solid #f87171;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lupa-alert::before {
    content: "⚠️";
    font-size: 1.25rem;
}

/* Legacy Result Card (fallback) */
.result-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
}

.result-card h3 {
    color: #1E293B;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-content {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
}

.result-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Roboto', sans-serif;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #374151;
    margin: 0;
}

/* Export Section */
.export-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.export-section h3 {
    color: #1E293B;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

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

.btn-export {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #374151;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-export:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.1);
}

.roadmap-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1rem;
}

.roadmap-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.roadmap-body {
    white-space: pre-wrap;
    max-height: 50vh;
    overflow-y: auto;
}

/* Registration Prompt */
.registration-prompt {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.prompt-content h3 {
    color: #1E293B;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.prompt-content p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.prompt-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* Value Proposition */
.value-prop {
    text-align: center;
    margin: 4rem 0;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.value-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.cta-section {
    margin: 2rem 0;
}

.cta-section h3 {
    font-size: 1.25rem;
    color: #374151;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.btn-cta {
    display: inline-block;
    background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 1.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.2s ease;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(14, 165, 233, 0.3);
}

.trial-link {
    color: #64748b;
    margin-top: 1rem;
}

.trial-link a {
    color: #0EA5E9;
    text-decoration: none;
    font-weight: 500;
}

.trial-link a:hover {
    text-decoration: underline;
}

/* Social Proof */
.social-proof {
    text-align: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 1.5rem;
    border: 1px solid #bae6fd;
}

.social-proof p {
    color: #0c4a6e;
    font-size: 1.125rem;
    margin: 0;
}

/* Visit Counter */
.visit-counter {
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
    margin: 1rem 0;
}

/* Disclaimer */
.disclaimer {
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
}

.arrow-link {
    padding: 1rem;
    cursor: pointer;
    color: #64748b;
    font-weight: 500;
    list-style: none;
}

.arrow-link::-webkit-details-marker {
    display: none;
}

.disclaimer p {
    padding: 0 1rem 1rem;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: #64748b;
    font-size: 0.875rem;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 1rem;
}

.flash-message {
    background: #dbeafe;
    color: #1e40af;
    padding: 1rem;
    border-radius: 1.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid #93c5fd;
}

/* Error Styles */
.error {
    background: #fee2e2;
    color: #dc2626;
    padding: 1rem;
    border-radius: 1.5rem;
    border: 1px solid #fca5a5;
    text-align: center;
}

/* Follow-up */
.followup {
    background: #f0f9ff;
    color: #0c4a6e;
    padding: 1rem;
    border-radius: 1.5rem;
    margin-top: 1rem;
    border: 1px solid #bae6fd;
}

/* Disabled Feature */
.disabled-feature {
    background: #f8fafc;
    color: #64748b;
    padding: 1rem;
    border-radius: 1.5rem;
    text-align: center;
    border: 1px solid #e2e8f0;
    margin-top: 2rem;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 1.5rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #64748b;
}

.close:hover {
    color: #1E293B;
}

/* Table Responsive Styles */
.table-wrapper {
    overflow-x: auto;
}

.responsive-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.responsive-table th {
    text-align: left;
    border-bottom: 1px solid #ccc;
}

.responsive-table td {
    padding: 4px 8px;
}
/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }

    /* Ensure the disclaimer/footer is never hidden behind a sticky query block on mobile */
    .main-content {
        padding-bottom: 6rem;
    }

    .disclaimer {
        margin-bottom: 2rem;
    }

    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .auth-section {
        width: 100%;
        justify-content: center;
    }
    
    .lookup-form {
        padding: 1.5rem;
    }
    
    .zip-content {
        grid-template-columns: 1fr;
    }
    
    .feature-links {
        flex-direction: column;
        align-items: center;
    }
    
    .export-buttons {
        grid-template-columns: 1fr;
    }
    
    .prompt-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .value-prop {
        padding: 2rem 1rem;
    }
    
    .user-menu-enhanced {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .info-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .info-label {
        font-weight: 700;
        color: #1E293B;
    }
    
    .results-grid {
        padding: 1rem;
    }
    
    .section-content {
        padding: 1rem;
    }
    .responsive-table th,
    .responsive-table td {
        padding: 4px 6px;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .lookup-form {
        padding: 1rem;
    }
    
    .results-header {
        padding: 1rem;
    }
    
    .results-title {
        font-size: 1.25rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .header, .footer, .export-section, .registration-prompt, .value-prop, .social-proof {
        display: none;
    }
    
    .consolidated-results-card, .result-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}



/* Three Cards Section */
.three-cards-section {
    margin: 3rem 0;
    padding: 0 1rem;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #0EA5E9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.feature-card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.instant-results .card-icon {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #0EA5E9;
}

.trusted-agencies .card-icon {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #7c3aed;
}

.always-accurate .card-icon {
    background: linear-gradient(135deg, #E0F2FE 0%, #BAE6FD 100%);
    color: #0284C7;
}

.feature-card:hover .card-icon {
    transform: scale(1.1);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.card-description {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Responsive adjustments for three cards */
@media (max-width: 768px) {
    .cards-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .card-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 1rem;
    }
    
    .card-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    .card-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .three-cards-section {
        margin: 2rem 0;
        padding: 0 0.5rem;
    }
    
    .feature-card {
        padding: 1.25rem;
    }
    
    .card-icon {
        width: 56px;
        height: 56px;
    }
    
    .card-icon svg {
        width: 32px;
        height: 32px;
    }
}

/* Animation for cards on load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card {
    animation: fadeInUp 0.6s ease-out;
}

.feature-card:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* ======== RED FLAG ALERTS ======== */
.red-flags { margin: 0.75rem 2rem 0; display: flex; flex-direction: column; gap: 0.5rem; }
.flag-badge { padding: 0.6rem 1rem; border-radius: 0.75rem; font-size: 0.875rem; font-weight: 500; display: flex; align-items: center; gap: 0.5rem; }
.flag-error { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.flag-warning { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }
.flag-info { background: #f0f9ff; border: 1px solid #bae6fd; color: #0c4a6e; }
[data-theme="dark"] .flag-error { background: #450a0a; border-color: #7f1d1d; color: #fca5a5; }
[data-theme="dark"] .flag-warning { background: #451a03; border-color: #78350f; color: #fcd34d; }
[data-theme="dark"] .flag-info { background: #0c4a6e; border-color: #0369a1; color: #bae6fd; }

/* ======== DARK MODE TOGGLE ======== */
.theme-toggle { background: none; border: 1px solid var(--border-color); border-radius: 50%; width: 36px; height: 36px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all 0.2s ease; }
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }

/* ======== VOICE BUTTON ======== */
.voice-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--text-muted); z-index: 2; padding: 0.25rem; }
.voice-btn:hover { color: var(--accent); }
.voice-btn.listening { color: #ef4444; }
@keyframes pulse-mic { 0%,100%{transform:translateY(-50%) scale(1);} 50%{transform:translateY(-50%) scale(1.3);} }
.voice-btn.listening { animation: pulse-mic 1s infinite; }
.voice-btn svg { width: 20px; height: 20px; }

/* ======== RECENT SEARCHES ======== */
.recent-searches-section { max-width: 600px; margin: -2rem auto 2rem; text-align: left; }
.recent-searches-section h4 { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.05em; }
.recent-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.recent-tag { background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-secondary); padding: 0.25rem 0.75rem; border-radius: 2rem; font-size: 0.8rem; cursor: pointer; transition: all 0.15s ease; }
.recent-tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

/* ======== COMORBIDITY BADGE ======== */
.comorbidity-badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.6rem; border-radius: 2rem; font-size: 0.75rem; font-weight: 600; margin-left: 0.5rem; transition: all 0.3s ease; }
.comorbidity-badge.adj-none { background: #f1f5f9; color: #64748b; }
.comorbidity-badge.adj-low { background: #fef3c7; color: #92400e; }
.comorbidity-badge.adj-high { background: #fee2e2; color: #991b1b; }
@keyframes badge-pulse { 0%,100%{transform:scale(1);} 50%{transform:scale(1.1);} }
.comorbidity-badge.just-changed { animation: badge-pulse 0.4s ease; }

/* ======== IMPACT METER ======== */
.impact-meter { margin-top: 1rem; padding: 0.75rem 1rem; background: var(--bg-section); border-radius: 0.75rem; border: 1px solid var(--border-color); }
.impact-bar { height: 8px; background: var(--border-color); border-radius: 4px; overflow: hidden; margin: 0.5rem 0; }
.impact-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-dark)); border-radius: 4px; transition: width 0.5s ease; }
.impact-delta { font-size: 0.85rem; font-weight: 600; }
.impact-delta.positive { color: #10b981; }
.impact-delta.negative { color: #ef4444; }

/* ======== HIPPS PROGRESS BAR ======== */
.hipps-progress { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.75rem; }
.hipps-progress-track { flex: 1; height: 6px; background: var(--border-color); border-radius: 3px; overflow: hidden; }
.hipps-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-dark)); border-radius: 3px; transition: width 0.3s ease; width: 0%; }
.hipps-progress-text { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }

/* ======== COMPARISON MODE ======== */
.compare-btn { background: none; border: 1px solid var(--accent); color: var(--accent); padding: 0.5rem 1rem; border-radius: 2rem; cursor: pointer; font-size: 0.85rem; font-weight: 500; transition: all 0.2s ease; margin-left: 0.5rem; }
.compare-btn:hover { background: var(--accent); color: white; }
.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 1rem 0; }
.comparison-col { background: var(--bg-card); border-radius: 1rem; padding: 1.5rem; border: 1px solid var(--border-color); }
.comparison-col h4 { color: var(--accent); margin-bottom: 1rem; }
.comparison-diff { background: #fef3c7; padding: 0.15rem 0.4rem; border-radius: 0.25rem; font-weight: 600; }
[data-theme="dark"] .comparison-diff { background: #78350f; }
@media (max-width: 640px) { .comparison-grid { grid-template-columns: 1fr; } }

/* ======== SUPPLY CROSSWALK ======== */
.supply-reminder { margin-top: 1rem; padding: 1.25rem; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 1rem; }
.supply-reminder h4 { color: #92400e; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.supply-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.supply-tag { background: white; border: 1px solid #fde68a; padding: 0.25rem 0.6rem; border-radius: 0.5rem; font-size: 0.8rem; color: #78350f; }
.doc-checklist { list-style: none; padding: 0; }
.doc-checklist li { padding: 0.25rem 0; font-size: 0.85rem; color: #78350f; }
.doc-checklist li::before { content: '\\2713 '; color: #10b981; font-weight: bold; }
[data-theme="dark"] .supply-reminder { background: #451a03; border-color: #78350f; }
[data-theme="dark"] .supply-tag { background: #78350f; border-color: #92400e; color: #fcd34d; }
[data-theme="dark"] .doc-checklist li { color: #fcd34d; }

/* ======== OASIS TOOLTIP ======== */
.gg-tooltip { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--text-primary); color: var(--bg-primary); padding: 0.4rem 0.6rem; border-radius: 0.35rem; font-size: 0.75rem; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.2s ease; z-index: 50; }
.hipps-field { position: relative; }
.hipps-field:hover .gg-tooltip { opacity: 1; }

