#trc-ai-chat{position:fixed;right:1rem;bottom:6rem;z-index:2147483000;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
#trc-ai-toggle{position:absolute;right:0;bottom:0;width:3.5rem;height:3.5rem;border:0;border-radius:999px;background:#1c64f2;color:#fff;box-shadow:0 12px 30px rgba(15,23,42,.28);cursor:pointer;font-size:1.5rem;display:grid;place-items:center}
#trc-ai-toggle .trc-ai-close-icon{display:none;font-size:2rem;font-weight:300}
#trc-ai-chat.is-open #trc-ai-toggle .trc-ai-open-icon{display:none}
#trc-ai-chat.is-open #trc-ai-toggle .trc-ai-close-icon{display:inline}
#trc-ai-panel{position:absolute;right:0;bottom:4.5rem;width:24rem;height:40rem;max-height:calc(100vh - 11rem);display:none;grid-template-rows:auto 1fr auto auto;background:#fff;border:1px solid #e2e8f0;border-radius:1rem;overflow:hidden;box-shadow:0 20px 60px rgba(15,23,42,.25);color:#172033}
#trc-ai-chat.is-open #trc-ai-panel{display:grid}
#trc-ai-panel header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.1rem;background:linear-gradient(135deg,#174fca,#1c64f2);color:#fff}
#trc-ai-panel header div{display:flex;flex-direction:column;gap:.15rem}
#trc-ai-panel header strong{font-size:1rem}
#trc-ai-panel header small{font-size:.73rem;opacity:.86}
#trc-ai-reset{border:0;background:rgba(255,255,255,.15);color:#fff;border-radius:.5rem;width:2rem;height:2rem;cursor:pointer;font-size:1.1rem}
#trc-ai-messages{overflow-y:auto;padding:1rem;background:#f8fafc;display:flex;flex-direction:column;gap:.7rem}
.trc-ai-message{max-width:86%;padding:.7rem .85rem;border-radius:.85rem;white-space:pre-wrap;overflow-wrap:anywhere;font-size:.9rem;line-height:1.5}
.trc-ai-message.assistant{align-self:flex-start;background:#fff;border:1px solid #e2e8f0;border-bottom-left-radius:.25rem}
.trc-ai-message.user{align-self:flex-end;background:#1c64f2;color:#fff;border-bottom-right-radius:.25rem}
.trc-ai-message.is-loading:empty::after{content:"Thinking…";color:#64748b}
#trc-ai-form{display:grid;grid-template-columns:1fr auto;align-items:end;gap:.55rem;padding:.75rem;border-top:1px solid #e2e8f0;background:#fff}
#trc-ai-input{width:100%;min-height:2.65rem;max-height:7.5rem;resize:none;border:1px solid #cbd5e1;border-radius:.7rem;padding:.68rem .75rem;font:inherit;line-height:1.3;outline:none}
#trc-ai-input:focus{border-color:#1c64f2;box-shadow:0 0 0 3px rgba(28,100,242,.12)}
#trc-ai-form button{width:2.65rem;height:2.65rem;border:0;border-radius:.7rem;background:#1c64f2;color:#fff;cursor:pointer;font-size:1rem}
#trc-ai-form button:disabled{opacity:.55;cursor:wait}
.trc-ai-note{padding:0 .75rem .55rem;text-align:center;color:#94a3b8;background:#fff;font-size:.65rem}
@media(max-width:640px){#trc-ai-chat{right:.75rem;bottom:6rem}#trc-ai-panel{width:calc(100vw - 1.5rem);height:calc(100vh - 10.5rem);max-height:none}#trc-ai-toggle{width:3.25rem;height:3.25rem}}
