:root{--trbk-color:#1e6fb8}
.trbk-launcher{position:fixed;right:20px;bottom:20px;z-index:99998;display:flex;align-items:center;gap:10px;height:56px;padding:0 22px 0 18px;border-radius:28px;border:0;background:var(--trbk-color);color:#fff;box-shadow:0 6px 24px rgba(0,0,0,.28);cursor:pointer;font:600 16px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;letter-spacing:.01em;transition:transform .15s,box-shadow .15s;white-space:nowrap}
.trbk-launcher:hover{transform:translateY(-2px);box-shadow:0 10px 28px rgba(0,0,0,.32)}
.trbk-launcher:focus-visible{outline:3px solid #fff;outline-offset:2px}
.trbk-launcher svg{width:26px;height:26px;flex:none;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.trbk-launcher .trbk-launcher-text{display:inline-block}
.trbk-launcher.trbk-no-text{width:56px;padding:0;justify-content:center}
.trbk-launcher .trbk-ico-close{display:none}
.trbk-open .trbk-launcher .trbk-ico-chat{display:none}
.trbk-open .trbk-launcher .trbk-ico-close{display:block}
.trbk-open .trbk-launcher .trbk-launcher-text{display:none}
.trbk-open .trbk-launcher{width:56px;padding:0;justify-content:center}
.trbk-panel{position:fixed;right:20px;bottom:92px;z-index:99999;width:380px;max-width:calc(100vw - 32px);height:600px;max-height:calc(100vh - 120px);background:#fff;border-radius:16px;box-shadow:0 12px 40px rgba(0,0,0,.28);display:none;flex-direction:column;overflow:hidden;font:15px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:#1d2327}
.trbk-open .trbk-panel{display:flex}
.trbk-panel [hidden]{display:none!important}
.trbk-panel *,.trbk-panel *::before,.trbk-panel *::after{box-sizing:border-box}
.trbk-head{background:var(--trbk-color);color:#fff;padding:14px 16px;display:flex;align-items:center;gap:10px}
.trbk-head-title{font-weight:600;flex:1;font-size:16px}
.trbk-head-sub{font-size:12px;opacity:.85;display:block;font-weight:400}
.trbk-head button{background:transparent;border:0;color:#fff;cursor:pointer;font-size:13px;padding:6px 8px;border-radius:6px;opacity:.9}
.trbk-head button:hover{background:rgba(255,255,255,.15)}
.trbk-body{flex:1;overflow-y:auto;padding:14px;background:#f5f6f8;display:flex;flex-direction:column;gap:10px}
.trbk-bubble{max-width:85%;padding:10px 13px;border-radius:14px;white-space:pre-wrap;word-wrap:break-word}
.trbk-bubble a{color:inherit;text-decoration:underline}
.trbk-bot{align-self:flex-start;background:#fff;border-bottom-left-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.trbk-user{align-self:flex-end;background:var(--trbk-color);color:#fff;border-bottom-right-radius:4px}
.trbk-err{align-self:flex-start;background:#fdecea;color:#8a1c1c;font-size:14px}
.trbk-typing{align-self:flex-start;color:#666;font-size:13px;padding:4px 6px}
.trbk-typing i{display:inline-block;width:6px;height:6px;border-radius:50%;background:#999;margin-right:3px;animation:trbk-blink 1.2s infinite}
.trbk-typing i:nth-child(2){animation-delay:.2s}.trbk-typing i:nth-child(3){animation-delay:.4s}
@keyframes trbk-blink{0%,80%,100%{opacity:.25}40%{opacity:1}}
.trbk-quick{display:flex;flex-wrap:wrap;gap:6px;align-self:flex-start}
.trbk-quick button{background:#fff;border:1px solid var(--trbk-color);color:var(--trbk-color);border-radius:20px;padding:6px 12px;font-size:13px;cursor:pointer}
.trbk-quick button:hover{background:var(--trbk-color);color:#fff}
.trbk-foot{border-top:1px solid #e5e7eb;background:#fff}
.trbk-form{display:flex;gap:8px;padding:10px}
.trbk-form textarea{flex:1;resize:none;border:1px solid #d0d5dd;border-radius:10px;padding:9px 12px;font:inherit;max-height:120px;min-height:40px;outline:none}
.trbk-form textarea:focus{border-color:var(--trbk-color)}
.trbk-form button{background:var(--trbk-color);color:#fff;border:0;border-radius:10px;padding:0 16px;cursor:pointer;font:inherit;font-weight:600}
.trbk-form button:disabled{opacity:.5;cursor:default}
.trbk-tools{display:flex;justify-content:space-between;align-items:center;padding:0 12px 8px;font-size:12px;color:#666}
.trbk-tools button{background:none;border:0;color:var(--trbk-color);cursor:pointer;font-size:12px;padding:2px 4px;text-decoration:underline}
.trbk-note{font-size:11px;color:#777;padding:0 12px 8px;text-align:center}
.trbk-consent,.trbk-handover{padding:20px 18px;overflow-y:auto;flex:1;background:#fff}
.trbk-consent h3,.trbk-handover h3{margin:0 0 10px;font-size:17px;font-family:inherit;font-weight:600;line-height:1.3;color:inherit}
.trbk-consent p,.trbk-handover p{margin:0 0 12px;font-size:14px;color:#333}
.trbk-consent a{color:var(--trbk-color)}
.trbk-btn{display:block;width:100%;background:var(--trbk-color);color:#fff;border:0;border-radius:10px;padding:12px;font:inherit;font-weight:600;cursor:pointer;margin-top:8px}
.trbk-btn-ghost{background:transparent;color:var(--trbk-color);border:1px solid var(--trbk-color)}
.trbk-handover label{display:block;font-size:13px;margin:10px 0 4px;color:#444}
.trbk-handover input,.trbk-handover textarea{width:100%;box-sizing:border-box;border:1px solid #d0d5dd;border-radius:8px;padding:9px 11px;font:inherit}
.trbk-hp{position:absolute;left:-9999px;opacity:0;height:0;width:0}
.trbk-status{font-size:14px;margin-top:10px}
.trbk-status.ok{color:#1a7f37}.trbk-status.err{color:#b42318}
@media (max-width:480px){.trbk-panel{right:0;bottom:0;width:100vw;max-width:100vw;height:100vh;max-height:100vh;border-radius:0}.trbk-open .trbk-launcher{display:none}}
@media (prefers-reduced-motion:reduce){.trbk-launcher{transition:none}.trbk-typing i{animation:none}}
