/* Widget do assistente (uxbrain/Chat). A app pode mudar a cor com --uxchat-cor. */
.uxchat-lancador, .uxchat { --uxchat-c: var(--uxchat-cor, #6d28d9); --uxchat-linha: #e7e5ee; --uxchat-bolha: #f4f3f8; --uxchat-texto: #1f1d2b; }
.uxchat-lancador { position: fixed; right: 1rem; bottom: 1rem; z-index: 1050; width: 3.5rem; height: 3.5rem; border: 0; border-radius: 50%; background: var(--uxchat-c); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 28px -6px color-mix(in srgb, var(--uxchat-c) 60%, transparent); transition: transform .15s; }
.uxchat-lancador:hover { transform: scale(1.06); }
.uxchat-lancador:focus-visible, .uxchat button:focus-visible, .uxchat input:focus-visible { outline: 3px solid color-mix(in srgb, var(--uxchat-c) 45%, transparent); outline-offset: 2px; }
.uxchat { position: fixed; right: 1rem; bottom: 5.4rem; z-index: 1050; width: min(380px, calc(100vw - 2rem)); height: min(560px, calc(100vh - 7rem)); display: flex; flex-direction: column; background: #fff; color: var(--uxchat-texto); border: 1px solid var(--uxchat-linha); border-radius: 1.25rem; box-shadow: 0 18px 50px rgba(15, 23, 42, .2); overflow: hidden; font: inherit; font-size: .92rem; }
.uxchat[hidden] { display: none; }
.uxchat-topo { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; background: var(--uxchat-c); color: #fff; }
.uxchat-topo-txt { flex: 1; line-height: 1.25; }
.uxchat-topo-txt small { display: block; opacity: .85; font-size: .75rem; }
.uxchat-fechar { border: 0; background: transparent; color: #fff; cursor: pointer; padding: .3rem; border-radius: .5rem; display: grid; }
.uxchat-fechar:hover { background: rgba(255, 255, 255, .15); }
.uxchat-msgs { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.uxchat-msg { max-width: 88%; padding: .6rem .85rem; border-radius: 1rem; line-height: 1.45; overflow-wrap: anywhere; }
.uxchat-msg-bot { background: var(--uxchat-bolha); align-self: flex-start; border-bottom-left-radius: .3rem; }
.uxchat-msg-eu { background: var(--uxchat-c); color: #fff; align-self: flex-end; border-bottom-right-radius: .3rem; }
.uxchat-msg-erro { background: #fef2f2; color: #991b1b; align-self: flex-start; }
.uxchat-msg ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.uxchat-msg a { color: var(--uxchat-c); font-weight: 600; }
.uxchat-msg-eu a { color: #fff; }
.uxchat-contacto { display: inline-block; margin-top: .5rem; padding: .35rem .9rem; border-radius: 999px; background: var(--uxchat-c); color: #fff !important; text-decoration: none; font-weight: 700; }
.uxchat-a-escrever span { display: inline-block; width: .45rem; height: .45rem; margin-right: .2rem; border-radius: 50%; background: var(--uxchat-c); animation: uxchat-pulso 1s infinite ease-in-out; }
.uxchat-a-escrever span:nth-child(2) { animation-delay: .15s; }
.uxchat-a-escrever span:nth-child(3) { animation-delay: .3s; }
@keyframes uxchat-pulso { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.uxchat-sugestoes { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1rem .6rem; }
.uxchat-sugestoes button { border: 1px solid var(--uxchat-linha); background: #fff; color: var(--uxchat-texto); border-radius: 999px; padding: .3rem .75rem; font: inherit; font-size: .8rem; cursor: pointer; }
.uxchat-sugestoes button:hover { border-color: var(--uxchat-c); color: var(--uxchat-c); }
.uxchat-form { display: flex; gap: .5rem; padding: .6rem 1rem .3rem; border-top: 1px solid var(--uxchat-linha); }
.uxchat-form input { flex: 1; min-width: 0; border: 1px solid var(--uxchat-linha); border-radius: 999px; padding: .55rem .9rem; font: inherit; }
.uxchat-form input:disabled { background: #f8fafc; }
.uxchat-form button { border: 0; border-radius: 50%; width: 2.5rem; height: 2.5rem; flex: none; background: var(--uxchat-c); color: #fff; display: grid; place-items: center; cursor: pointer; }
.uxchat-form button:disabled { opacity: .4; cursor: default; }
.uxchat-aviso { font-size: .7rem; color: #64748b; text-align: center; margin: 0 1rem .6rem; }
.uxchat-aviso a { color: inherit; }
.uxchat-debug { align-self: stretch; font-size: .72rem; font-family: ui-monospace, monospace; color: #64748b; white-space: pre-wrap; }
.uxchat-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { .uxchat-a-escrever span { animation: none; opacity: .6; } .uxchat-lancador { transition: none; } }
