/**
 * SmartMatch Recommendations Quiz Styles
 * UMA Brand-Informed Colors: Navy #012639, Blue #2887C8, Red #EF3937
 */

/* CSS Variables */
:root {
    --smr-primary: #012639;
    --smr-primary-dark: #011C2B;
    --smr-primary-light: #1F6CA0;
    --smr-blue-light: #EDF6FC;
    --smr-accent: #EF3937;
    --smr-accent-light: #FF6B5C;
    --smr-success: #0D9488;
    --smr-medigap: #2887C8;
    --smr-neutral: #6B7280;
    --smr-warning: #D97706;
    --smr-danger: #DC3545;
    --smr-text-dark: #1F2937;
    --smr-text-body: #374151;
    --smr-text-light: #6B7280;
    --smr-border: #E5E7EB;
    --smr-bg: #F8FAFC;
    --smr-white: #FFFFFF;
    --smr-radius: 12px;
    --smr-shadow: 0 10px 30px rgba(1, 38, 57, 0.08);
}

/* Container */
.smr-quiz-container {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--smr-text-body);
    background: var(--smr-white);
    border-radius: var(--smr-radius);
    box-shadow: var(--smr-shadow);
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

/* Header */
.smr-quiz-header {
    background: linear-gradient(135deg, var(--smr-primary) 0%, var(--smr-primary-light) 100%);
    color: var(--smr-white);
    padding: 40px;
    text-align: center;
}

.smr-quiz-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: var(--smr-white) !important;
}

.smr-brand-logo {
    display: block;
    max-height: var(--smr-logo-height, 48px);
    width: auto;
    margin: 0 auto 12px;
}

.smr-quiz-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin: 0 0 30px 0;
    color: var(--smr-white) !important;
}

.smr-guided-agent {
    margin: 0 auto 24px;
    max-width: 520px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 12px;
    padding: 12px 14px;
    text-align: left;
}

.smr-guided-agent-flow {
    margin-bottom: 18px;
    background: rgba(1, 38, 57, 0.04);
    border: 1px solid rgba(1, 38, 57, 0.12);
}

.smr-guided-agent-flow .smr-agent-avatar {
    border-color: rgba(1, 38, 57, 0.22);
    background: rgba(1, 38, 57, 0.08);
}

.smr-guided-agent-flow .smr-agent-eyebrow {
    color: var(--smr-text-light);
}

.smr-guided-agent-flow .smr-agent-name {
    color: var(--smr-primary);
}

.smr-guided-agent-flow .smr-agent-title {
    color: var(--smr-text-body);
}

.smr-agent-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.smr-agent-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.smr-agent-avatar-initials {
    color: var(--smr-white);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.smr-agent-copy {
    min-width: 0;
}

.smr-agent-eyebrow {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.smr-agent-name {
    color: var(--smr-white);
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.2;
}

.smr-agent-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.88rem;
}

/* Progress Bar */
.smr-progress-container {
    padding: 0 20px;
}

.smr-progress-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    overflow: hidden;
}

.smr-progress-fill {
    height: 100%;
    background: var(--smr-accent);
    border-radius: 20px;
    transition: width 0.4s ease;
    width: 8.33%;
}

.smr-progress-text {
    text-align: center;
    color: var(--smr-white) !important;
    margin-top: 10px;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Quiz Form */
.smr-quiz-form {
    padding: 40px;
}

/* Question Slides */
.smr-question-slide {
    display: none;
}

.smr-question-slide.active {
    display: block;
}

.smr-section-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--smr-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--smr-accent);
}

.smr-question-card {
    background: var(--smr-bg);
    border-radius: var(--smr-radius);
    padding: 30px;
    border: 1px solid var(--smr-border);
}

.smr-question-card-agent {
    position: relative;
}

