/* Shared AI-marketing / demo components.
   Linked from richtexteditor.master and demo.master.
   Page-local styles stay in the <style> blocks of individual pages. */

/* ---- AI editor mockup (marketing hero) ---- */
.ai-hero-mock {
    position: relative;
    border-radius: 1.6rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, #ffffff 0%, #f5f8fd 100%);
    box-shadow: 0 30px 80px rgba(2, 8, 23, 0.32);
    color: #0f172a;
}
.ai-hero-mock__chrome {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 14px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}
.ai-hero-mock__dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.ai-hero-mock__dot--r { background: #f87171; }
.ai-hero-mock__dot--y { background: #fbbf24; }
.ai-hero-mock__dot--g { background: #34d399; }
.ai-hero-mock__title {
    margin-left: auto;
    font-size: 11px; font-weight: 700; color: #475569;
    letter-spacing: 0.08em; text-transform: uppercase;
}
.ai-hero-mock__toolbar {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 8px 12px;
    background: #fafbfd;
    border-bottom: 1px solid #eef1f6;
}
.ai-hero-mock__tbtn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 28px; height: 26px; padding: 0 7px;
    border-radius: 6px; border: 1px solid transparent;
    background: transparent; color: #475569;
    font-weight: 700; font-size: 12px;
}
.ai-hero-mock__tbtn--ai {
    color: #1559d6; border-color: rgba(21, 89, 214, 0.22);
    background: linear-gradient(180deg, #f9fcff 0%, #e8f3ff 100%);
    padding: 0 10px;
}
.ai-hero-mock__tbtn--ai::before {
    content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    background: linear-gradient(180deg, #67b7ff, #347dff); margin-right: 6px;
    box-shadow: 0 0 0 2px #fff, 0 0 8px rgba(52, 125, 255, 0.45);
}
.ai-hero-mock__body {
    padding: 16px 18px 18px;
    font-size: 13.5px; line-height: 1.65; color: #334155;
}
.ai-hero-mock__body p { margin: 0 0 10px; }
.ai-hero-mock__highlight {
    background: linear-gradient(180deg, transparent 60%, rgba(34, 197, 94, 0.28) 60%);
    padding: 0 2px;
}
.ai-hero-mock__suggestion {
    margin-top: 14px; padding: 10px 12px;
    border-radius: 10px;
    border: 1px dashed rgba(21, 89, 214, 0.35);
    background: #f5f9ff; color: #1e293b;
}
.ai-hero-mock__suggestion-label {
    font-size: 10px; font-weight: 800;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: #1559d6;
}
.ai-hero-mock__suggestion-actions { display: flex; gap: 6px; margin-top: 8px; }
.ai-hero-mock__pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 9px; border-radius: 999px;
    font-size: 11px; font-weight: 700;
}
.ai-hero-mock__pill--accept { background: rgba(34, 197, 94, 0.14); color: #166534; }
.ai-hero-mock__pill--reject { background: rgba(244, 63, 94, 0.1); color: #9f1239; }
.ai-hero-mock__pill--primary {
    background: linear-gradient(180deg, #2873e8 0%, #1559d6 100%);
    color: #fff;
}

/* ---- Small AI surface preview cards ---- */
.ai-surface {
    position: relative; border-radius: 14px;
    border: 1px solid #e2e8f0; background: #fff;
    overflow: hidden; height: 180px;
}
.ai-surface__head {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; border-bottom: 1px solid #eef1f6;
    font-size: 11.5px; font-weight: 700; color: #475569;
    letter-spacing: 0.06em; text-transform: uppercase;
}
.ai-surface__head .dot {
    width: 8px; height: 8px; border-radius: 50%; background: #60a5fa;
}
.ai-surface__body {
    padding: 12px; font-size: 12px; line-height: 1.55; color: #334155;
}
.ai-chat-row { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 6px; }
.ai-chat-bubble {
    padding: 7px 10px; border-radius: 10px;
    font-size: 12px; line-height: 1.5; max-width: 90%;
}
.ai-chat-bubble--user { background: #eef5ff; color: #1e40af; margin-left: auto; }
.ai-chat-bubble--ai { background: #f8fafc; color: #1f2937; border: 1px solid #e2e8f0; }
.ai-review-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 7px 10px;
    border: 1px solid #e2e8f0; border-radius: 8px;
    margin-bottom: 6px; background: #fafbfd;
    font-size: 12px;
}
.ai-review-row .status {
    font-size: 10px; font-weight: 800;
    letter-spacing: 0.08em; text-transform: uppercase;
    padding: 2px 7px; border-radius: 999px;
}
.ai-review-row .status--pending { background: rgba(21, 89, 214, 0.12); color: #1559d6; }
.ai-review-row .status--accepted { background: rgba(34, 197, 94, 0.14); color: #166534; }

/* ---- Dark code sample block ---- */
.ai-code {
    position: relative;
    border-radius: 1.1rem; overflow: hidden;
    border: 1px solid #0f172a;
    background: #0b1220; color: #e2e8f0;
    font: 500 12.5px/1.65 Consolas, "SF Mono", Menlo, monospace;
}
.ai-code__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; border-bottom: 1px solid #1f2937;
    font-size: 11px; font-weight: 700; color: #94a3b8;
    letter-spacing: 0.08em; text-transform: uppercase;
}
.ai-code pre { margin: 0; padding: 16px 18px; overflow-x: auto; }
.ai-code .tk-key { color: #60a5fa; }
.ai-code .tk-str { color: #86efac; }
.ai-code .tk-com { color: #64748b; font-style: italic; }
.ai-code .tk-fn  { color: #fbbf24; }
.ai-code .tk-kw  { color: #c084fc; }

/* ---- Larger editor snapshot (for hero illustrations) ---- */
.editor-snap {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 24px 60px rgba(2, 8, 23, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 12.5px;
    line-height: 1.55;
}
.editor-snap__toolbar {
    display: flex; flex-wrap: wrap; gap: 4px;
    padding: 6px 10px;
    background: #fafbfd;
    border-bottom: 1px solid #eef1f6;
}
.editor-snap__toolbar + .editor-snap__toolbar {
    background: #fefefe;
}
.editor-snap__tbtn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 24px; height: 22px; padding: 0 5px;
    border-radius: 5px; border: 1px solid transparent;
    background: transparent; color: #475569;
    font-weight: 700; font-size: 11px;
}
.editor-snap__tbtn svg { width: 13px; height: 13px; }
.editor-snap__tsep {
    width: 1px; background: #e2e8f0; margin: 3px 3px;
}
.editor-snap__tbtn--caret::after {
    content: ""; display: inline-block; width: 0; height: 0;
    border-left: 3px solid transparent; border-right: 3px solid transparent;
    border-top: 3.5px solid #64748b; margin-left: 4px;
}
.editor-snap__tbtn--ai {
    color: #1559d6; border-color: rgba(21, 89, 214, 0.24);
    background: linear-gradient(180deg, #f9fcff 0%, #e8f3ff 100%);
    padding: 0 8px;
}
.editor-snap__tbtn--ai::before {
    content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%;
    background: linear-gradient(180deg, #67b7ff, #347dff); margin-right: 5px;
    box-shadow: 0 0 0 1.5px #fff, 0 0 6px rgba(52, 125, 255, 0.55);
}

.editor-snap__body {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 14px;
    padding: 16px 18px 6px;
    color: #334155;
}
.editor-snap__body h3 {
    margin: 0 0 8px;
    font-size: 14.5px; line-height: 1.35;
    font-weight: 800; color: #0f172a;
}
.editor-snap__body h3 .k {
    color: #2563eb;
}
.editor-snap__body p {
    margin: 0 0 8px;
    font-size: 12.5px; line-height: 1.55;
    color: #334155;
}
.editor-snap__hl {
    background: linear-gradient(180deg, transparent 60%, rgba(250, 204, 21, 0.55) 60%);
    padding: 0 2px;
}
.editor-snap__sel {
    background: #cfe3ff;
    padding: 0 1px;
}
.editor-snap__fig {
    position: relative;
    height: 168px;
    border-radius: 12px;
    background:
        radial-gradient(circle at 30% 40%, #9ae6b4 0%, #4ade80 28%, transparent 50%),
        radial-gradient(circle at 70% 65%, #7c3aed 0%, #6366f1 28%, transparent 52%),
        linear-gradient(135deg, #bae6fd 0%, #60a5fa 55%, #1d4ed8 100%);
    overflow: hidden;
}
.editor-snap__fig::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 65% 45%, rgba(255,255,255,0.45), transparent 40%);
    mix-blend-mode: screen;
}

.editor-snap__floatbar {
    position: absolute;
    top: 58%; left: 6%;
    display: inline-flex; align-items: center; gap: 2px;
    padding: 6px 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
    z-index: 2;
}

.editor-snap__footer {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 14px;
    border-top: 1px solid #eef1f6;
    background: #fafbfd;
    font-size: 11.5px; color: #64748b;
}
.editor-snap__footer .plus {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%;
    background: #eff6ff; color: #1e40af;
    font-weight: 900;
}
.editor-snap__footer .ptag {
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    font-family: Consolas, "SF Mono", Menlo, monospace;
    font-size: 10.5px;
}
.editor-snap__footer .chars { margin-left: auto; }

/* ---- Tiny kbd + demo status LED (for demo pages) ---- */
.ai-kbd {
    display: inline-flex; align-items: center; padding: 1px 6px;
    border: 1px solid #cbd5e1; border-bottom-width: 2px;
    border-radius: 6px; font-size: 11px;
    font-family: Consolas, "SF Mono", Menlo, monospace;
    color: #475569; background: #f8fafc;
}
.ai-demo-status {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 12px;
    background: #0f172a; color: #e2e8f0;
    font-size: 12.5px;
    font-family: Consolas, "SF Mono", Menlo, monospace;
    border: 1px solid #1e293b;
}
.ai-demo-status__led {
    width: 8px; height: 8px; border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}
.ai-demo-status__led.is-busy {
    background: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}
.ai-demo-status__led.is-err {
    background: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
}
.ai-demo-status__meta { margin-left: auto; color: #64748b; font-size: 11px; }
