/* CHATBOT STYLES. Load AFTER community.css. Uses the same variables as style.css. */
#cbt-fab{position:fixed;right:20px;bottom:20px;bottom:calc(20px + env(safe-area-inset-bottom,0px));z-index:90;width:58px;height:58px;border-radius:50%;border:0;background:#a64ac9;background:var(--accent,#a64ac9);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 8px 22px rgba(0,0,0,.45);-webkit-tap-highlight-color:transparent}
#cbt-fab:hover{background:#9b3bb5}
#cbt-fab:focus-visible,#cbt button:focus-visible,#cbt-in:focus-visible{outline:2px solid #c58be0;outline-offset:2px}
#cbt-fab.hide{display:none}
.on-chat #cbt-fab{bottom:96px;bottom:calc(96px + env(safe-area-inset-bottom,0px))}

#cbt{position:fixed;right:20px;bottom:90px;bottom:calc(90px + env(safe-area-inset-bottom,0px));z-index:90;width:360px;max-width:calc(100vw - 24px);height:520px;max-height:calc(100vh - 120px);display:none;flex-direction:column;background:#1c1223;border:1px solid #3a2447;border-radius:18px;box-shadow:0 16px 40px rgba(0,0,0,.55);overflow:hidden;color:#fff;font-family:inherit}
#cbt.on{display:flex;animation:cbtup .2s ease-out}
@keyframes cbtup{from{opacity:0;transform:translateY(12px)}}

.cbt-hd{display:flex;align-items:center;gap:10px;padding:12px 14px;background:linear-gradient(90deg,#4a1a58,#3a1d4a)}
.cbt-hd b{font-size:16px;display:block}
.cbt-hd small{font-size:12px;color:#d6c8de}
.cbt-hd div{flex:1;min-width:0}
.cbt-x{background:none;border:0;color:#d9a6ee;cursor:pointer;width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:50%}
.cbt-x:hover{background:rgba(255,255,255,.12)}

#cbt-log{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:14px;display:flex;flex-direction:column;gap:10px}
.cbt-r{display:flex;flex-direction:column;align-items:flex-start;max-width:88%}
.cbt-r.me{align-self:flex-end;align-items:flex-end}
.cbt-b{background:#3d1d4d;padding:10px 14px;border-radius:14px;font-size:14px;line-height:1.5;word-break:break-word;overflow-wrap:anywhere}
.cbt-r.me .cbt-b{background:#a64ac9;background:var(--accent,#a64ac9)}
.cbt-b strong{font-weight:700}
.cbt-go{margin-top:6px;display:flex;flex-wrap:wrap;gap:6px}
.cbt-go button,.cbt-chip{border:1px solid #a64ac9;background:none;color:#e6c8f5;border-radius:16px;padding:5px 12px;font:inherit;font-size:13px;cursor:pointer}
.cbt-go button:hover,.cbt-chip:hover{background:#3a2447}
#cbt-chips{display:flex;gap:6px;padding:0 14px 10px;overflow-x:auto;white-space:nowrap;-webkit-overflow-scrolling:touch}
#cbt-chips:empty{display:none}
.cbt-chip{flex-shrink:0}

.cbt-dots{display:inline-flex;gap:4px;padding:4px 0}
.cbt-dots i{width:7px;height:7px;border-radius:50%;background:#d9a6ee;animation:cbtd 1s infinite ease-in-out}
.cbt-dots i:nth-child(2){animation-delay:.15s}.cbt-dots i:nth-child(3){animation-delay:.3s}
@keyframes cbtd{0%,80%,100%{opacity:.25}40%{opacity:1}}

#cbt-form{display:flex;align-items:center;gap:8px;padding:10px 12px;border-top:1px solid #3a2447;background:#150d1a}
#cbt-in{flex:1;min-width:0;height:40px;border:0;border-radius:20px;padding:0 14px;background:#3a2447;color:#fff;font:inherit;font-size:16px}
#cbt-in::placeholder{color:#a89ab3}
#cbt-send{width:40px;height:40px;border:0;border-radius:50%;background:#a64ac9;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}
#cbt-send:disabled{opacity:.5;cursor:not-allowed}

@media(max-width:600px){
 #cbt{left:0;right:0;top:0;bottom:0;width:100%;max-width:none;height:100%;max-height:none;border:0;border-radius:0;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
}
@supports (height:100dvh){@media(max-width:600px){#cbt{height:100dvh}}}
@media(prefers-reduced-motion:reduce){#cbt.on{animation:none}.cbt-dots i{animation:none;opacity:.7}}