.smr-agent-asking {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.smr-agent-asking-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(1, 38, 57, 0.08);
    border: 1px solid rgba(1, 38, 57, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.smr-agent-asking-eyebrow {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--smr-primary);
}

.smr-agent-asking-subline {
    display: block;
    margin-top: 2px;
    font-size: 0.95rem;
    color: var(--smr-text-body);
}

.smr-agent-lead-prompt,
.smr-agent-asking-lead {
    margin-bottom: 12px;
}

.smr-prelead-section {
    margin-bottom: 28px;
}

.smr-prelead-section .smr-guided-agent {
    margin-bottom: 14px;
}

.smr-prelead-title {
    margin: 0 0 8px;
    color: var(--smr-primary);
}

.smr-prelead-subtitle {
    margin: 0 0 20px;
    color: var(--smr-text-light);
    font-size: 1rem;
}

.smr-question-label {
    display: block;
    margin-bottom: 20px;
}

.smr-question-number {
    display: inline-block;
    background: var(--smr-primary);
    color: var(--smr-white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-right: 10px;
}

.smr-question-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--smr-text-dark);
}

.smr-question-subtext {
    font-size: 0.95rem;
    color: var(--smr-text-light);
    margin: 0 0 20px 0;
    font-style: italic;
}

/* Input Styles */
.smr-input,
.smr-select,
.smr-textarea {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border: 2px solid var(--smr-border);
    border-radius: 8px;
    background: var(--smr-white);
    color: var(--smr-text-dark);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.smr-input:focus,
.smr-select:focus,
.smr-textarea:focus {
    outline: none;
    border-color: var(--smr-primary);
    box-shadow: 0 0 0 3px rgba(1, 38, 57, 0.16);
}

/* Radio & Checkbox Groups */
.smr-radio-group,
.smr-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.smr-radio-option,
.smr-checkbox-option {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    background: var(--smr-white);
    border: 2px solid var(--smr-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.smr-radio-option:hover,
.smr-checkbox-option:hover {
    border-color: var(--smr-primary);
    background: rgba(1, 38, 57, 0.03);
}

.smr-radio-option input,
.smr-checkbox-option input {
    margin-right: 12px;
    margin-top: 4px;
    accent-color: var(--smr-primary);
    width: 18px;
    height: 18px;
}

.smr-radio-option span,
.smr-checkbox-option span {
    font-weight: 400;
}

.smr-radio-option input:checked + span,
.smr-checkbox-option input:checked + span {
    color: var(--smr-primary);
    font-weight: 600;
}

.smr-radio-option:has(input:checked),
.smr-checkbox-option:has(input:checked) {
    border-color: var(--smr-primary);
    background: rgba(1, 38, 57, 0.05);
}

/* Slider */
.smr-slider-container {
    padding: 20px 0;
}

.smr-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: linear-gradient(to right, var(--smr-medigap), var(--smr-neutral), var(--smr-success));
    border-radius: 4px;
    outline: none;
}

.smr-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--smr-white);
    border: 3px solid var(--smr-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.smr-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--smr-text-light);
}

.smr-slider-value {
    font-weight: 700;
    color: var(--smr-primary);
    font-size: 1.1rem;
}

/* Ranking */
.smr-ranking-container {
    padding: 10px 0;
}

.smr-ranking-instructions {
    font-size: 0.9rem;
    color: var(--smr-text-light);
    margin-bottom: 15px;
}

.smr-ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.smr-ranking-item {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: var(--smr-white);
    border: 2px solid var(--smr-border);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: grab;
    transition: all 0.2s;
}

.smr-ranking-item:hover {
    border-color: var(--smr-primary);
}

.smr-ranking-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.smr-ranking-handle {
    color: var(--smr-text-light);
    margin-right: 15px;
    font-size: 1.2rem;
}

/* Birthday Selector */
.smr-birthday-selector {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 12px;
}

/* File Upload */
.smr-file-upload {
    position: relative;
}

.smr-file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.smr-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border: 2px dashed var(--smr-border);
    border-radius: var(--smr-radius);
    background: var(--smr-bg);
    cursor: pointer;
    transition: all 0.2s;
}

.smr-file-label:hover {
    border-color: var(--smr-primary);
    background: rgba(1, 38, 57, 0.03);
}

