/* Chat widget in the new look (owner 2026-11-13: "update its style to match new site").
   Overrides only: the widget's own stylesheet (website/ai-assistant/assets/frontend/css/widget.css, chat tab) is
   untouched, and this file loads with the new look. The widget sets --soai-color inline from its colour setting,
   so the token is forced here.
   Roles: deep green = the widget's chrome (launcher, header); moss = things the visitor does (send, own messages,
   primary choice); warm paper = what we say; honey = notices. */
body #soai-chat-widget {
  --soai-color: #1f3026 !important;
  --soai-ink: #1f2a22;
  --soai-muted: #59655d;
  --soai-line: #e4dfd4;
  --soai-paper: #f4f0e8;
  --soai-cream: #faf9f6;
  --soai-moss: #4a654d;
  --soai-moss-dark: #3d5540;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Panel ---------- */
body #soai-chat-panel { background: #fff; border-color: var(--soai-line); box-shadow: 0 18px 48px -18px rgba(31, 48, 38, .45), 0 2px 8px rgba(31, 48, 38, .08); }
body #soai-chat-header { background: #1f3026; }
body #soai-chat-header .soai-header-info strong, body #soai-header-title { font-family: var(--so-font-display, Gelasio, Georgia, serif); font-size: 14px; font-weight: 600; letter-spacing: 0; }
body #soai-chat-messages { background: #fff; }

/* Phone and "talk to a human" strip under the header */
body #soai-chat-widget .soai-contact-bar { background: var(--soai-cream); border-bottom-color: var(--soai-line); }
body #soai-chat-widget .soai-contact-bar-phone { background: var(--soai-moss); color: #fff; }
body #soai-chat-widget .soai-contact-bar-phone:hover { background: var(--soai-moss-dark); }
body #soai-chat-widget .soai-contact-bar-ticket { border-left-color: var(--soai-line); color: var(--soai-ink); }
body #soai-chat-widget .soai-contact-bar-ticket:hover { background: var(--soai-paper); color: var(--soai-moss-dark); }

/* ---------- Messages ---------- */
body #soai-chat-widget .soai-message.assistant { background: var(--soai-paper); color: var(--soai-ink); }
body #soai-chat-widget .soai-message.user, body #soai-chat-widget .soai-message.soai-message-with-image { background: var(--soai-moss); color: #fff; }
/* Links: reply text carries product and builder links, so they must read as links on both bubble colours. */
body #soai-chat-widget .soai-message.assistant a { color: #35503a; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
body #soai-chat-widget .soai-message.assistant a:hover { color: var(--soai-color); opacity: 1; }
body #soai-chat-widget .soai-message.user a { color: #fff; }
body #soai-chat-widget .soai-message.system { background: #f6efe2; color: #6d5220; }
/* Option lists in a reply (the chat-first opener): room to tap each line on a phone. */
body #soai-chat-widget .soai-message.assistant ul, body #soai-chat-widget .soai-message.assistant ol { margin: 8px 0 2px; padding-left: 20px; }
body #soai-chat-widget .soai-message.assistant ul { list-style: disc; }
body #soai-chat-widget .soai-message.assistant ol { list-style: decimal; }
body #soai-chat-widget .soai-message.assistant li { margin: 0 0 6px; line-height: 1.45; }
body #soai-chat-widget .soai-message.assistant li::marker { color: var(--soai-moss); }

/* ---------- Choices ---------- */
body #soai-chat-widget .soai-quick-reply { background: #fff; border-color: #d3ccbc; color: var(--soai-ink); }
body #soai-chat-widget .soai-quick-reply:hover { background: var(--soai-cream); border-color: var(--soai-moss); color: var(--soai-moss-dark); }
body #soai-chat-widget .soai-quick-reply-primary, body #soai-chat-widget .soai-quick-reply-primary:hover { background: var(--soai-moss); border-color: var(--soai-moss); color: #fff; }
body #soai-chat-widget .soai-quick-reply-primary:hover { background: var(--soai-moss-dark); border-color: var(--soai-moss-dark); }
body #soai-chat-widget .soai-confirm-yes { background: var(--soai-moss); }
body #soai-chat-widget .soai-confirm-yes:hover { background: var(--soai-moss-dark); }
body #soai-chat-widget .soai-confirm-no { border-color: #d3ccbc; color: var(--soai-ink); }
body #soai-chat-widget .soai-confirm-no:hover { background: var(--soai-paper); }
body #soai-chat-widget .soai-quick-reply:focus-visible, body #soai-chat-widget .soai-welcome-btn:focus-visible,
body #soai-chat-widget .soai-header-btn:focus-visible, body #soai-chat-widget .soai-tool-btn:focus-visible,
body #soai-chat-send:focus-visible, body #soai-chat-bubble:focus-visible { outline: 2px solid #b8976a; outline-offset: 2px; }

