/* Demo-only chrome layered on top of the real dashboard.css.
   Also includes result-card styles that the production app injects at
   runtime from dashboard.js (meta tags, GBP audit, insight items), so the
   fixture-rendered results look identical to live output. */

/* Persistent sample-data badge */
.demo-badge {
    position: fixed;
    bottom: 14px;
    left: 14px;
    z-index: 4200;
    background: #12352c;
    color: #ffffff;
    border: 1px solid #3ecf8e;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.3);
    pointer-events: none;
}

/* Header walkthrough button alignment */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Runtime-injected styles copied from dashboard.js: insight items */
.insight-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: 12px; }
.insight-topic { color: #64748b; font-weight: 600; }
.insight-item p { margin: 0; color: #1f2937; font-size: 14px; line-height: 1.5; }
.alerts-list li { font-size: 13px; color: #475569; padding: 8px 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; }

/* Runtime-injected styles copied from dashboard.js: meta tag results */
.analysis-results.meta-optimized { background: transparent; border: none; padding: 0; margin: 6px 0; }
.meta-card { display: grid; gap: 8px; }
.meta-field { padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f9fbff; box-shadow: inset 0 -1px 0 #eef2ff; }
.meta-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.meta-label { font-weight: 600; color: #0f172a; font-size: 16px; }
.meta-main { font-size: 16px; color: #111827; line-height: 1.32; margin-bottom: 3px; }
.meta-chip-row { margin-bottom: 3px; }
.meta-chip { background: #e0f2fe; color: #0369a1; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.meta-reason { font-size: 14px; color: #1f2937; line-height: 1.4; }
.instruction-card { padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 8px; background: #ffffff; display: grid; gap: 6px; }
.instruction-block { margin: 0; }
.instruction-block h4 { margin: 0 0 3px; font-size: 15px; color: #0f172a; }
.instruction-list { margin: 0; padding-left: 16px; color: #1f2937; line-height: 1.45; font-size: 14px; }
.instruction-list li + li { margin-top: 2px; }
.muted { color: #94a3b8; }

/* Runtime-injected styles copied from dashboard.js: SERP preview */
.serp-preview-card { border: 1px solid #dadce0; border-radius: 12px; background: #ffffff; padding: 14px 16px; max-width: 600px; font-family: arial, sans-serif; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.serp-preview-source { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.serp-preview-favicon { width: 26px; height: 26px; border-radius: 50%; background: #205f4a; color: #ffffff; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.serp-preview-meta { display: grid; line-height: 1.25; }
.serp-preview-sitename { font-size: 14px; color: #202124; }
.serp-preview-url { font-size: 12px; color: #4d5156; overflow-wrap: anywhere; }
.serp-preview-title { font-size: 20px; color: #1a0dab; line-height: 1.3; margin-bottom: 3px; }
.serp-preview-desc { font-size: 14px; color: #4d5156; line-height: 1.5; }
.serp-preview-note { margin-top: 6px; font-size: 12.5px; color: #64748b; }

/* Runtime-injected styles copied from dashboard.js: GBP audit results */
.gbp-audit-shell { display: grid; gap: 14px; }
.gbp-score-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); align-items: start; }
.gbp-score-card { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px 16px; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06); }
.gbp-score-card.tone-good { border-top: 3px solid #059669; }
.gbp-score-card.tone-fair { border-top: 3px solid #f59e0b; }
.gbp-score-card.tone-poor { border-top: 3px solid #ef4444; }
.gbp-score-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.gbp-score-title { font-weight: 700; color: #0f172a; font-size: 15px; letter-spacing: 0.01em; }
.gbp-score-pill { flex-shrink: 0; display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.gbp-score-pill.tone-good { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.gbp-score-pill.tone-fair { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.gbp-score-bar { height: 5px; border-radius: 999px; background: #f1f5f9; overflow: hidden; margin-bottom: 12px; }
.gbp-score-fill { display: block; height: 100%; border-radius: 999px; }
.gbp-score-fill.tone-good { background: linear-gradient(90deg, #059669, #10b981); }
.gbp-score-fill.tone-fair { background: linear-gradient(90deg, #d97706, #f59e0b); }
.gbp-score-body { display: grid; gap: 7px; }
.gbp-row { display: grid; grid-template-columns: 122px 1fr; gap: 10px; align-items: baseline; font-size: 14px; line-height: 1.45; }
.gbp-row-full { grid-template-columns: 1fr; }
.gbp-row-label { color: #64748b; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.gbp-row-value { color: #1f2937; overflow-wrap: anywhere; }
.gbp-badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.4; }
.gbp-badge-ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.gbp-badge-missing { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.gbp-note { margin-top: 2px; padding: 8px 10px; border-left: 3px solid #cbd5e1; background: #f8fafc; border-radius: 0 8px 8px 0; color: #475569; font-size: 13px; line-height: 1.5; }
.gbp-priority-panel { border: 1px solid #fde68a; border-radius: 12px; background: linear-gradient(180deg, #fffdf5 0%, #fffbeb 100%); padding: 14px 16px; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05); }
.gbp-priority-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.gbp-priority-title { font-weight: 700; color: #92400e; font-size: 15px; }
.gbp-priority-count { font-size: 12px; font-weight: 600; color: #b45309; background: #fef3c7; border: 1px solid #fde68a; padding: 2px 9px; border-radius: 999px; }
.gbp-priority-list { margin: 0; padding-left: 22px; display: grid; gap: 7px; color: #78350f; font-size: 14px; line-height: 1.5; }
.gbp-priority-list li::marker { font-weight: 700; color: #b45309; }

/* Code block for generated JSON-LD */
.demo-code-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12.5px;
    line-height: 1.5;
    color: #0f172a;
    overflow-x: auto;
    white-space: pre;
    margin: 0;
}

/* End screen */
.demo-end-overlay[hidden] { display: none; }
.demo-end-overlay {
    position: fixed;
    inset: 0;
    z-index: 4300;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.demo-end-card {
    background: #ffffff;
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    padding: 30px 28px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.35);
    max-height: 90vh;
    overflow-y: auto;
}
.demo-end-card h1 { font-size: 24px; color: #12352c; margin-bottom: 10px; }
.demo-end-card p { color: #1f2937; font-size: 15px; line-height: 1.55; }
.demo-end-btn { display: inline-block; margin-top: 14px; padding: 12px 26px; font-size: 15px; text-decoration: none; }
.demo-end-secondary { margin-top: 12px; font-size: 14px; }
.demo-end-secondary a { color: #205f4a; font-weight: 600; }
.demo-end-close {
    margin-top: 16px;
    background: transparent;
    border: 0;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

/* Intercept tooltip */
.demo-tooltip[hidden] { display: none; }
.demo-tooltip {
    position: fixed;
    z-index: 4400;
    background: #12352c;
    color: #ffffff;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 280px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.35);
    pointer-events: none;
}

/* driver.js accents to match Heritage Pine */
.driver-popover { font-family: 'Inter', sans-serif; }
.driver-popover-title { font-weight: 700; color: #12352c; }
.driver-popover-navigation-btns button { background: #12352c; color: #ffffff; text-shadow: none; border: 0; border-radius: 6px; padding: 5px 12px; }
.driver-popover-progress-text { color: #64748b; }