.smr-file-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.smr-file-name {
    display: block;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--smr-success);
    font-weight: 600;
}

/* Navigation Buttons */
.smr-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--smr-border);
}

.smr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}

.smr-btn-primary {
    background: linear-gradient(135deg, var(--smr-accent), var(--smr-accent-light));
    color: var(--smr-white);
    box-shadow: 0 4px 15px rgba(239, 57, 55, 0.3);
}

.smr-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 57, 55, 0.4);
}

.smr-btn-secondary {
    background: var(--smr-white);
    color: var(--smr-text-body);
    border: 2px solid var(--smr-border);
}

.smr-btn-secondary:hover {
    border-color: var(--smr-primary);
    color: var(--smr-primary);
}

/* Lead Form */
.smr-lead-form-section {
    padding: 40px;
}

.smr-lead-form-section h2 {
    font-size: 1.75rem;
    color: var(--smr-primary);
    margin: 0 0 15px 0;
    text-align: center;
}

.smr-lead-intro {
    text-align: center;
    color: var(--smr-text-light);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.smr-lead-form-card {
    background: var(--smr-bg);
    border-radius: var(--smr-radius);
    padding: 30px;
    border: 1px solid var(--smr-border);
}

.smr-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.smr-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--smr-text-dark);
}

.smr-required {
    color: var(--smr-danger);
}

/* Consent Section */
.smr-consent-section {
    margin: 25px 0;
    padding: 20px;
    background: var(--smr-white);
    border-radius: 8px;
    border: 1px solid var(--smr-border);
}

.smr-consent-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.smr-consent-label input {
    margin-right: 12px;
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: var(--smr-primary);
}

.smr-consent-text {
    font-size: 0.85rem;
    color: var(--smr-text-body);
    line-height: 1.6;
}

.smr-consent-text a {
    color: var(--smr-primary);
    text-decoration: underline;
}

.smr-lead-submit-container {
    text-align: center;
    margin-top: 25px;
}

.smr-lead-submit-btn {
    min-width: 250px;
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* Results Section */
.smr-results-section {
    padding: 40px;
}

.smr-results-section h2 {
    font-size: 1.75rem;
    color: var(--smr-primary);
    margin: 0 0 30px 0;
    text-align: center;
}

/* Results Header */
.smr-quiz-header.smr-results-header {
    padding: 50px 40px;
}

.smr-results-title {
    font-size: 2.25rem !important;
    font-weight: 700 !important;
    color: var(--smr-white) !important;
    margin: 0 !important;
    text-align: center;
    letter-spacing: -0.5px;
}

.smr-results-agent-pill {
    display: inline-block;
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: var(--smr-white);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Visual Score Scale */
.smr-score-display {
    margin-bottom: 30px;
}

.smr-scale-container {
    background: var(--smr-bg);
    padding: 25px 30px;
    border-radius: var(--smr-radius);
    border: 1px solid var(--smr-border);
}

.smr-scale-bar {
    height: 12px;
    background: linear-gradient(to right, var(--smr-primary) 0%, var(--smr-accent) 100%);
    border-radius: 6px;
    position: relative;
    margin: 15px 0;
}

.smr-scale-indicator {
    position: absolute;
    top: -10px;
    width: 28px;
    height: 28px;
    background: var(--smr-white);
    border: 4px solid var(--smr-primary);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: left 0.5s ease;
}

.smr-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--smr-text-body);
    font-weight: 600;
}

.smr-scale-labels span:first-child {
    color: var(--smr-primary);
}

.smr-scale-labels span:last-child {
    color: var(--smr-accent);
}

.smr-scale-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--smr-text-light);
    padding: 0 5px;
    margin-top: 5px;
}

/* Recommendation Card */
.smr-recommendation-card {
    text-align: center;
    padding: 30px;
    border-radius: var(--smr-radius);
    margin-bottom: 30px;
}

.smr-recommendation-card.tier-ma,
.smr-recommendation-card.tier-strong-ma {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
    border: 2px solid var(--smr-success);
}

