/* =============================================================
 * ORN Chat Panel — styles for the embeddable modal injected by
 * orn-chat-panel.js. Mirrors the visual language of
 * customer/journey/_includes/copilot.jsp (dark coffee bg, gold accents,
 * Spectral display title, mono eyebrow). Drop on any page that loads
 * orn-chat-panel.js.
 *
 * The module injects #ornChatPanel into <body> on init(). This file
 * styles it. body.orn-chat-panel-open scrolls the underlying page
 * disabled while the modal is open.
 * ============================================================= */

body.orn-chat-panel-open { overflow: hidden; }

.orn-chat-panel {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: flex-end;
    justify-content: center;
}
.orn-chat-panel.is-open { display: flex; }

@media (min-width: 1024px) {
    .orn-chat-panel { align-items: center; justify-content: center; }
}

.orn-chat-panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 4, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

.orn-chat-panel__card {
    position: relative;
    background: rgb(16, 14, 11);
    border: 1px solid rgb(58, 51, 37);
    color: rgb(242, 233, 216);
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 24px 24px 0 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -16px 60px rgba(10, 8, 4, 0.55);
    overflow: hidden;
}
@media (min-width: 1024px) {
    .orn-chat-panel__card {
        max-width: 550px;
        max-height: 80vh;
        border-radius: 20px;
        box-shadow: 0 24px 80px rgba(10, 8, 4, 0.55);
    }
}

/* Subtle gold glow top-right, matching the trigger card */
.orn-chat-panel__card::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(120% 80% at 100% 0%, rgba(201, 164, 92, 0.14), transparent 60%);
    pointer-events: none;
}
.orn-chat-panel__card > * { position: relative; }

