/* "Ask TBUTECH" assistant (landing/blocks/assistant). Stays below the demo form (#tbutech-demo-modal, z-index 2147483000). */
.tba{--tba-blue:#1183FD;--tba-blue-dark:#0A6ED8;--tba-ink:#1D1D1F;--tba-muted:#6C6C6C;--tba-line:#DCE3EE;--tba-soft:#F7FAFE;--tba-bottom:24px;font-family:'Inter',system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--tba-ink)}
.tba *{box-sizing:border-box}
.tba-fab:focus-visible,.tba-talk:focus-visible,.tba-end:focus-visible,.tba-send:focus-visible,.tba-x:focus-visible,.tba-demo:focus-visible{outline:3px solid #9CC9FF;outline-offset:2px}
/* Launcher H. The pill uses the landing's own button colour and height (.contact-us-button / .get-updates-button: #1182FC,
   52 px, round ends; hover = the mobile landing's --m-blue-dark #0A6FDC). */
.tba-fab{position:fixed;right:24px;bottom:var(--tba-bottom);z-index:2147482000;display:flex;align-items:center;height:84px;padding:0 0 0 24px;border:0;background:transparent;font:inherit;cursor:pointer;transition:transform .2s,bottom .2s}
.tba-fab:hover{transform:translateY(-2px)}
.tba-fab:focus-visible{outline:3px solid #9CC9FF;outline-offset:4px;border-radius:42px}
.tba.is-open .tba-fab,body.is-locked .tba-fab{display:none}
.tba-fab-pill{display:flex;align-items:center;height:52px;padding:0 24px 0 72px;border-radius:26px;background:#1182FC;box-shadow:0 10px 26px rgba(17,130,252,.34);box-sizing:border-box;transition:background-color .15s ease}
.tba-fab:hover .tba-fab-pill{background:#0A6FDC}
.tba-fab-text{display:flex;flex-direction:column;gap:3px;text-align:left;color:#fff}
.tba-fab-text b{font-size:15px;font-weight:700;line-height:1.2}
.tba-fab-sub{display:flex;align-items:center;gap:5px;font-size:12px;font-weight:500;line-height:1.2;white-space:nowrap}
.tba-fab-photo{position:absolute;left:0;top:0;width:84px;height:84px;border-radius:50%;box-shadow:0 6px 18px rgba(15,23,42,.20)}
.tba-fab-photo picture{display:block;width:100%;height:100%}
.tba-fab-photo .tba-ava{border:4px solid #fff;box-sizing:border-box}
.tba-mic{position:absolute;left:60px;bottom:2px;width:24px;height:24px;border-radius:50%;background:#fff;color:#1182FC;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px rgba(15,23,42,.2)}
@media (max-width:640px){
    .tba-fab{right:16px;height:78px;padding-left:20px}
    .tba-fab-pill{height:50px;padding:0 18px 0 64px;border-radius:25px}
    .tba-fab-text b{font-size:14px}
    .tba-fab-sub{font-size:11px}
    .tba-fab-photo{width:78px;height:78px}
    .tba-fab-photo .tba-ava{border-width:3px}
    .tba-mic{left:56px;bottom:1px;width:22px;height:22px}
}
.tba-ava{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover;background:#EEF3FA}
.tba-head-ava{flex:none;display:block;width:44px;height:44px;border-radius:50%;transition:box-shadow .2s}
.tba[data-voice="speaking"] .tba-head-ava{box-shadow:0 0 0 3px #fff,0 0 0 5px var(--tba-blue)}
.tba-badge{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:10px;background:#E8F2FF;color:var(--tba-blue);font-size:11px;font-weight:600;vertical-align:2px}
.tba-row{display:flex;align-items:flex-end;gap:8px;max-width:92%}
.tba-row .tba-msg{max-width:none;min-width:0}
.tba-msg-ava{flex:none;display:block;width:28px;height:28px;border-radius:50%}
.tba-panel{position:fixed;right:24px;bottom:var(--tba-bottom);z-index:2147482001;width:400px;max-width:calc(100vw - 32px);height:760px;max-height:calc(100vh - var(--tba-bottom) - 16px);display:flex;flex-direction:column;background:#fff;border:1px solid var(--tba-line);border-radius:20px;box-shadow:0 30px 70px -24px rgba(17,131,253,.35);overflow:hidden}
.tba-panel[hidden]{display:none!important}
.tba-head{display:flex;align-items:center;gap:12px;padding:12px 14px 10px 18px;border-bottom:1px solid var(--tba-line)}
.tba-head-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.tba-head-text strong{font-size:16px;font-weight:700}
.tba-head-text span{font-size:13px;color:var(--tba-muted)}
.tba-x{flex:none;width:34px;height:34px;border-radius:50%;border:none;background:#EEF3FA;color:var(--tba-ink);display:flex;align-items:center;justify-content:center;cursor:pointer}
.tba-x:hover{background:#E1EAF6}
.tba-log{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:var(--tba-soft)}
.tba-msg{max-width:85%;padding:10px 13px;border-radius:14px;font-size:14px;line-height:1.5;white-space:pre-wrap;word-wrap:break-word}
.tba-msg--assistant{align-self:flex-start;background:#fff;border:1px solid var(--tba-line);border-bottom-left-radius:4px}
.tba-msg--user{align-self:flex-end;background:var(--tba-blue);color:#fff;border-bottom-right-radius:4px}
.tba-msg--note{align-self:center;max-width:100%;padding:4px 8px;background:none;color:var(--tba-muted);font-size:12px;text-align:center}
.tba-msg.is-pending{opacity:.6}
.tba-demo{align-self:flex-start;margin-left:36px;min-height:40px;padding:0 18px;border:none;border-radius:20px;background:var(--tba-blue);color:#fff;font:inherit;font-size:14px;font-weight:600;cursor:pointer}
.tba-demo:hover{background:var(--tba-blue-dark)}
.tba-consent{margin:0;padding:7px 16px 0;border-top:1px solid var(--tba-line);font-size:11px;line-height:1.35;color:var(--tba-muted)}
.tba-consent a{color:var(--tba-blue)}
.tba-consent[hidden]{display:none!important}
.tba-consent + .tba-voice{border-top:none;padding-top:6px}
.tba-voice{display:flex;align-items:center;gap:12px;padding:8px 16px;border-top:1px solid var(--tba-line)}
.tba-talk{flex:none;display:flex;align-items:center;gap:8px;height:44px;padding:0 18px 0 12px;border:none;border-radius:22px;background:var(--tba-blue);color:#fff;font:inherit;font-size:15px;font-weight:600;cursor:pointer}
.tba-talk:hover{background:var(--tba-blue-dark)}
.tba-talk:disabled{opacity:.7;cursor:wait}
.tba-talk[data-state="live"]{background:#E8F2FF;color:var(--tba-blue);cursor:default}
.tba-orb{width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 0 0 0 rgba(255,255,255,.6)}
.tba-talk[data-state="live"] .tba-orb{background:var(--tba-blue)}
.tba-talk[data-state="connecting"] .tba-orb{animation:tba-pulse 1s infinite}
.tba-talk[data-mode="listening"] .tba-orb{animation:tba-pulse 1.6s infinite}
.tba-talk[data-mode="speaking"] .tba-orb{animation:tba-speak .5s infinite alternate}
@keyframes tba-pulse{0%{box-shadow:0 0 0 0 rgba(17,131,253,.45)}100%{box-shadow:0 0 0 10px rgba(17,131,253,0)}}
@keyframes tba-speak{from{transform:scale(.75)}to{transform:scale(1.1)}}
.tba-status{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;font-size:13px;color:var(--tba-muted)}
.tba-timer{font-variant-numeric:tabular-nums;font-size:12px}
.tba-timer[hidden],.tba-end[hidden],.tba-voice[hidden]{display:none!important}
.tba-end{flex:none;height:36px;padding:0 16px;border:1px solid #F2B8B8;border-radius:18px;background:#FFFBFB;color:#C25555;font:inherit;font-size:14px;font-weight:600;cursor:pointer}
.tba-form{display:flex;align-items:flex-end;gap:8px;margin:0;padding:0 16px 8px}
.tba-input{flex:1;min-width:0;font:inherit;font-size:14px;color:var(--tba-ink);background:var(--tba-soft);border:1px solid var(--tba-line);border-radius:12px;padding:10px 13px;outline:none;display:block;resize:none;line-height:20px;min-height:60px;max-height:120px;overflow-y:auto;overflow-wrap:break-word;white-space:pre-wrap}
.tba-input::placeholder{color:#9AA3B2}
.tba-input:focus{border-color:var(--tba-blue);box-shadow:0 0 0 3px rgba(17,131,253,.18);background:#fff}
.tba-send{flex:none;width:44px;height:44px;border:none;border-radius:12px;background:var(--tba-blue);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer}
.tba-send:disabled{opacity:.6;cursor:wait}
.tba-legal{margin:0;padding:0 16px 9px;font-size:10.5px;line-height:1.35;color:var(--tba-muted)}
.tba-legal a{color:var(--tba-blue)}
.tba-legal-live,.tba-panel.is-human .tba-legal:not(.tba-legal-live){display:none}
.tba-panel.is-human .tba-legal-live{display:block}
@media (max-width:600px){
    .tba-panel{right:0;left:0;bottom:0;width:100%;max-width:none;height:92vh;height:92dvh;max-height:none;border-radius:20px 20px 0 0;border-bottom:none}
    .tba-input{font-size:16px} /* no zoom on iOS */
}
@media (prefers-reduced-motion:reduce){.tba-orb{animation:none!important}}
/* Previous chats */
.tba-hist-btn[hidden]{display:none!important}
.tba-panel.is-history .tba-log,.tba-panel.is-history .tba-voice,.tba-panel.is-history .tba-form,.tba-panel.is-history .tba-consent,.tba-panel.is-history .tba-legal{display:none!important}
.tba-history{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--tba-soft)}
.tba-history[hidden]{display:none!important}
.tba-history-top{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 16px;border-bottom:1px solid var(--tba-line);background:#fff}
.tba-history-top b{font-size:14px;font-weight:700}
.tba-history-back{display:inline-flex;align-items:center;gap:4px;height:34px;padding:0 10px 0 4px;border:none;border-radius:17px;background:none;color:var(--tba-blue);font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.tba-history-back:hover{background:#EEF3FA}
.tba-history-body{flex:1;overflow-y:auto;padding:12px 16px;display:flex;flex-direction:column;gap:8px}
.tba-history-item{display:flex;flex-direction:column;gap:4px;width:100%;padding:11px 13px;border:1px solid var(--tba-line);border-radius:12px;background:#fff;color:var(--tba-ink);font:inherit;text-align:left;cursor:pointer}
.tba-history-item:hover{border-color:#B9CCE6}
.tba-history-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--tba-muted)}
.tba-history-tag{padding:1px 8px;border-radius:10px;background:#E8F2FF;color:var(--tba-blue);font-size:11px;font-weight:600}
.tba-history-tag.text{background:#EEF3FA;color:var(--tba-muted)}
.tba-history-first{font-size:14px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tba-history-empty{margin:24px 0;text-align:center;font-size:14px;color:var(--tba-muted)}
.tba-history-foot{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 16px 12px;border-top:1px solid var(--tba-line);background:#fff}
.tba-history-foot[hidden],.tba-history-confirm[hidden],.tba-history-clear[hidden]{display:none!important}
.tba-history-foot small{font-size:11px;color:var(--tba-muted)}
.tba-history-clear{height:34px;padding:0 12px;border:none;background:none;color:#C25555;font:inherit;font-size:13px;font-weight:600;cursor:pointer;border-radius:17px}
.tba-history-clear:hover{background:#FFF1F1}
.tba-history-confirm{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;font-size:13px}
.tba-history-del,.tba-history-cancel{height:34px;padding:0 14px;border-radius:17px;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.tba-history-del{border:none;background:#D93F3F;color:#fff}
.tba-history-cancel{border:1px solid var(--tba-line);background:#fff;color:var(--tba-ink)}
.tba-history-back:focus-visible,.tba-history-item:focus-visible,.tba-history-clear:focus-visible,.tba-history-del:focus-visible,.tba-history-cancel:focus-visible{outline:3px solid #9CC9FF;outline-offset:2px}
/* During a voice call the call row replaces the text field (no typing until the call ends) */
.tba-form[hidden]{display:none!important}
.tba-call-hint{margin:0;padding:0 16px 10px;font-size:12px;color:var(--tba-muted);text-align:center}
.tba-call-hint[hidden]{display:none!important}
.tba-panel.is-calling .tba-voice{padding-top:14px;padding-bottom:10px}
.tba-panel.is-calling .tba-end{height:40px;padding:0 18px;border:none;border-radius:20px;background:#D93F3F;color:#fff}
.tba-panel.is-calling .tba-end:hover{background:#C13434}
.tba-form{animation:tba-in .2s ease-out}
/* A persona without a photo yet: its initial on the landing blue */
.tba-noimg{position:relative;background:#1182FC;border-radius:50%}
.tba-noimg::after{content:attr(data-initial);position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:40%}
.tba-fab-photo .tba-noimg::after{font-size:30px}
.tba-head-ava.tba-noimg::after{font-size:18px}
.tba-msg-ava.tba-noimg::after{font-size:12px}
/* Live chat with the TBUTECH team (Sales CRM): a person took over from the AI */
.tba-panel.is-human .tba-voice,.tba-panel.is-human .tba-consent{display:none!important}
.tba-badge.is-live{background:#E3F6EC;color:#12805C}
.tba-msg--live{border-color:#BFE6D1}
.tba-live-name{display:block;margin-bottom:2px;font-size:11px;font-weight:600;color:#12805C}
/* AI switched off: nothing shows until someone from the team writes */
.tba.ai-off .tba-fab{display:none}
.tba.ai-off.has-live .tba-fab{display:flex}
.tba.ai-off [data-tba-welcome]{display:none}
.tba.ai-off .tba-row:has([data-tba-welcome]){display:none}

.tba-history-meta .tba-msg-ava{width:22px;height:22px}
.tba-history-meta .tba-msg-ava.tba-noimg::after{font-size:10px}
.tba-history-who{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