.smr-recommendation-card.tier-medigap,
.smr-recommendation-card.tier-strong-medigap {
    background: linear-gradient(135deg, rgba(40, 135, 200, 0.1), rgba(40, 135, 200, 0.05));
    border: 2px solid var(--smr-medigap);
}

.smr-recommendation-card.tier-balanced {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.1), rgba(108, 117, 125, 0.05));
    border: 2px solid var(--smr-neutral);
}

.smr-recommendation-tier {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: var(--smr-text-body);
}

.smr-recommendation-plan {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--smr-primary);
}

.smr-learn-more-wrap {
    text-align: center;
    margin: 6px 0 28px;
}

.smr-learn-more-link {
    display: inline-block;
    border-radius: 999px;
    background: var(--smr-blue-light, #EDF6FC);
    border: 1px solid rgba(40, 135, 200, 0.35);
    color: var(--smr-primary);
    font-weight: 700;
    padding: 11px 18px;
    text-decoration: none;
}

.smr-learn-more-link:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

/* Rationale Section */
.smr-rationale-section,
.smr-next-steps-section {
    margin-bottom: 30px;
}

.smr-rationale-section h3,
.smr-next-steps-section h3 {
    font-size: 1.2rem;
    color: var(--smr-primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--smr-accent);
}

.smr-rationale-section ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.smr-rationale-section li {
    padding: 10px 0 10px 30px;
    position: relative;
    line-height: 1.6;
}

.smr-rationale-section li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--smr-accent);
    font-weight: 700;
    font-size: 1.2rem;
}

/* Warnings Box */
.smr-warnings-box {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.1), rgba(255, 140, 0, 0.05));
    border: 2px solid var(--smr-warning);
    border-radius: var(--smr-radius);
    padding: 20px;
    margin-bottom: 25px;
}

.smr-warnings-box p {
    margin: 0 0 10px 0;
    line-height: 1.6;
}

.smr-warnings-box p:last-child {
    margin-bottom: 0;
}

/* Disclaimer */
.smr-disclaimer {
    background: var(--smr-bg);
    padding: 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--smr-text-light);
    margin-top: 30px;
}

/* Retake Button */
.smr-retake-btn {
    display: block;
    margin: 30px auto 0;
}

/* Print/Download Button */
.smr-print-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 20px auto;
}

.smr-action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
}

/* CTA Section */
.smr-cta-section {
    background: linear-gradient(135deg, var(--smr-primary), var(--smr-primary-light));
    color: var(--smr-white);
    padding: 40px;
    border-radius: var(--smr-radius);
    text-align: center;
    margin: 40px 0;
}

.smr-cta-section h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--smr-white) !important;
    margin: 0 0 25px 0;
}

.smr-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.smr-cta-phone {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--smr-accent);
    text-decoration: none;
    padding: 18px 32px;
    background: var(--smr-white);
    border-radius: 8px;
    transition: all 0.2s;
    text-align: center;
    width: 100%;
    display: block;
}

.smr-cta-phone:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 57, 55, 0.3);
}

.smr-cta-consultation-btn {
    background: var(--smr-accent);
    color: var(--smr-white);
    padding: 18px 32px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
    width: 100%;
    display: block;
}

.smr-cta-consultation-btn:hover {
    background: var(--smr-accent-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 57, 55, 0.4);
}

/* Lead Form on Results Page */
.smr-lead-form-results {
    scroll-margin-top: 100px;
}

/* Chatbot Modal */
.smr-chatbot-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.smr-chatbot-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.smr-chatbot-container {
    position: relative;
    background: var(--smr-white);
    border-radius: var(--smr-radius);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.smr-chatbot-header {
    background: linear-gradient(135deg, var(--smr-primary), var(--smr-primary-light));
    color: var(--smr-white);
    padding: 20px;
    border-radius: var(--smr-radius) var(--smr-radius) 0 0;
    position: relative;
}

.smr-chatbot-header h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    color: var(--smr-white) !important;
}

