/* Chat local, adaptado a celular e aos três temas. */
.zchat{--chat-bg:#f5f2fc;--chat-surface:#fff;--chat-text:#25213c;--chat-muted:#696279;--chat-line:#e5def0;display:flex;flex-direction:column;background:var(--chat-bg);color:var(--chat-text);height:100%;min-height:0;overflow:hidden;border-radius:24px;text-align:left;font-size:14px}
.zchat-dialog{position:fixed!important;inset:auto 24px 24px auto!important;margin:0!important;padding:0!important;width:min(450px,calc(100vw - 32px))!important;max-width:none!important;height:min(730px,calc(100dvh - 48px));max-height:calc(100dvh - 32px)!important;border:1px solid #e0d7ef!important;border-radius:24px!important;box-shadow:0 18px 70px #20173b44!important;background:#fff!important;overflow:hidden!important}
.zchat-dialog::backdrop{background:#17112b33;backdrop-filter:blur(2px)}.zchat-page{max-width:800px;margin:0 auto;height:min(780px,calc(100dvh - 145px));min-height:460px;border:1px solid var(--line,#ded7ee);border-radius:24px;overflow:hidden}
.zchat-header{display:flex;align-items:center;gap:12px;padding:18px 20px;border-bottom:1px solid var(--chat-line);background:var(--chat-surface);flex-shrink:0}.zchat-header>img{width:48px;height:52px;border-radius:15px;background:#eee7fd;object-fit:contain}.zchat-header h2{margin:0!important;font-size:20px!important;line-height:1.2;color:var(--chat-text)!important}.zchat-header span{font-size:12px;color:var(--chat-muted)}.zchat-head-actions{margin-left:auto;display:flex;gap:5px}.zchat-head-actions button{width:36px;height:38px;padding:0;font-size:23px;background:transparent;border:0;color:var(--chat-muted);border-radius:12px}
.zchat-log{overflow:auto;flex:1;min-height:0;padding:20px 16px 8px;display:flex;flex-direction:column;gap:14px;overscroll-behavior:contain;scrollbar-width:thin}.zchat-message{max-width:96%;padding:15px 16px;background:var(--chat-surface);border:1px solid var(--chat-line);border-radius:18px 18px 18px 5px;align-self:flex-start;line-height:1.6;overflow-wrap:anywhere;animation:zchat-in .18s ease-out}.zchat-sender{display:block;font-size:10px;letter-spacing:.06em;text-transform:uppercase;font-weight:700;color:var(--chat-muted);margin-bottom:4px}.zchat-message h3{font-size:15px!important;line-height:1.4;margin:0 0 7px!important;color:inherit!important}.zchat-message p{margin:0!important;color:inherit!important;white-space:pre-line}.zchat-message ol{margin:12px 0 0;padding-left:20px}.zchat-message li{margin:7px 0}.zchat-user{align-self:flex-end;max-width:85%;background:#6034da;color:#fff;border-color:transparent;border-radius:18px 18px 5px 18px}.zchat-user .zchat-sender{color:#e5dcff}.zchat-links{display:grid;gap:8px;margin-top:14px}.zchat-links button{display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;font-size:13px;background:#f2ecff;color:#5930c6;border:1px solid #dacef8;border-radius:12px;padding:10px 12px;min-height:42px;line-height:1.4}.zchat-links button span{font-size:16px}.zchat-suggestions{display:flex;flex-wrap:wrap;gap:7px;padding:12px 16px;flex-shrink:0}.zchat-suggestions button{padding:8px 11px;font-size:12px;border-radius:20px;background:var(--chat-surface);color:var(--chat-text);border:1px solid var(--chat-line);min-height:36px;line-height:1.25}
.zchat-composer{display:flex!important;gap:8px!important;padding:10px 14px!important;align-items:end!important;background:var(--chat-surface);border-top:1px solid var(--chat-line);margin:0!important;flex-shrink:0}.zchat-composer textarea{min-height:46px!important;max-height:110px;resize:vertical;border-radius:15px!important;border:1px solid var(--chat-line)!important;background:var(--chat-bg)!important;color:var(--chat-text)!important;padding:12px!important;margin:0!important;flex:1;min-width:0;width:auto!important;font:inherit;line-height:1.5}.zchat-composer textarea::placeholder{color:var(--chat-muted)}.zchat-composer>button{width:44px;height:46px;flex:0 0 44px;padding:11px;background:#6034da!important;border:0!important;color:white!important;border-radius:14px;display:grid;place-items:center}.zchat-composer svg{width:22px;height:22px}.zchat-footer{display:flex;align-items:center;flex-wrap:wrap;gap:7px;padding:5px 16px 13px;background:var(--chat-surface);color:var(--chat-muted);flex-shrink:0}.zchat-footer small{font-size:10px;margin-right:auto}.zchat-footer button{font-size:11px;border:0;background:transparent;color:var(--chat-muted);padding:5px;min-height:30px}.zchat [hidden]{display:none!important}.zchat button:focus-visible,.zchat textarea:focus-visible{outline:3px solid #ab91ee;outline-offset:2px}.zchat .sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
html[data-theme='dark'] .zchat{--chat-bg:#14121c;--chat-surface:#211d2c;--chat-text:#f4f0fb;--chat-muted:#bdb3ce;--chat-line:#3b334b}html[data-theme='dark'] .zchat-links button{background:#332447;color:#ddc9ff;border-color:#5b4278}html[data-theme='dark'] .zchat-dialog{border-color:#3b334b!important;background:#14121c!important}html[data-appearance='oled'] .zchat{--chat-bg:#000;--chat-surface:#101013;--chat-line:#29262f;--chat-text:#f6f2fc;--chat-muted:#c1b9cc}html[data-theme='dark'] .zchat-user{background:#49306e;color:#fff}html[data-appearance='oled'] .zchat-user{background:#30203f;color:#f6edff}
@keyframes zchat-in{from{opacity:.4;transform:translateY(5px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.zchat-message{animation:none}}@media(max-width:600px){.zchat-dialog{inset:calc(8px + env(safe-area-inset-top)) 8px auto 8px!important;width:calc(100vw - 16px)!important;height:calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));max-height:none!important;border-radius:20px!important}.zchat{border-radius:20px}.zchat-header{padding:12px 14px}.zchat-log{padding:14px 12px 6px}.zchat-message{max-width:100%;padding:12px 13px}.zchat-suggestions{padding:10px 12px;gap:6px}.zchat-suggestions button{min-height:38px}.zchat-composer textarea{font-size:16px}.zchat-page{height:calc(100dvh - 200px);min-height:440px}.zchat-footer{padding-bottom:calc(9px + env(safe-area-inset-bottom))}}
