/* GGu chat widget (launcher, floating panel, full /chat page). Everything else is in style.css. */
/* ---------- GGu chat ---------- */
.ggu-launcher{position:fixed;right:22px;bottom:22px;z-index:60;display:flex;align-items:center;gap:10px;padding:5px 16px 5px 5px;border-radius:999px;border:1px solid #3c3570;background:#17152a;color:var(--text);font:inherit;font-size:14px;font-weight:650;cursor:pointer;box-shadow:0 10px 30px rgba(0,0,0,.45)}
.ggu-launcher:hover{border-color:var(--accent)}
.ggu-launcher img{width:44px;height:44px;border-radius:50%;background:#ede9ff}
.ggu-launcher.is-hidden{display:none}
.ggu-chat{position:fixed;right:22px;bottom:22px;z-index:61;width:min(420px,calc(100vw - 32px));height:min(640px,calc(100vh - 110px));display:flex;flex-direction:column;background:#101116;border:1px solid #2c2f3a;border-radius:14px;box-shadow:0 20px 60px rgba(0,0,0,.55);overflow:hidden}
.ggu-chat[hidden]{display:none}
.ggu-chat-full{position:static;width:auto;height:calc(100vh - 210px);min-height:520px;box-shadow:none;max-width:860px;margin:0 auto}
.ggu-chat-head{display:flex;align-items:center;gap:10px;padding:12px 12px 12px 14px;border-bottom:1px solid #23262f;background:#14151c}
.ggu-chat-head img{border-radius:50%;background:#ede9ff;flex:none}
.ggu-chat-head div{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.35}
.ggu-chat-head strong{font-size:15px}
.ggu-chat-head span{font-size:11.5px;color:var(--muted)}
.ggu-icon-btn{flex:none;display:inline-grid;place-items:center;width:32px;height:32px;border-radius:8px;border:1px solid transparent;background:none;color:var(--secondary);font:inherit;font-size:16px;cursor:pointer}
.ggu-icon-btn:hover{background:var(--hover);color:var(--text)}
.ggu-chat-log{flex:1;overflow-y:auto;padding:16px 14px;display:flex;flex-direction:column;gap:12px;overscroll-behavior:contain}
.ggu-msg{max-width:88%;font-size:14.5px;line-height:1.7;word-break:keep-all;overflow-wrap:anywhere}
.ggu-msg p{margin:0 0 8px}
.ggu-msg p:last-child{margin-bottom:0}
.ggu-msg ul{margin:4px 0 8px;padding-left:20px}
.ggu-msg li{margin:2px 0}
.ggu-msg[hidden]{display:none}
.ggu-user{align-self:flex-end;background:#2a2550;color:#ecebff;padding:9px 13px;border-radius:14px 14px 4px 14px;white-space:pre-wrap}
.ggu-bot{align-self:flex-start;background:#171920;border:1px solid #23262f;color:#dfe2e8;padding:11px 14px;border-radius:14px 14px 14px 4px}
.ggu-msg-img{display:block;max-width:220px;max-height:180px;border-radius:8px;margin-bottom:6px}
.ggu-cite{color:var(--accent-light);font-size:12px;font-weight:700;text-decoration:none;margin-left:1px}
.ggu-status{font-size:12.5px;color:var(--accent-light);display:flex;align-items:center;gap:7px;margin-bottom:4px}
.ggu-status[hidden]{display:none}
.ggu-status::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--accent-light);animation:ggu-pulse 1s ease-in-out infinite}
@keyframes ggu-pulse{50%{opacity:.25}}
@media(prefers-reduced-motion:reduce){.ggu-status::before{animation:none}}
.ggu-error{color:#f4b5b5}
.ggu-sources{display:flex;flex-direction:column;gap:3px;margin-top:10px;padding-top:9px;border-top:1px solid #262a34;font-size:12px}
.ggu-sources span{color:var(--muted);font-weight:650}
.ggu-sources a{color:var(--secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ggu-sources a:hover{color:var(--text)}
.ggu-starters{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.ggu-chat-form{border-top:1px solid #23262f;padding:10px 12px 8px;background:#121319}
.ggu-input-row{display:flex;align-items:flex-end;gap:6px}
.ggu-chat-form textarea{flex:1;min-width:0;resize:none;max-height:140px;background:#0c0d11;border:1px solid #2a2d38;border-radius:10px;color:var(--text);padding:9px 11px;font:inherit;font-size:14.5px;line-height:1.5}
.ggu-chat-form textarea:focus{outline:none;border-color:var(--accent)}
.ggu-send{flex:none;width:38px;height:38px;border-radius:10px;border:0;background:var(--accent);color:#fff;font-size:18px;font-weight:700;cursor:pointer}
.ggu-send:disabled{opacity:.45;cursor:default}
.ggu-file{position:relative;overflow:hidden;cursor:pointer}
.ggu-file input{position:absolute;inset:0;opacity:0;cursor:pointer}
.ggu-attach{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.ggu-attach[hidden]{display:none}
.ggu-attach img{max-height:64px;max-width:120px;border-radius:6px;border:1px solid var(--line)}
.ggu-foot{margin:6px 2px 0;font-size:11px;color:var(--muted)}
.ggu-foot a{color:var(--accent-light)}
.chat-page{padding-bottom:10px}
@media(max-width:760px){
  .ggu-launcher{right:14px;bottom:72px;padding:4px}
  .ggu-launcher span{display:none}
  .ggu-chat{right:0;left:0;bottom:0;top:0;width:auto;height:auto;border-radius:0;border:0;z-index:70}
  .ggu-chat-full{position:static;height:calc(100vh - 190px);border:1px solid #2c2f3a;border-radius:12px}
  .ggu-msg{max-width:94%}
}
