/* Website chat assistant (inc/chatbot.php, assets/js/chatbot.js). Uses the theme's tokens, so it follows dark/light. */
.tdc-open{position:fixed;right:20px;bottom:20px;z-index:250;display:inline-flex;align-items:center;gap:.5rem;padding:.35rem 1.05rem .35rem .35rem;border:0;border-radius:999px;background:var(--cta-fill);color:#fff;font:600 .9rem/1 Inter,system-ui,sans-serif;cursor:pointer;box-shadow:0 10px 30px rgba(0,0,0,.28)}
.tdc-open:focus-visible{outline:2px solid var(--text);outline-offset:3px}
.tdc-is-open .tdc-open{display:none}
.tdc-panel{position:fixed;right:20px;bottom:20px;z-index:251;width:min(380px,calc(100vw - 40px));height:min(580px,calc(100vh - 40px));display:flex;flex-direction:column;background:var(--surface);color:var(--text);border:1px solid var(--border-strong);border-radius:var(--radius-lg);box-shadow:0 20px 60px rgba(0,0,0,.35);font:400 .95rem/1.5 Inter,system-ui,sans-serif}
.tdc-panel[hidden]{display:none}
.tdc-head{display:flex;align-items:center;gap:.65rem;padding:.75rem .9rem;border-bottom:1px solid var(--border)}
.tdc-head div{flex:1;min-width:0;display:flex;flex-direction:column}
.tdc-head strong{font-size:.95rem}
.tdc-head span{font-size:.78rem;color:var(--muted)}
.tdc-reset,.tdc-close{background:none;border:0;color:var(--muted);cursor:pointer;font:inherit}
.tdc-reset{font-size:.78rem}
.tdc-close{font-size:1.5rem;line-height:1;padding:0 .2rem}
.tdc-reset:hover,.tdc-close:hover{color:var(--text)}
.tdc-log{flex:1;overflow-y:auto;padding:.9rem;display:flex;flex-direction:column;gap:.6rem}
.tdc-msg{max-width:88%;padding:.6rem .8rem;border-radius:var(--radius-lg);white-space:pre-wrap;overflow-wrap:anywhere}
.tdc-assistant{align-self:flex-start;background:var(--surface-2)}
.tdc-user{align-self:flex-end;background:var(--cta-fill);color:#fff}
.tdc-msg a{color:var(--accent);text-decoration:none}
.tdc-user a{color:#fff}
.tdc-msg a:hover{text-decoration:underline}
.tdc-wait{color:var(--muted);font-style:italic}
.tdc-form{display:flex;gap:.5rem;padding:.7rem .9rem;border-top:1px solid var(--border)}
.tdc-form textarea{flex:1;resize:none;min-height:40px;max-height:140px;padding:.55rem .7rem;border:1px solid var(--border-strong);border-radius:var(--radius);background:var(--bg);color:var(--text);font:inherit}
.tdc-form textarea:focus{outline:2px solid var(--accent);outline-offset:0}
.tdc-send{padding:0 .9rem;border:0;border-radius:var(--radius);background:var(--cta-fill);color:#fff;font:600 .85rem Inter,system-ui,sans-serif;cursor:pointer}
.tdc-send:disabled{opacity:.6;cursor:default}
.tdc-note{margin:0;padding:0 .9rem .7rem;font-size:.72rem;color:var(--faint)}
.tdc-note a{color:var(--accent);text-decoration:none}
.tdc-note a:hover{text-decoration:underline}
@media (max-width:520px){
  .tdc-open{right:14px;bottom:14px}
  .tdc-panel{right:0;bottom:0;width:100vw;height:min(88vh,100dvh);border-radius:var(--radius-lg) var(--radius-lg) 0 0}
}
@media print{.tdc-open,.tdc-panel{display:none}}
/* Teo's avatar: stacked stills, one visible ("on"), cross-faded by chatbot.js. */
.tdc-avatar{position:relative;flex:none;display:block;border-radius:50%;overflow:hidden;background:#eef2f8}
.tdc-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .35s ease}
.tdc-avatar img.on{opacity:1}
.tdc-avatar-btn{width:40px;height:40px;box-shadow:0 0 0 2px rgba(255,255,255,.85)}
.tdc-avatar-head{width:44px;height:44px}
.tdc-head strong{font-size:1.05rem}
@media (prefers-reduced-motion:reduce){.tdc-avatar img{transition:none}}