/* Top — eyebrow + title + × */
.orn-chat-panel__top {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 24px 28px 18px;
    border-bottom: 1px solid rgba(201, 164, 92, 0.12);
}
.orn-chat-panel__top-text { flex: 1 1 0; min-width: 0; }
.orn-chat-panel__eyebrow {
    margin: 0 0 4px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgb(201, 164, 92);
    font-weight: 600;
}
.orn-chat-panel__title {
    margin: 0;
    font-family: 'Spectral', 'Archivo', serif;
    font-weight: 600;
    font-size: 23px;
    line-height: 1.1;
    color: rgb(248, 241, 226);
}
.orn-chat-panel__close {
    flex: 0 0 32px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(201, 164, 92, 0.35);
    color: rgb(201, 164, 92);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.orn-chat-panel__close:hover { background: rgba(201, 164, 92, 0.12); color: rgb(248, 241, 226); }

/* Topic pills row */
.orn-chat-panel__topics {
    display: flex; flex-wrap: nowrap; gap: 8px;
    padding: 14px 28px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.orn-chat-panel__topics::-webkit-scrollbar { display: none; }
.orn-chat-panel__topics:empty { display: none; }
.orn-chat-panel__topic {
    flex: 0 0 auto;
    background: transparent;
    border: 1px solid rgba(217, 201, 164, 0.32);
    border-radius: 999px;
    padding: 7px 14px;
    color: rgba(217, 201, 164, 0.85);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.orn-chat-panel__topic:hover { color: rgb(248, 241, 226); border-color: rgba(201, 164, 92, 0.65); }
.orn-chat-panel__topic--active {
    color: rgb(201, 164, 92);
    border-color: rgb(201, 164, 92);
    background: rgba(201, 164, 92, 0.08);
}

/* Stream — the message thread */
.orn-chat-panel__stream {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 18px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.orn-chat-panel__msg {
    background: rgba(248, 241, 226, 0.04);
    border: 1px solid rgba(201, 164, 92, 0.12);
    border-radius: 14px;
    padding: 14px 16px;
    color: rgb(232, 222, 200);
    font-size: 14.5px;
    line-height: 1.5;
    max-width: 92%;
}
.orn-chat-panel__msg--user {
    align-self: flex-end;
    background: rgba(201, 164, 92, 0.16);
    border-color: rgba(201, 164, 92, 0.36);
    color: rgb(248, 241, 226);
}
.orn-chat-panel__msg-eyebrow {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgb(201, 164, 92);
    margin-bottom: 4px;
}
.orn-chat-panel__msg-title {
    font-family: 'Spectral', 'Archivo', serif;
    font-weight: 600;
    font-size: 16px;
    color: rgb(248, 241, 226);
    margin-bottom: 4px;
}
.orn-chat-panel__msg-body { white-space: pre-wrap; }
.orn-chat-panel__msg.is-welcome { background: transparent; border: none; padding: 4px 0; }

/* Questions strip (probes the brain wants the user to answer) */
.orn-chat-panel__questions {
    display: flex; flex-direction: column; gap: 10px;
    padding: 0 28px;
}
.orn-chat-panel__questions:empty { display: none; }
.orn-chat-panel__questions .orn-chat-panel__msg {
    background: rgba(201, 164, 92, 0.06);
    border-color: rgba(201, 164, 92, 0.22);
}

/* Chip strip */
.orn-chat-panel__chips {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding: 12px 28px 0;
    border-top: 1px solid rgba(201, 164, 92, 0.08);
}
.orn-chat-panel__chips:empty { display: none; }
.orn-chat-panel__chip {
    background: transparent;
    border: 1px solid rgb(74, 65, 48);
    border-radius: 999px;
    padding: 8px 14px;
    color: rgb(217, 201, 164);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.orn-chat-panel__chip:hover {
    color: rgb(20, 14, 6);
    background: rgb(201, 164, 92);
    border-color: rgb(201, 164, 92);
}

/* Input bar */
.orn-chat-panel__inputbar {
    display: flex; gap: 8px;
    padding: 16px 28px 22px;
}
.orn-chat-panel__input {
    flex: 1 1 0;
    background: rgb(22, 19, 13);
    border: 1px solid rgb(58, 51, 37);
    border-radius: 12px;
    padding: 12px 16px;
    color: rgb(232, 222, 200);
    font-family: inherit;
    font-size: 14.5px;
}
.orn-chat-panel__input::placeholder { color: rgba(184, 172, 146, 0.7); }
.orn-chat-panel__input:focus {
    outline: none;
    border-color: rgb(201, 164, 92);
    box-shadow: 0 0 0 2px rgba(201, 164, 92, 0.18);
}
.orn-chat-panel__send {
    flex: 0 0 44px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgb(201, 164, 92);
    color: rgb(20, 14, 6);
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}
.orn-chat-panel__send:hover { background: rgb(217, 180, 110); }

/* Thinking indicator — bouncing gold dots + label, shown while a brain
   call is in flight. Cleared in hideThinking() on success/error. */
.orn-chat-panel__thinking {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent !important;
    border-color: transparent !important;
    padding: 8px 16px !important;
}
.orn-chat-panel__dots {
    display: inline-flex;
    gap: 5px;
}
.orn-chat-panel__dots span {
    width: 7px; height: 7px;
    background: rgb(201, 164, 92);
    border-radius: 50%;
    display: inline-block;
    animation: ornChatDot 1.1s ease-in-out infinite;
}
.orn-chat-panel__dots span:nth-child(2) { animation-delay: 0.15s; }
.orn-chat-panel__dots span:nth-child(3) { animation-delay: 0.3s; }
.orn-chat-panel__thinking-label {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(217, 201, 164, 0.7);
}
@keyframes ornChatDot {
    0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
    40%           { opacity: 1;    transform: scale(1); }
}

/* Probe options — answer buttons rendered inside an ASK_* CARD message
   (carried by message.payload.options[]). Tapping fires CHIP_TAP. */
.orn-chat-panel__msg-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.orn-chat-panel__msg-option {
    background: transparent;
    border: 1px solid rgba(201, 164, 92, 0.42);
    border-radius: 999px;
    padding: 8px 14px;
    color: rgb(232, 222, 200);
    font-family: inherit;
    font-size: 13.5px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.orn-chat-panel__msg-option:hover {
    background: rgb(201, 164, 92);
    color: rgb(20, 14, 6);
    border-color: rgb(201, 164, 92);
}

/* ============================================================
   Cockpit-shape chat panel — .srBrain* classes that orn-chat-panel.js
   renders into. Scoped under .orn-chat-panel so the styles apply only
   inside our customer popup (not the cockpit page itself, where
   selling_room.css already styles these). The DOM ids + classnames
   are kept identical to the cockpit's so render code + click delegates
   port verbatim.
   ============================================================ */

.orn-chat-panel .srBrainPanel {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: rgb(16, 14, 11);
    border: 0;
    color: rgb(242, 233, 216);
    overflow: hidden;
}

/* Header — eyebrow + title + close right */
.orn-chat-panel .srBrainHeader {
    padding: 26px 28px 0;
    flex-shrink: 0;
}
.orn-chat-panel .srBrainHeaderTop {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}
.orn-chat-panel .srBrainEyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--orn-navy);
    margin-bottom: 4px;
}
.orn-chat-panel .srBrainTitle {
    font-family: 'Spectral', serif;
    font-weight: 600;
    font-size: 26px;
    line-height: 1.15;
    margin: 0;
    color: rgb(248, 241, 226);
}
.orn-chat-panel .srBrainSubtitleRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(201, 164, 92, 0.16);
}
.orn-chat-panel .srBrainSubtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(217, 201, 164, 0.65);
}
.orn-chat-panel .srBrainStartOver {
    background: transparent;
    border: 1px solid rgba(201, 164, 92, 0.35);
    color: rgb(217, 201, 164);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.orn-chat-panel .srBrainStartOver:hover {
    border-color: rgb(201, 164, 92);
    background: rgba(201, 164, 92, 0.08);
}

/* Topic strip — horizontal pills, active = gold-filled */
.orn-chat-panel .srBrainTopicRow {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 16px 28px;
    flex-shrink: 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
    border-bottom: 1px solid rgba(201, 164, 92, 0.12);
}
.orn-chat-panel .srBrainTopicRow::-webkit-scrollbar { display: none; }
.orn-chat-panel .srBrainTopicRow:empty { display: none; }
.orn-chat-panel .srBrainTopic {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
    border-radius: 999px;
    padding: 8px 16px;
    font-family: inherit;
    font-size: 13.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.orn-chat-panel .srBrainTopic:hover {
    border-color: rgb(201, 164, 92);
    color: rgb(248, 241, 226);
}
.orn-chat-panel .srBrainTopic.is-active {
    background: var(--orn-navy);
    border-color: #ffffff;
    color: #ffffff;
}

/* Body — message stream */
.orn-chat-panel .srBrainBody {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 18px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.orn-chat-panel .srBrainMessages,
.orn-chat-panel .srBrainQuestions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;       /* so child .srBrainMessage align-self works */
}

/* ── Message bubble — chat-app shape ─────────────────────────────
   ORN (R) bubbles: avatar left, gold-bordered dark card body (right
   side of avatar, max 85% width — natural chat-app feel).
   User-tap bubbles: NO avatar, right-aligned, gold bg with dark text
   so they read as the user's voice (like iMessage right-side bubbles).
   ──────────────────────────────────────────────────────────────── */
.orn-chat-panel .srBrainMessage {
    display: flex;
    gap: 10px;
    max-width: 90%;
}
.orn-chat-panel .srBrainMessage.is-welcome {
    background: transparent;
    border: 0;
    padding: 0;
    max-width: 100%;
}
.orn-chat-panel .srBrainMessage.is-welcome .srBrainMessageIcon { display: none; }
.orn-chat-panel .srBrainMessage.is-welcome .srBrainMessageBody {
    background: transparent;
    border: 0;
    padding: 0;
}

/* "R" avatar — navy disc, white letter */
.orn-chat-panel .srBrainMessageIcon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--orn-navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Archivo, sans-serif;
    font-weight: 700;
    font-size: 13px;
    margin-top: 2px;
}

/* ORN message body card — dark with subtle gold ring */
.orn-chat-panel .srBrainMessageBody {
    flex: 1 1 0;
    min-width: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(201, 164, 92, 0.20);
    border-radius: 14px;
    padding: 12px 16px;
}

/* User-tap bubble — right-aligned gold pill, no avatar, dark text */
.orn-chat-panel .srBrainMessage.is-user {
    align-self: flex-end;
    justify-content: flex-end;
    max-width: 80%;
}
.orn-chat-panel .srBrainMessage.is-user .srBrainMessageIcon { display: none; }
.orn-chat-panel .srBrainMessage.is-user .srBrainMessageBody {
    background: #ffffff;
    border-color: #ffffff;
    color: rgb(20, 14, 6);
    border-radius: 14px 14px 4px 14px;
}
.orn-chat-panel .srBrainMessage.is-user .srBrainMessageBodyText {
    color: rgb(20, 14, 6);
    font-weight: 600;
}

.orn-chat-panel .srBrainMessageEyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.16em;
    color: rgba(201, 164, 92, 0.85);
    margin-bottom: 6px;
    text-transform: uppercase;
}
.orn-chat-panel .srBrainMessageTitle {
    font-family: Archivo, sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: rgb(248, 241, 226);
    margin-bottom: 6px;
}
.orn-chat-panel .srBrainMessageBodyText {
    color: #ffffff;
    font-size: 14.5px;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* ── Inline option cluster — answer cards inside a probe bubble ──
   Higher contrast than before: filled cream-tint bg, gold border on
   hover/active, dark text. Reads as a clickable list of answers. */
.orn-chat-panel .srBrainMessageOptions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}
.orn-chat-panel .srBrainChip.is-option {
    background: rgba(201, 164, 92, 0.08);
    border: 1px solid rgba(201, 164, 92, 0.40);
    color: rgb(248, 241, 226);
    border-radius: 12px;
    padding: 12px 16px;
    text-align: left;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.1s;
}
.orn-chat-panel .srBrainChip.is-option:hover {
    border-color: rgb(201, 164, 92);
    background: rgba(201, 164, 92, 0.18);
    transform: translateY(-1px);
}
.orn-chat-panel .srBrainChip.is-option:active {
    background: rgb(201, 164, 92);
    color: rgb(20, 14, 6);
    transform: translateY(0);
}

/* ── Form prompt card (variant=FORM) ─────────────────────────────
   Subtitle + labelled NUMBER/TEXT inputs + Continue button. Matches
   cockpit's renderFormPromptCard DOM exactly. */
.orn-chat-panel .srBrainFormSubtitle {
    color: rgb(217, 201, 164);
    font-size: 13.5px;
    line-height: 1.5;
    margin-top: 6px;
    margin-bottom: 12px;
}
.orn-chat-panel .srBrainForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}
.orn-chat-panel .srBrainFormRow {
    display: flex;
    align-items: center;
    gap: 12px;
}
.orn-chat-panel .srBrainFormLabel {
    flex: 1 1 0;
    color: rgb(232, 218, 184);
    font-size: 13.5px;
    font-weight: 500;
}
.orn-chat-panel .srBrainFormRequired { color: rgb(212, 90, 71); margin-left: 2px; }
.orn-chat-panel .srBrainFormInput {
    width: 80px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(201, 164, 92, 0.35);
    border-radius: 8px;
    color: rgb(248, 241, 226);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 10px;
    outline: none;
    text-align: center;
    transition: border-color 0.15s, background 0.15s;
}
.orn-chat-panel .srBrainFormInput:focus {
    border-color: rgb(201, 164, 92);
    background: rgba(201, 164, 92, 0.10);
}
/* Hide spinners on number inputs */
.orn-chat-panel .srBrainFormInput::-webkit-outer-spin-button,
.orn-chat-panel .srBrainFormInput::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.orn-chat-panel .srBrainFormInput[type=number] { -moz-appearance: textfield; }
.orn-chat-panel .srBrainFormError {
    color: rgb(212, 90, 71);
    font-size: 12px;
    margin-top: 4px;
    grid-column: 1 / -1;
}
.orn-chat-panel .srBrainFormCapacityError {
    color: rgb(212, 90, 71);
    font-size: 13px;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(212, 90, 71, 0.10);
    border: 1px solid rgba(212, 90, 71, 0.30);
    border-radius: 8px;
}
.orn-chat-panel .srBrainFormActions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}
.orn-chat-panel .srBrainFormSubmit {
    background: rgb(201, 164, 92);
    color: rgb(20, 14, 6);
    border: 0;
    border-radius: 999px;
    padding: 10px 22px;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s;
}
.orn-chat-panel .srBrainFormSubmit:hover { background: rgb(218, 178, 100); }
.orn-chat-panel .srBrainFormSubmit:disabled { opacity: 0.6; cursor: progress; }

