#tmai-root{--tmai-color:#6b4f2c;position:fixed;right:20px;bottom:20px;z-index:2147483000;font:14px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:#2b2b2b}
#tmai-root *{box-sizing:border-box}
#tmai-root [hidden]{display:none!important}
.tmai-launcher{width:58px;height:58px;border-radius:50%;border:0;background:var(--tmai-color);color:#fff;cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.25);display:flex;align-items:center;justify-content:center;margin-left:auto}
.tmai-panel{position:absolute;right:0;bottom:72px;width:380px;max-width:calc(100vw - 32px);height:560px;max-height:calc(100vh - 110px);background:#fff;border-radius:14px;box-shadow:0 12px 40px rgba(0,0,0,.25);display:flex;flex-direction:column;overflow:hidden}
.tmai-panel header{background:var(--tmai-color);color:#fff;padding:12px 14px;display:flex;justify-content:space-between;align-items:center;font-weight:600}
.tmai-panel header button{background:none;border:0;color:#fff;font-size:20px;cursor:pointer;padding:0 6px;line-height:1}
.tmai-msgs{flex:1;overflow-y:auto;padding:14px;background:#f7f5f2;display:flex;flex-direction:column;gap:10px}
.tmai-msg{max-width:88%;padding:9px 12px;border-radius:12px;word-wrap:break-word}
.tmai-msg p{margin:0 0 4px}.tmai-msg p:last-child{margin:0}
.tmai-msg ul,.tmai-msg ol{margin:4px 0 4px 18px;padding:0}
.tmai-msg a{color:var(--tmai-color);font-weight:600;text-decoration:underline}
.tmai-assistant{background:#fff;align-self:flex-start;border:1px solid #ece7e0}
.tmai-user{background:var(--tmai-color);color:#fff;align-self:flex-end}
.tmai-sugg{display:flex;flex-direction:column;gap:6px}
.tmai-sugg button{text-align:left;background:#fff;border:1px solid var(--tmai-color);color:var(--tmai-color);border-radius:16px;padding:6px 12px;cursor:pointer;font:inherit}
.tmai-typing{display:flex;gap:4px;padding:12px}
.tmai-typing span{width:7px;height:7px;border-radius:50%;background:#bbb;animation:tmai-b 1s infinite}
.tmai-typing span:nth-child(2){animation-delay:.15s}.tmai-typing span:nth-child(3){animation-delay:.3s}
@keyframes tmai-b{0%,80%,100%{opacity:.3}40%{opacity:1}}
.tmai-form{display:flex;gap:8px;padding:10px;border-top:1px solid #eee;background:#fff}
.tmai-form textarea{flex:1;resize:none;border:1px solid #ddd;border-radius:10px;padding:9px 10px;font:inherit;max-height:120px}
.tmai-form button{border:0;background:var(--tmai-color);color:#fff;border-radius:10px;width:44px;cursor:pointer;font-size:16px}
.tmai-foot{margin:0;padding:4px 10px 8px;font-size:11px;color:#888;background:#fff;text-align:center}
.tmai-foot a{color:#888}
@media (max-width:480px){#tmai-root{right:12px;bottom:12px}.tmai-panel{position:fixed;inset:0;width:100%;max-width:none;height:100%;max-height:none;border-radius:0}}

/* Blindaje frente a estilos del tema (botones/inputs globales) */
#tmai-root button,#tmai-root textarea{margin:0!important;min-width:0!important;min-height:0!important;text-transform:none!important;letter-spacing:normal!important;line-height:1.3!important;box-shadow:none;font-family:inherit!important}
#tmai-root .tmai-launcher{width:58px!important;height:58px!important;padding:0!important;border-radius:50%!important}
#tmai-root .tmai-form button{width:44px!important;height:auto!important;padding:0!important}
#tmai-root .tmai-panel header button{width:auto!important;height:auto!important;padding:0 6px!important;background:none!important}
#tmai-root .tmai-sugg button{width:100%!important;height:auto!important;padding:6px 12px!important;white-space:normal!important}
#tmai-root .tmai-form textarea{width:auto!important;height:auto;font-size:16px!important}
@media (max-width:480px){#tmai-root .tmai-panel{position:fixed!important;top:0!important;left:0!important;right:0!important;width:100%!important;max-width:100%!important;height:100dvh!important;bottom:auto!important;right:auto!important}#tmai-root .tmai-msgs{padding:10px}}
