#knowbot-root{--kb:#5B2A86;position:fixed;bottom:20px;z-index:99999;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;font-size:15px;line-height:1.45}
#knowbot-root.kb-right{right:20px}#knowbot-root.kb-left{left:20px}
#knowbot-root *{box-sizing:border-box}
.kb-launch{width:58px;height:58px;border-radius:50%;border:0;background:var(--kb);color:#fff;cursor:pointer;box-shadow:0 6px 20px rgba(0,0,0,.25);display:grid;place-items:center}
.kb-launch svg{width:28px;height:28px}
.kb-panel{position:absolute;bottom:72px;width:min(370px,calc(100vw - 32px));height:min(560px,calc(100vh - 120px));background:#fff;color:#1d1d1f;border-radius:16px;box-shadow:0 12px 40px rgba(0,0,0,.25);display:none;flex-direction:column;overflow:hidden}
.kb-right .kb-panel{right:0}.kb-left .kb-panel{left:0}
.kb-open .kb-panel{display:flex}
.kb-head{background:var(--kb);color:#fff;padding:14px 16px;display:flex;justify-content:space-between;align-items:center;font-weight:600}
.kb-head button{background:none;border:0;color:#fff;font-size:22px;cursor:pointer;line-height:1}
.kb-msgs{flex:1;overflow-y:auto;padding:14px;background:#f6f6f8;display:flex;flex-direction:column;gap:8px}
.kb-m{max-width:85%;padding:9px 12px;border-radius:14px;word-wrap:break-word;white-space:normal}
.kb-bot{background:#fff;border:1px solid #e6e6ea;align-self:flex-start;border-bottom-left-radius:4px}
.kb-user{background:var(--kb);color:#fff;align-self:flex-end;border-bottom-right-radius:4px}
.kb-m a{color:inherit;text-decoration:underline}
.kb-typing{color:#888;font-style:italic}
.kb-wa{display:block;text-align:center;font-size:13px;padding:6px;background:#f6f6f8;color:#1E8E4E;text-decoration:none;font-weight:600}
.kb-form{display:flex;gap:8px;padding:10px;border-top:1px solid #eee;background:#fff}
.kb-form input{flex:1;border:1px solid #ddd;border-radius:22px;padding:10px 14px;font:inherit;color:#1d1d1f;background:#fff}
.kb-form button{border:0;border-radius:22px;background:var(--kb);color:#fff;padding:0 16px;font-weight:600;cursor:pointer}
.kb-form button:disabled{opacity:.5}
.kb-note{font-size:11px;color:#999;text-align:center;padding:0 10px 8px;background:#fff}
@media (max-width:480px){#knowbot-root{bottom:14px}#knowbot-root.kb-right{right:14px}#knowbot-root.kb-left{left:14px}}
.kb-title{display:flex;align-items:center;gap:10px;min-width:0}
.kb-avatar{width:34px;height:34px;border-radius:50%;flex:none;background:#fff;object-fit:cover}
.kb-avatar.kb-fit-contain{object-fit:contain;padding:4px;background:rgba(255,255,255,.18)}
.kb-launch.kb-has-icon{padding:0;overflow:hidden}
.kb-launch.kb-has-icon img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}
.kb-launch.kb-fit-cover{background:#fff}
.kb-launch.kb-fit-contain img{width:66%;height:66%;border-radius:0;object-fit:contain}
/* Keep theme styles off the chat input */
#knowbot-root .kb-form input{margin:0;height:auto;min-height:0;outline:none;box-shadow:none;-webkit-appearance:none;appearance:none;font-size:16px;line-height:1.3}
#knowbot-root .kb-form input:focus{border-color:var(--kb);box-shadow:0 0 0 2px rgba(0,0,0,.06);outline:none}
#knowbot-root .kb-form button{margin:0;min-height:0;line-height:1;box-shadow:none}
/* Phones: compact window that leaves the page visible */
@media (max-width:600px){
#knowbot-root .kb-panel{bottom:62px;width:min(340px,calc(100vw - 28px));height:min(440px,60vh);height:min(440px,60dvh);border-radius:14px}
#knowbot-root .kb-head{padding:9px 12px;font-size:15px}
#knowbot-root .kb-avatar{width:28px;height:28px}
#knowbot-root .kb-msgs{padding:10px;gap:6px}
#knowbot-root .kb-m{font-size:14px;padding:7px 10px;max-width:88%}
#knowbot-root .kb-wa{font-size:12px;padding:4px}
#knowbot-root .kb-form{padding:7px 8px;gap:6px}
#knowbot-root .kb-form input{padding:8px 12px}
#knowbot-root .kb-form button{padding:0 13px;font-size:14px}
#knowbot-root .kb-note{font-size:10px;padding:0 8px 6px}
#knowbot-root .kb-launch{width:52px;height:52px}
}
/* Adjustable button size (Settings > Icon size) */
#knowbot-root .kb-launch{width:var(--kb-size,72px);height:var(--kb-size,72px)}
#knowbot-root .kb-launch svg{width:45%;height:45%}
#knowbot-root .kb-panel{bottom:calc(var(--kb-size,72px) + 14px)}
@media (max-width:600px){
#knowbot-root .kb-launch{width:max(48px,calc(var(--kb-size,72px) * .75));height:max(48px,calc(var(--kb-size,72px) * .75))}
#knowbot-root .kb-panel{bottom:calc(max(48px,calc(var(--kb-size,72px) * .75)) + 10px)}
}