/* ── Voice / audio icon on bubbles ──────────────────────────────
   Three states:
     default  — cream-gold pill, 🔊 glyph, hover lifts
     loading  — gold ring spins, ⌛ glyph, disabled cursor + pointer-events
     playing  — gold-filled disc, ⏹ glyph, pulse halo
   --------------------------------------------------------------- */
.orn-chat-panel .srVoiceIcon {
    position: relative;
    background: transparent;
    border: 1px solid rgba(201, 164, 92, 0.40);
    color: rgb(201, 164, 92);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}
.orn-chat-panel .srVoiceIcon-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.orn-chat-panel .srVoiceIcon:hover {
    border-color: rgb(201, 164, 92);
    background: rgba(201, 164, 92, 0.14);
    color: rgb(248, 241, 226);
    transform: scale(1.05);
}

/* Loading state — disabled + spinning gold ring */
.orn-chat-panel .srVoiceIcon.is-loading {
    cursor: progress;
    pointer-events: none;
    border-color: rgba(201, 164, 92, 0.25);
    background: rgba(201, 164, 92, 0.06);
    color: rgba(201, 164, 92, 0.7);
}
.orn-chat-panel .srVoiceIcon.is-loading::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid rgba(201, 164, 92, 0.18);
    border-top-color: rgb(201, 164, 92);
    animation: ornVoiceSpin 0.85s linear infinite;
}
.orn-chat-panel .srVoiceIcon.is-loading .srVoiceIcon-glyph {
    opacity: 0;            /* the spinning ring carries the loading signal */
}
@keyframes ornVoiceSpin {
    to { transform: rotate(360deg); }
}