/* ---------- Typing ---------- */
body #soai-chat-widget .soai-typing-label { color: var(--soai-muted); }
body #soai-chat-widget .soai-typing-dots { background: var(--soai-paper); }
body #soai-chat-widget .soai-typing-dots span { background: #8a948d; }

/* ---------- Composer ---------- */
body #soai-chat-form { background: #fff; border-top-color: var(--soai-line); }
body #soai-chat-input { background: var(--soai-cream); border-color: var(--soai-line); color: var(--soai-ink); }
body #soai-chat-input::placeholder { color: #6d776f; }
body #soai-chat-input:focus { background: #fff; border-color: var(--soai-moss); box-shadow: 0 0 0 3px rgba(74, 101, 77, .16); }
body #soai-chat-send { background: var(--soai-moss); }
body #soai-chat-send:hover { background: var(--soai-moss-dark); }
body #soai-chat-widget .soai-tool-btn { color: #6d776f; }
body #soai-chat-widget .soai-tool-btn:hover { background: var(--soai-paper); color: var(--soai-ink); }
body #soai-emoji-picker { border-color: var(--soai-line); }
body #soai-chat-widget .soai-emoji:hover { background: var(--soai-paper); }
body #soai-chat-widget .soai-image-preview img { border-color: var(--soai-line); }

/* ---------- "Talk to a human" form ---------- */
body #soai-chat-widget .soai-la-intro { color: var(--soai-ink); }
body #soai-chat-widget .soai-la-phone { background: var(--soai-moss); }
body #soai-chat-widget .soai-la-phone:hover { background: var(--soai-moss-dark); }
body #soai-chat-widget .soai-la-or::before, body #soai-chat-widget .soai-la-or::after { background: var(--soai-line); }
body #soai-chat-widget .soai-la-form label { color: var(--soai-muted); }
body #soai-chat-widget .soai-la-form input, body #soai-chat-widget .soai-la-form textarea { border-color: #d3ccbc; color: var(--soai-ink); }
body #soai-chat-widget .soai-la-form input:focus, body #soai-chat-widget .soai-la-form textarea:focus { border-color: var(--soai-moss); }
body #soai-chat-widget .soai-la-opt { background: var(--soai-cream); border-color: var(--soai-line); color: var(--soai-ink) !important; }
body #soai-chat-widget .soai-la-opt:has(input:checked) { background: #ecf0ea; border-color: var(--soai-moss); }
body #soai-chat-widget .soai-la-opt input[type="radio"] { accent-color: var(--soai-moss); }

/* ---------- Welcome card and nudge (closed state) ---------- */
body #soai-welcome-card, body #soai-chat-nudge { border: 1px solid var(--soai-line); box-shadow: 0 14px 36px -16px rgba(31, 48, 38, .4); color: var(--soai-ink); }
body #soai-welcome-message { color: var(--soai-ink); }
body #soai-chat-widget .soai-welcome-meta strong { font-family: var(--so-font-display, Gelasio, Georgia, serif); font-weight: 600; }
body #soai-chat-widget .soai-welcome-btn { background: #fff; border-color: #d3ccbc; color: var(--soai-ink); }
body #soai-chat-widget .soai-welcome-btn:hover { background: var(--soai-cream); border-color: var(--soai-moss); color: var(--soai-moss-dark); }
body #soai-chat-widget .soai-welcome-btn:nth-child(1), body #soai-chat-widget .soai-welcome-btn:nth-child(1):hover { background: var(--soai-moss); border-color: var(--soai-moss); color: #fff; }
body #soai-chat-widget .soai-welcome-btn:nth-child(1):hover { background: var(--soai-moss-dark); border-color: var(--soai-moss-dark); }
body #soai-chat-widget .soai-welcome-live-group { border-top-color: var(--soai-line); }
body #soai-chat-widget .soai-welcome-live-label { color: var(--soai-muted); }
body #soai-chat-widget .soai-welcome-live-call { background: var(--soai-moss); }
body #soai-chat-widget .soai-welcome-live-call:hover { background: var(--soai-moss-dark); }
body #soai-chat-widget .soai-welcome-live-agent { border-color: #d3ccbc; color: var(--soai-ink); }
body #soai-chat-widget .soai-welcome-live-agent:hover { background: var(--soai-cream); border-color: var(--soai-moss); color: var(--soai-moss-dark); }
body #soai-nudge-close, body #soai-welcome-close { color: #6d776f; }
body #soai-nudge-close:hover, body #soai-welcome-close:hover { color: var(--soai-ink); }

/* ---------- Proactive bubbles above the launcher ---------- */
body .soai-bubble { --soai-b-txt: #1f2a22; --soai-b-action: #35503a; --soai-b-dot: #4a654d; --soai-b-glass: rgba(250, 249, 246, .78); border-color: rgba(228, 223, 212, .9); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

/* Product-page highlight ring drawn by the chat when it points at a builder step */
body .soai-highlight { outline-color: #4a654d; }
