:root {
  --sbhai-navy: #0b294a;
  --sbhai-navy-deep: #071d36;
  --sbhai-sun: #f7bd31;
  --sbhai-sky: #e9f4fb;
  --sbhai-paper: #ffffff;
  --sbhai-muted: #5b7187;
  --sbhai-border: rgba(11, 41, 74, .16);
}

/* Replace only True South's fixed WhatsApp launcher. Normal WhatsApp links in
   menus, pages, and the Solar-bhAI footer remain available. */
.tse-float-contact,
.sbhai-hide-legacy-whatsapp { display: none !important; }

#sbhai-root,
#sbhai-root * { box-sizing: border-box; }
#sbhai-root { --sbhai-admin-offset: 0px; position: fixed; z-index: 99999; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); isolation: isolate; color: var(--sbhai-navy); color-scheme: light; font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important; font-size: 16px !important; font-style: normal; font-synthesis: none; font-weight: 400; letter-spacing: normal; line-height: 1.5 !important; text-align: left; text-transform: none; }
body.admin-bar #sbhai-root { --sbhai-admin-offset: 32px; }
#sbhai-root h2,
#sbhai-root p { margin: 0; padding: 0; }
#sbhai-root button,
#sbhai-root input,
#sbhai-root textarea,
#sbhai-root select { font: inherit; letter-spacing: normal; text-transform: none; }
#sbhai-launcher { position: relative; display: grid; place-items: center; width: 88px !important; min-width: 88px !important; height: 88px !important; min-height: 88px !important; margin: 0 !important; padding: 0 !important; overflow: visible; border: 0 !important; border-radius: 50% !important; background: var(--sbhai-navy) !important; color: #fff !important; box-shadow: 0 12px 30px rgba(7,29,54,.28) !important; cursor: pointer; animation: sbhai-launcher-hop 5.6s ease-in-out infinite; transition: box-shadow .18s ease; will-change: transform; }
#sbhai-launcher:hover, #sbhai-launcher:focus { animation-play-state: paused; box-shadow: 0 16px 36px rgba(7,29,54,.34) !important; }
#sbhai-root.is-open #sbhai-launcher,
#sbhai-root.has-interacted #sbhai-launcher { animation: none !important; transform: translateY(0); will-change: auto; }
#sbhai-launcher:focus-visible, .sbhai-panel button:focus-visible, .sbhai-panel a:focus-visible, .sbhai-input:focus-visible, .sbhai-message:focus-visible { outline: 3px solid #f7bd31 !important; outline-offset: 3px !important; }
.sbhai-launcher__prompt { position: absolute !important; z-index: 2; right: calc(100% + 12px) !important; bottom: 8px !important; display: block !important; width: max-content !important; max-width: min(240px, calc(100vw - 116px)) !important; margin: 0 !important; padding: 9px 12px !important; visibility: visible !important; opacity: 1 !important; border: 1px solid rgba(11,41,74,.18) !important; border-radius: 12px 12px 3px 12px !important; background: #fff !important; color: var(--sbhai-navy) !important; box-shadow: 0 10px 26px rgba(7,29,54,.22) !important; font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important; font-size: 12px !important; font-style: normal !important; font-weight: 750 !important; letter-spacing: normal !important; line-height: 1.3 !important; text-align: left !important; text-transform: none !important; white-space: nowrap !important; pointer-events: none; }
.sbhai-launcher__prompt::after { position: absolute; right: -6px; bottom: 5px; width: 11px; height: 11px; border-right: 1px solid rgba(11,41,74,.14); border-bottom: 1px solid rgba(11,41,74,.14); background: #fff; content: ''; transform: rotate(-45deg); }
#sbhai-root.is-open .sbhai-launcher__prompt,
#sbhai-root.has-opened .sbhai-launcher__prompt { display: none !important; }
#sbhai-root.is-nudging .sbhai-launcher__prompt { animation: sbhai-prompt-nudge .85s ease-out 1; }
#sbhai-root.is-nudging #sbhai-launcher { animation: sbhai-launcher-hop .85s ease-out 1; }
#sbhai-root.is-nudging .sbhai-launcher__ring { animation-duration: .85s; }
.sbhai-launcher__ring { position: absolute; inset: -5px; border: 2px solid rgba(247,189,49,.86); border-radius: 50%; pointer-events: none; animation: sbhai-pulse 5.6s ease-out infinite; }
#sbhai-root.is-open .sbhai-launcher__ring,
#sbhai-root.has-interacted .sbhai-launcher__ring { animation: none; opacity: 0; }
.sbhai-robot { display: block; width: 84px; height: 84px; object-fit: contain; pointer-events: none; }
#sbhai-launcher::after { position: absolute; right: -2px; bottom: -1px; display: none; place-items: center; width: 18px; height: 18px; border: 2px solid #fff; border-radius: 50%; background: var(--sbhai-sun); color: var(--sbhai-navy); content: '✓'; font-size: 11px; font-weight: 900; }
#sbhai-root.is-human #sbhai-launcher::after { display: grid; }

.sbhai-panel { position: absolute; right: 0; bottom: 102px; display: grid; grid-template-rows: auto minmax(150px, 1fr) auto auto auto auto; width: min(420px, calc(100vw - 24px)) !important; max-width: 420px !important; height: min(680px, calc(100vh - 130px - var(--sbhai-admin-offset))) !important; height: min(680px, calc(100dvh - 130px - var(--sbhai-admin-offset))) !important; min-height: min(460px, calc(100vh - 130px - var(--sbhai-admin-offset))); overflow: hidden; contain: layout paint; border: 1px solid var(--sbhai-border); border-radius: 16px; background: var(--sbhai-paper); box-shadow: 0 20px 56px rgba(7,29,54,.28); color: var(--sbhai-navy); font-size: 14px !important; line-height: 1.45 !important; }
.has-supplementary .sbhai-panel { display: flex; flex-direction: column; }
.has-supplementary .sbhai-messages,
.has-supplementary .sbhai-actions,
.has-supplementary .sbhai-form,
.has-supplementary .sbhai-panel__footer { display: none; }
.has-supplementary .sbhai-consent-panel:not([hidden]) { flex: 1 1 auto; max-height: none; }
.sbhai-panel[hidden] { display: none; }
.sbhai-panel__header { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; min-height: 68px; padding: 10px 12px; background: var(--sbhai-navy); color: #fff; }
.sbhai-panel__header .sbhai-robot { width: 42px; height: 42px; }
#sbhai-root .sbhai-title { margin: 0 !important; color: #fff !important; font-size: 17px !important; font-weight: 800 !important; letter-spacing: -.01em !important; line-height: 1.2 !important; }
#sbhai-root .sbhai-status { display: block; margin-top: 3px; color: #d7e6f3 !important; font-size: 12px !important; font-weight: 600; line-height: 1.25 !important; }
.sbhai-status[data-kind="human"] { color: #ffdc73; }
.sbhai-status[data-kind="error"] { color: #ffd3cf; }
.sbhai-header-button { display: grid !important; place-items: center; width: 40px !important; min-width: 40px !important; height: 40px !important; min-height: 40px !important; margin: 0 !important; padding: 0 !important; border: 1px solid transparent !important; border-radius: 8px !important; background: transparent !important; color: #fff !important; box-shadow: none !important; cursor: pointer; font-size: 19px !important; line-height: 1 !important; }
.sbhai-header-button:hover { border-color: rgba(255,255,255,.16) !important; background: rgba(255,255,255,.12) !important; }
.sbhai-messages { display: flex; flex-direction: column; gap: 8px; min-height: 0; padding: 11px 12px; overflow: auto; overscroll-behavior: contain; scroll-padding-block: 12px; background: #f7fafc; scrollbar-width: thin; }
.sbhai-messages::before { flex: 1 0 0; min-height: 0; content: ''; }
.sbhai-message { flex: 0 0 auto; max-width: 92%; padding: 9px 11px; border: 1px solid var(--sbhai-border); border-radius: 12px; background: #fff; color: var(--sbhai-navy); font-size: 14px !important; line-height: 1.45 !important; }
.sbhai-message--visitor { align-self: flex-end; border-color: var(--sbhai-navy); background: var(--sbhai-navy); color: #fff; }
.sbhai-message--human { border-color: #af7d13; background: #fff9e9; }
.sbhai-message__label { display: block; margin-bottom: 4px; color: #49647e; font-size: 11px !important; font-weight: 800; letter-spacing: .04em; line-height: 1.25 !important; text-transform: uppercase; }
#sbhai-root .sbhai-message p { margin: 0 !important; color: inherit !important; font: inherit !important; line-height: inherit !important; white-space: pre-wrap; }
#sbhai-root .sbhai-message .sbhai-message__question { margin-top: 8px !important; padding-top: 8px !important; border-top: 1px solid rgba(11,41,74,.12); color: #173f62 !important; font-weight: 700 !important; }
.sbhai-badge { display: inline-block; margin-top: 8px; padding: 3px 6px; border-radius: 4px; background: #fff0c7; color: #6b4900; font-size: 11px !important; font-weight: 700; }
.sbhai-citation { display: block; margin-top: 8px; color: inherit !important; font-size: 12px !important; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.sbhai-attachment-chip { display: block; margin-top: 7px; padding: 7px 9px; overflow: hidden; border: 1px solid #9bbfd5; border-radius: 8px; background: var(--sbhai-sky); color: var(--sbhai-navy); font-size: 12px !important; font-weight: 700; line-height: 1.3 !important; text-overflow: ellipsis; white-space: nowrap; }
.sbhai-upload-card { width: min(92%, 300px); }
.sbhai-upload-card__name { overflow: hidden; font-weight: 700 !important; text-overflow: ellipsis; white-space: nowrap !important; }
.sbhai-upload-card__progress { display: block; width: 100%; height: 7px; margin: 8px 0 5px; accent-color: var(--sbhai-sun); }
.sbhai-upload-stages { display: grid; gap: 4px; margin: 8px 0 6px; padding: 0; list-style: none; }
.sbhai-upload-stage { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 6px; align-items: center; color: #5b7187; font-size: 12.5px; font-weight: 650; line-height: 1.35; }
.sbhai-upload-stage__marker { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid #b7c7d3; border-radius: 50%; color: #5b7187; font-size: 10px; font-weight: 850; line-height: 1; }
.sbhai-upload-stage[data-state="current"] { color: var(--sbhai-navy); font-weight: 800; }
.sbhai-upload-stage[data-state="current"] .sbhai-upload-stage__marker { border-color: var(--sbhai-sun); background: #fff4d3; color: #725000; }
.sbhai-upload-stage[data-state="complete"] { color: #245d4c; }
.sbhai-upload-stage[data-state="complete"] .sbhai-upload-stage__marker { border-color: #3f806d; background: #eaf8f2; color: #205b49; }
.sbhai-upload-stage[data-state="error"] { color: #8b251e; font-weight: 800; }
.sbhai-upload-stage[data-state="error"] .sbhai-upload-stage__marker { border-color: #b93d33; background: #fff0ee; color: #8b251e; }
.sbhai-upload-card__detail { display: block; color: #49647e; font-size: 12px !important; font-weight: 700; line-height: 1.4 !important; }
.sbhai-upload-card.is-error { border-color: #c75a51; background: #fffafa; }
#sbhai-root .sbhai-upload-card__retry { margin-top: 8px !important; }
#sbhai-root .sbhai-upload-card__retry[hidden] { display: none !important; }
.sbhai-typing { width: fit-content; min-width: 150px; }
.sbhai-typing__text { color: #49647e; font-size: 12.5px; font-weight: 700; }
.sbhai-typing__dots { display: inline-flex; gap: 3px; align-items: center; margin-left: 7px; }
.sbhai-typing__dots i { width: 5px; height: 5px; border-radius: 50%; background: #58738c; animation: sbhai-typing-dot 1s ease-in-out infinite; }
.sbhai-typing__dots i:nth-child(2) { animation-delay: .14s; }
.sbhai-typing__dots i:nth-child(3) { animation-delay: .28s; }
.sbhai-actions { display: flex; flex-wrap: wrap; gap: 6px; max-height: 108px; padding: 0 12px 9px; overflow-y: auto; background: #fff; }
#sbhai-root .sbhai-action { display: inline-flex !important; align-items: center; width: auto !important; min-width: 0 !important; min-height: 40px !important; margin: 0 !important; padding: 8px 12px !important; border: 1px solid #8fb7d0 !important; border-radius: 999px !important; background: var(--sbhai-sky) !important; color: var(--sbhai-navy) !important; box-shadow: none !important; cursor: pointer; font-size: 12.5px !important; font-weight: 750 !important; line-height: 1.3 !important; text-align: left; }
#sbhai-root .sbhai-action:hover { border-color: var(--sbhai-navy) !important; background: #dbeefa !important; }
#sbhai-root .sbhai-actions .sbhai-action { min-height: 40px !important; padding: 7px 10px !important; font-size: 12.5px !important; }
.sbhai-form { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 8px; align-items: end; padding: 10px 12px; border-top: 1px solid var(--sbhai-border); background: #fff; }
.sbhai-attach { display: grid !important; place-items: center; width: 42px !important; min-width: 42px !important; height: 46px !important; min-height: 46px !important; margin: 0 !important; padding: 8px !important; border: 1px solid #9db5c6 !important; border-radius: 9px !important; background: #fff !important; color: var(--sbhai-navy) !important; box-shadow: none !important; cursor: pointer; }
.sbhai-attach:hover { border-color: var(--sbhai-navy); background: var(--sbhai-sky); }
.sbhai-attach:disabled, .sbhai-footer-button:disabled { cursor: not-allowed; opacity: .5; }
.sbhai-attach svg { width: 19px; height: 19px; }
#sbhai-root .sbhai-input { width: 100% !important; min-width: 0 !important; height: 46px !important; min-height: 46px !important; max-height: 96px !important; margin: 0 !important; padding: 10px 11px !important; resize: vertical; border: 1px solid #829fb5 !important; border-radius: 9px !important; background: #fff !important; color: var(--sbhai-navy) !important; box-shadow: none !important; font-size: 14px !important; font-weight: 400 !important; line-height: 1.4 !important; }
#sbhai-root .sbhai-input::placeholder { color: #60778c; opacity: 1; }
.sbhai-send { display: grid !important; place-items: center; width: 42px !important; min-width: 42px !important; height: 46px !important; min-height: 46px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 9px !important; background: var(--sbhai-sun) !important; color: var(--sbhai-navy) !important; box-shadow: none !important; cursor: pointer; font-size: 22px !important; font-weight: 900 !important; line-height: 1 !important; }
.sbhai-send:disabled { cursor: wait; opacity: .55; }
.sbhai-panel__footer { display: grid; gap: 7px; padding: 0 12px 11px; color: #49647e; font-size: 12px !important; line-height: 1.45 !important; }
.sbhai-panel__footer > span:last-child { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
#sbhai-root .sbhai-panel__footer a { color: #0b3e68 !important; font-size: inherit !important; font-weight: 750; line-height: inherit !important; text-decoration: underline; text-underline-offset: 2px; }
#sbhai-root .sbhai-footer-button, #sbhai-root .sbhai-link-button { display: inline !important; width: auto !important; min-width: 0 !important; min-height: 28px !important; margin: 0 !important; padding: 3px 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; color: #0b3e68 !important; box-shadow: none !important; cursor: pointer; font-size: inherit !important; font-weight: 750 !important; line-height: inherit !important; text-decoration: underline; text-underline-offset: 2px; }
.sbhai-footer-button + .sbhai-footer-button::before, .sbhai-footer-button + a::before { display: none; }
.sbhai-consent-panel { max-height: 310px; padding: 14px; overflow: auto; border-top: 1px solid var(--sbhai-border); background: #fff9e9; color: var(--sbhai-navy); font-size: 13px !important; line-height: 1.5 !important; }
.sbhai-consent-panel p { margin: 0 0 9px; }
.sbhai-bill-disclaimer { max-width: 42ch; font-weight: 650; }
.sbhai-bill-contact-hint { padding: 9px 10px; border-radius: 7px; background: #fff; color: var(--sbhai-navy); font-weight: 700; }
.sbhai-consent-panel form { display: grid; gap: 8px; }
.sbhai-consent-panel label { display: grid; gap: 3px; font-weight: 700; }
#sbhai-root .sbhai-consent-panel input, #sbhai-root .sbhai-consent-panel select { width: 100%; min-height: 44px !important; margin: 0 !important; padding: 8px 9px !important; border: 1px solid #829fb5 !important; border-radius: 7px !important; background: #fff !important; color: var(--sbhai-navy) !important; box-shadow: none !important; font-size: 14px !important; }
.sbhai-consent-panel .sbhai-consent-check { display: flex; align-items: flex-start; gap: 7px; font-weight: 500; }
#sbhai-root .sbhai-consent-panel .sbhai-consent-check input { width: 18px !important; min-height: 18px !important; margin-top: 2px !important; }
.sbhai-lead-step-status { color: #49647e; font-size: 11px !important; font-weight: 750; }
.sbhai-lead-form-status { padding: 8px 9px !important; border: 1px solid #c44435; border-radius: 7px; background: #fff4f2; color: #7f2119; font-size: 11.5px !important; font-weight: 700; line-height: 1.35 !important; }
.sbhai-lead-form-status[data-kind="progress"] { border-color: #9bbfd5; background: var(--sbhai-sky); color: var(--sbhai-navy); }
.sbhai-lead-step { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.sbhai-lead-step[hidden] { display: none; }
.sbhai-lead-step legend { width: 100%; margin: 0 0 2px; padding: 0; color: var(--sbhai-navy); font-size: 13px; font-weight: 800; line-height: 1.35; }
.sbhai-lead-step small { display: block; color: #49647e; font-size: 11px; line-height: 1.35; }
.sbhai-lead-step-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

@keyframes sbhai-pulse { 0%, 70%, 100% { opacity: 0; transform: scale(.88); } 18% { opacity: .8; transform: scale(1.05); } }
@keyframes sbhai-prompt-nudge { 0%, 100% { transform: translateX(0); } 35% { transform: translateX(-7px); } 65% { transform: translateX(-3px); } }
@keyframes sbhai-launcher-hop { 0%, 70%, 100% { transform: translateY(0); } 76% { transform: translateY(-10px); } 82% { transform: translateY(0); } 87% { transform: translateY(-4px); } 92% { transform: translateY(0); } }
@keyframes sbhai-typing-dot { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
@media (max-width: 782px) { body.admin-bar #sbhai-root { --sbhai-admin-offset: 46px; } }
@media (max-width: 480px) { #sbhai-root { right: max(8px, env(safe-area-inset-right)); bottom: max(8px, env(safe-area-inset-bottom)); } #sbhai-launcher { width: 80px !important; min-width: 80px !important; height: 80px !important; min-height: 80px !important; } #sbhai-launcher > .sbhai-robot { width: 76px; height: 76px; } .sbhai-launcher__prompt { max-width: calc(100vw - 116px); font-size: 12px !important; } .sbhai-panel { bottom: 94px; width: calc(100vw - 16px) !important; height: calc(100vh - 118px - var(--sbhai-admin-offset)) !important; height: calc(100dvh - 118px - var(--sbhai-admin-offset)) !important; min-height: 0; border-radius: 14px; } .sbhai-panel__header { padding-inline: 10px; } .sbhai-messages { padding: 12px; } .sbhai-actions { padding-inline: 12px; } .sbhai-form { padding-inline: 10px; } }
@media (max-height: 620px) { .sbhai-panel { grid-template-rows: auto minmax(120px, 1fr) auto auto auto auto; min-height: 0; } .sbhai-panel__header { min-height: 60px; } .sbhai-panel__header .sbhai-robot { width: 36px; height: 36px; } }
@media (prefers-reduced-motion: reduce) { #sbhai-root, #sbhai-root::before, #sbhai-root::after, #sbhai-root *, #sbhai-root *::before, #sbhai-root *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } #sbhai-launcher { animation: none !important; transform: none !important; will-change: auto; } .sbhai-launcher__ring { display: none; } }