/* Playing state — gold disc, dark glyph, pulsing halo so it's
   obvious which bubble is currently speaking */
.orn-chat-panel .srVoiceIcon.is-playing {
    background: rgb(201, 164, 92);
    color: rgb(20, 14, 6);
    border-color: rgb(201, 164, 92);
    transform: scale(1.05);
}
.orn-chat-panel .srVoiceIcon.is-playing::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(201, 164, 92, 0.5);
    animation: ornVoicePulse 1.4s ease-out infinite;
}
@keyframes ornVoicePulse {
    0%   { transform: scale(1);   opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0;   }
}

.orn-chat-panel .srVoiceIcon--bubbleFooter {
    margin-top: 10px;
    align-self: flex-start;
}

/* ── Quote summary card (variant=QUOTE) ───────────────────────────
   Priced breakup with labelled rows + sublabels + net/B2B totals +
   footnotes. emphasis ∈ PRIMARY / SECONDARY / SUBTOTAL / FOOTNOTE
   drives row weight + accent. Net + B2B totals get an extra top
   border to read as totals. */
.orn-chat-panel .srBrainQuoteSubtitle {
    color: rgb(184, 172, 146);
    font-size: 13px;
    line-height: 1.45;
    font-style: italic;
    margin-top: 6px;
    margin-bottom: 12px;
}
.orn-chat-panel .srBrainQuoteLines,
.orn-chat-panel .srBrainQuoteGroup {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    border-top: 1px solid rgba(201, 164, 92, 0.18);
}
.orn-chat-panel .srBrainQuoteGroupHeader {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(201, 164, 92, 0.85);
    padding: 10px 0 6px;
}
.orn-chat-panel .srBrainQuoteRow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(201, 164, 92, 0.10);
}
.orn-chat-panel .srBrainQuoteRow:last-child { border-bottom: 0; }
.orn-chat-panel .srBrainQuoteRowLabel {
    flex: 1 1 0;
    color: rgb(230, 220, 200);
    font-size: 14px;
    line-height: 1.4;
}
.orn-chat-panel .srBrainQuoteRowSublabel {
    color: rgba(217, 201, 164, 0.55);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    margin-left: 2px;
}
.orn-chat-panel .srBrainQuoteRowValue {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: rgb(248, 241, 226);
    font-size: 14px;
    white-space: nowrap;
}
.orn-chat-panel .srBrainQuoteRow.is-primary .srBrainQuoteRowLabelText {
    font-weight: 700;
    color: rgb(248, 241, 226);
}
.orn-chat-panel .srBrainQuoteRow.is-primary .srBrainQuoteRowValue {
    font-size: 15px;
}
.orn-chat-panel .srBrainQuoteRow.is-secondary .srBrainQuoteRowLabel {
    color: rgb(217, 201, 164);
}
.orn-chat-panel .srBrainQuoteRow.is-subtotal {
    border-top: 1px dashed rgba(201, 164, 92, 0.25);
}
.orn-chat-panel .srBrainQuoteRow.is-subtotal .srBrainQuoteRowLabelText {
    color: rgba(232, 218, 184, 0.85);
    font-style: italic;
}
.orn-chat-panel .srBrainQuoteRow.is-footnote .srBrainQuoteRowLabel,
.orn-chat-panel .srBrainQuoteRow.is-footnote .srBrainQuoteRowValue {
    color: rgba(184, 172, 146, 0.78);
    font-size: 12.5px;
    font-style: italic;
}