.smr-chatbot-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
    color: var(--smr-white) !important;
}

.smr-chatbot-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--smr-white);
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
}

.smr-chatbot-close:hover {
    opacity: 1;
}

.smr-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    max-height: 350px;
}

.smr-chat-message {
    display: flex;
    margin-bottom: 15px;
}

.smr-chat-message.bot {
    justify-content: flex-start;
}

.smr-chat-message.user {
    justify-content: flex-end;
}

.smr-bot-avatar {
    width: 36px;
    height: 36px;
    background: var(--smr-primary);
    color: var(--smr-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 10px;
    flex-shrink: 0;
}

.smr-message-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.smr-chat-message.bot .smr-message-bubble {
    background: var(--smr-bg);
    color: var(--smr-text-body);
}

.smr-chat-message.user .smr-message-bubble {
    background: var(--smr-primary);
    color: var(--smr-white);
}

.smr-chatbot-input-area {
    padding: 15px 20px;
    border-top: 1px solid var(--smr-border);
}

.smr-chat-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.smr-chat-button {
    padding: 10px 20px;
    border-radius: 20px;
    border: 2px solid var(--smr-border);
    background: var(--smr-white);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.smr-chat-button:hover {
    border-color: var(--smr-primary);
}

.smr-chat-button.primary {
    background: var(--smr-primary);
    color: var(--smr-white);
    border-color: var(--smr-primary);
}

.smr-chat-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.smr-chat-input-group input {
    padding: 12px 16px;
    border: 2px solid var(--smr-border);
    border-radius: 8px;
    font-size: 1rem;
}

.smr-chat-skip-link {
    text-align: center;
    margin-top: 10px;
}

.smr-chat-skip-link button {
    background: none;
    border: none;
    color: var(--smr-text-light);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.85rem;
}

.smr-chat-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.smr-chat-checkbox-label {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--smr-bg);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
}

.smr-chat-checkbox-label input {
    margin-right: 8px;
    accent-color: var(--smr-primary);
}

/* Error State */
.smr-error {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
    border: 2px solid var(--smr-danger);
    color: var(--smr-danger);
    padding: 20px;
    border-radius: var(--smr-radius);
    text-align: center;
    font-weight: 600;
}

/* Employer Comparison Table */
.smr-comparison-section {
    margin: 30px 0;
    padding: 25px;
    background: var(--smr-bg);
    border-radius: var(--smr-radius);
    border: 1px solid var(--smr-border);
}

.smr-comparison-section h3 {
    font-size: 1.3rem;
    color: var(--smr-primary);
    margin: 0 0 10px 0;
}

.smr-comparison-intro {
    color: var(--smr-text-light);
    margin-bottom: 20px;
}

.smr-comparison-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

.smr-comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.smr-comparison-table th,
.smr-comparison-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--smr-border);
}

.smr-comparison-table thead th {
    background: var(--smr-primary);
    color: var(--smr-white);
    font-weight: 600;
}

.smr-comparison-table thead th:first-child {
    border-radius: 8px 0 0 0;
}

.smr-comparison-table thead th:last-child {
    border-radius: 0 8px 0 0;
}

.smr-comparison-table tbody tr:nth-child(even) {
    background: rgba(1, 38, 57, 0.03);
}

.smr-comparison-table tbody tr:hover {
    background: rgba(1, 38, 57, 0.06);
}

.smr-comparison-table td:first-child {
    color: var(--smr-text-dark);
}

.smr-comparison-table td:nth-child(2) {
    color: var(--smr-primary);
    font-weight: 600;
}

.smr-comparison-table td:nth-child(3) {
    color: var(--smr-accent);
    font-weight: 500;
}

.smr-comparison-note {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.1), rgba(255, 140, 0, 0.05));
    border: 1px solid var(--smr-warning);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--smr-text-body);
}

.smr-comparison-cta {
    font-size: 0.95rem;
    color: var(--smr-text-body);
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid var(--smr-border);
}

