/* Chat jurídico com IA local via WebLLM */
#chat-log{display:none}
#local-ai-panel{width:min(930px,100%);margin:-25px auto 24px;padding:17px 19px 15px;background:#111;border:1px solid #292929;border-radius:20px}
.local-ai-title{display:block;font-size:14px;font-weight:650;color:#f2f2f2}
.local-ai-copy{font-size:12px;line-height:1.55;color:#aaa;margin:7px 0 12px}
.local-ai-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
#local-ai-model{flex:1;min-width:210px;background:#1d1d1d;color:#eee;border:1px solid #444;border-radius:10px;padding:10px 12px;font-size:12px}
.local-ai-button{background:#f0f0f0;color:#111;border:0;border-radius:10px;padding:10px 15px;font-size:12px;font-weight:650;min-height:38px}
.local-ai-button:hover{background:#dcdcdc}
.local-ai-button:disabled{opacity:.55;cursor:wait}
.local-ai-button.ready{background:#193b2b;color:#b8f4d0}
.local-ai-status{color:#b7b7b7;font-size:11px;line-height:1.5;margin:10px 0 0}
#local-ai-progress{width:100%;height:7px;margin-top:11px;accent-color:#64b5ff}
.local-ai-privacy{display:block;color:#777;font-size:10px;line-height:1.5;margin-top:10px}
#chat-log{display:none}
.main.conversing .mid{justify-content:flex-start;align-items:stretch;padding-top:90px;padding-bottom:55px;min-height:0;overflow:hidden}
.main.conversing #chat-log{display:flex;flex-direction:column;gap:24px;flex:1;overflow-y:auto;width:min(930px,100%);margin:0 auto;padding:5px 12px 24px;scrollbar-color:#555 transparent}
.main.conversing h1{display:none}
.main.conversing #local-ai-panel{display:none}
.main.conversing .composer{flex:none;width:min(930px,100%);min-height:120px;border-radius:24px;margin:0 auto;padding:17px 20px}
.main.conversing .composer textarea{min-height:45px}
.chat-row{display:flex;gap:13px;line-height:1.65;max-width:100%}
.chat-row.user{justify-content:flex-end}
.chat-row .chat-logo{width:30px;height:30px;flex:none;display:grid;place-items:center;border:1px solid #555;border-radius:50%;font-weight:650;font-size:13px;margin-top:3px}
.chat-bubble{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.7;max-width:100%;min-width:0}
.chat-row.user .chat-bubble{border-radius:22px;background:#292929;padding:12px 17px;max-width:78%}
.chat-row.assistant .chat-bubble{flex:1;padding:1px 3px}
.chat-bubble.thinking{color:#aaa}
.response-mode{font-size:11px;color:#999;margin-bottom:10px;white-space:normal}
.answer-text{white-space:pre-wrap;overflow-wrap:anywhere}
.legal-sources{border-top:1px solid #333;margin-top:18px;padding-top:15px;display:flex;flex-direction:column;gap:10px;white-space:normal}
.legal-sources-heading{font-weight:600;color:#ececec;font-size:13px}
.legal-source{border:1px solid #363636;border-radius:14px;background:#161616;padding:13px 15px}
.legal-source-title{font-size:13px;font-weight:600;color:#e7e7e7}
.legal-source-text{font-size:12px;color:#bcbcbc;line-height:1.6;white-space:pre-wrap;max-height:132px;overflow-y:auto;margin-top:9px;scrollbar-color:#444 transparent}
.legal-links{display:flex;gap:16px;flex-wrap:wrap;margin-top:9px}
.legal-source-link{font-size:12px;color:#98bbff;text-decoration:none}.legal-source-link:hover{text-decoration:underline}
.legal-date{display:block;color:#888;font-size:10px;margin-top:9px}
.legal-warning{font-size:11px;color:#f1c879}
.legal-notice{font-size:11px;color:#969696;margin-top:18px;white-space:normal}
.send:disabled{opacity:.6;cursor:wait}
@media(max-width:780px){
 #local-ai-panel{margin:-16px auto 20px;padding:15px 14px}
 .local-ai-controls{align-items:stretch}
 #local-ai-model{min-width:100%;width:100%}
 .local-ai-button{width:100%}
 .main.conversing .mid{padding:88px 10px 42px}
 .main.conversing #chat-log{padding:2px 4px 18px}
 .chat-row.user .chat-bubble{max-width:90%}
 .chat-bubble{font-size:13px}
 .main.conversing .composer{min-height:108px;padding:13px 15px}
}
.local-ai-license{display:inline-block;margin-top:8px;color:#98bbff;font-size:10px;text-decoration:none}.local-ai-license:hover{text-decoration:underline}