/* Net / B2B totals — gold-emphasised lines with extra top divider */
.orn-chat-panel .srBrainQuoteNetTotal,
.orn-chat-panel .srBrainQuoteB2bTotal {
    border-top: 1px solid rgba(201, 164, 92, 0.35);
    margin-top: 4px;
    padding-top: 12px;
}
.orn-chat-panel .srBrainQuoteNetTotal .srBrainQuoteRowLabelText,
.orn-chat-panel .srBrainQuoteB2bTotal .srBrainQuoteRowLabelText {
    font-family: Archivo, sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: rgb(248, 241, 226);
}
.orn-chat-panel .srBrainQuoteNetTotal .srBrainQuoteRowValue,
.orn-chat-panel .srBrainQuoteB2bTotal .srBrainQuoteRowValue {
    font-size: 18px;
    color: rgb(201, 164, 92);
}
.orn-chat-panel .srBrainQuoteB2bTotal .srBrainQuoteRowLabelText {
    color: rgba(217, 201, 164, 0.82);
}
.orn-chat-panel .srBrainQuoteB2bTotal .srBrainQuoteRowValue {
    color: rgba(201, 164, 92, 0.82);
}

.orn-chat-panel .srBrainQuoteFootnotes {
    margin-top: 12px;
    border-top: 1px solid rgba(201, 164, 92, 0.12);
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.orn-chat-panel .srBrainQuoteFootnote {
    color: rgba(184, 172, 146, 0.78);
    font-size: 12px;
    font-style: italic;
    line-height: 1.4;
}

/* Support points + caveat (ExplanationReasoner card) */
.orn-chat-panel .srBrainExplanationSupport {
    list-style: disc;
    padding-left: 18px;
    margin: 10px 0 0;
    color: rgb(230, 220, 200);
    font-size: 14px;
    line-height: 1.5;
}
.orn-chat-panel .srBrainExplanationSupport li { margin-bottom: 4px; }
.orn-chat-panel .srBrainExplanationCaveat {
    margin-top: 10px;
    font-style: italic;
    color: rgba(217, 201, 164, 0.78);
    font-size: 13px;
    line-height: 1.4;
}

/* Foot — chip strip + input bar */
.orn-chat-panel .srBrainFoot {
    flex-shrink: 0;
    border-top: 1px solid rgba(201, 164, 92, 0.16);
    padding: 14px 28px 22px;
}
.orn-chat-panel .srBrainChips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.orn-chat-panel .srBrainChips:empty { display: none; }
.orn-chat-panel .srBrainChip,
.orn-chat-panel .srBrainAction {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: left;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.orn-chat-panel .srBrainChip:hover,
.orn-chat-panel .srBrainAction:hover {
    border-color: rgb(201, 164, 92);
    background: rgba(201, 164, 92, 0.22);
    color: rgb(248, 241, 226);
}
.orn-chat-panel .srBrainChip.is-recommended,
.orn-chat-panel .srBrainAction.is-recommended {
    background: rgb(201, 164, 92);
    color: rgb(20, 14, 6);
    border-color: rgb(201, 164, 92);
}

/* Input bar at the bottom — same gold pill as other ORN inputs */
.orn-chat-panel .srBrainInputBar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgb(201, 164, 92);
    border-radius: 999px;
    padding: 4px 6px 4px 18px;
}
.orn-chat-panel .srBrainInput {
    flex: 1 1 0;
    background: transparent;
    border: 0;
    outline: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: rgb(20, 14, 6);
    padding: 10px 0;
}
.orn-chat-panel .srBrainInput::placeholder {
    color: rgba(20, 14, 6, 0.55);
    font-weight: 600;
}
.orn-chat-panel .srBrainSend {
    background: rgb(20, 14, 6);
    color: rgb(201, 164, 92);
    border: 0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

/* Thinking dots */
.orn-chat-panel .srBrainThinking {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    color: rgba(217, 201, 164, 0.72);
    font-size: 13.5px;
}
.orn-chat-panel .srBrainThinkingDots {
    display: inline-flex;
    gap: 4px;
}
.orn-chat-panel .srBrainThinkingDots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgb(201, 164, 92);
    animation: ornChatPanelBlink 1.2s infinite ease-in-out both;
}
.orn-chat-panel .srBrainThinkingDots span:nth-child(2) { animation-delay: 0.18s; }
.orn-chat-panel .srBrainThinkingDots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes ornChatPanelBlink {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%           { transform: scale(1);   opacity: 1; }
}