/* Tooltips for comparison table - Senior-friendly design */
.smr-tooltip-trigger {
    position: relative;
    cursor: help;
    border-bottom: 2px solid var(--smr-accent);
    font-weight: 500;
    padding-bottom: 1px;
}

.smr-tooltip-trigger::before {
    content: '?';
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    background: var(--smr-accent);
    color: var(--smr-white);
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    margin-left: 4px;
    vertical-align: middle;
}

.smr-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--smr-primary);
    color: var(--smr-white);
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.6;
    width: 320px;
    max-width: 90vw;
    text-align: left;
    z-index: 1000;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    border: 2px solid var(--smr-accent);
}

.smr-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-top-color: var(--smr-primary);
}

.smr-tooltip-trigger:hover .smr-tooltip,
.smr-tooltip-trigger:focus .smr-tooltip {
    visibility: visible;
    opacity: 1;
}

/* Fix cutoff on first column - align left */
.smr-comparison-table td:first-child .smr-tooltip,
.smr-comparison-table th:first-child .smr-tooltip {
    left: 0;
    transform: none;
}

.smr-comparison-table td:first-child .smr-tooltip::after,
.smr-comparison-table th:first-child .smr-tooltip::after {
    left: 20px;
    transform: none;
}

/* Adjust tooltip position on right side of table - align right */
.smr-comparison-table td:last-child .smr-tooltip,
.smr-comparison-table th:last-child .smr-tooltip {
    left: auto;
    right: 0;
    transform: none;
}

.smr-comparison-table td:last-child .smr-tooltip::after,
.smr-comparison-table th:last-child .smr-tooltip::after {
    left: auto;
    right: 20px;
    transform: none;
}

/* Ensure tooltips are never cut off by table container */
.smr-comparison-table-wrapper {
    overflow: visible !important;
}

.smr-comparison-section {
    overflow: visible;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .smr-tooltip {
        width: 280px;
        font-size: 0.9rem;
        padding: 14px 16px;
    }
    
    .smr-tooltip-trigger::before {
        width: 16px;
        height: 16px;
        line-height: 16px;
        font-size: 11px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .smr-quiz-header {
        padding: 30px 20px;
    }
    
    .smr-quiz-header h1 {
        font-size: 1.5rem;
    }
    
    .smr-quiz-form,
    .smr-lead-form-section,
    .smr-results-section {
        padding: 25px 20px;
    }
    
    .smr-question-card {
        padding: 20px;
    }
    
    .smr-form-row {
        grid-template-columns: 1fr;
    }
    
    .smr-birthday-selector {
        grid-template-columns: 1fr;
    }
    
    .smr-nav-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .smr-btn {
        width: 100%;
    }
    
    .smr-recommendation-plan {
        font-size: 1.4rem;
    }
    
    /* Comparison table mobile */
    .smr-comparison-section {
        padding: 20px 15px;
    }
    
    .smr-comparison-table th,
    .smr-comparison-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
    
    .smr-comparison-table td:nth-child(3) {
        font-size: 0.8rem;
    }
}

/* ==========================================
   PRINT-ONLY CONTACT INFO
   Hidden on screen, shown on print
   ========================================== */

.smr-print-contact-info {
    display: none !important; /* Hidden on screen */
}

/* ==========================================
   PRINT STYLES
   For printing/saving recommendation as PDF
   JS beforeprint/afterprint handles hiding
   non-quiz siblings in the DOM.
   ========================================== */

@media print {
    @page {
        margin: 0.5in;
        size: letter;
    }

    html, body {
        height: auto !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    /* The JS beforeprint handler creates #smr-print-overlay on <body>
       with all the content we need, and hides everything else. */
    #smr-print-overlay {
        display: block !important;
        overflow: visible !important;
    }

    #smr-print-overlay .smr-recommendation-tier {
        font-size: 0.9rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 10px;
        color: #4A4A4A;
    }

    #smr-print-overlay .smr-recommendation-plan {
        font-size: 1.75rem;
        font-weight: 700;
        color: #012639;
    }
}

