.jsb-ai-chatbot,.jsb-ai-chatbot *{box-sizing:border-box}
.jsb-ai-chatbot{--jsb-accent:#111827;--jsb-accent-text:#fff;--jsb-panel-width:420px;--jsb-surface:#fff;--jsb-surface-soft:#f8fafc;--jsb-border:#e2e8f0;--jsb-muted:#64748b;--jsb-shadow:0 22px 60px rgba(15,23,42,.22);position:relative;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;line-height:1.45;z-index:9998;color:#111827}
.jsb-ai-chatbot button,.jsb-ai-chatbot input,.jsb-ai-chatbot textarea{font-family:inherit}
.jsb-ai-chatbot.is-floating{position:fixed;right:20px;bottom:20px}
.jsb-ai-chatbot__launcher{display:flex;align-items:center;gap:10px;border:0;border-radius:999px;background:var(--jsb-accent);color:var(--jsb-accent-text);padding:12px 16px;cursor:pointer;box-shadow:0 10px 24px rgba(0,0,0,.18);font-weight:600;font-size:14px;line-height:1.2;transition:transform .18s ease,box-shadow .18s ease,opacity .18s ease}
.jsb-ai-chatbot__launcher:hover{transform:translateY(-1px);box-shadow:0 14px 28px rgba(0,0,0,.20)}
.jsb-ai-chatbot__launcher-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:rgba(255,255,255,.14);font-size:13px}
.jsb-ai-chatbot__launcher-text{font-size:14px;line-height:1.2}
.jsb-ai-chatbot__panel{position:absolute;right:0;bottom:68px;width:min(var(--jsb-panel-width),calc(100vw - 24px));background:var(--jsb-surface);border:1px solid rgba(17,24,39,.08);border-radius:20px;box-shadow:var(--jsb-shadow);overflow:hidden}
.jsb-ai-chatbot.is-inline .jsb-ai-chatbot__panel{position:relative;bottom:auto;right:auto;width:100%;max-width:var(--jsb-panel-width)}
.jsb-ai-chatbot__header{display:flex;justify-content:space-between;gap:12px;padding:14px 14px 12px;background:linear-gradient(135deg,var(--jsb-accent),color-mix(in srgb,var(--jsb-accent) 85%, #334155));color:var(--jsb-accent-text)}
.jsb-ai-chatbot__header-main{display:flex;gap:12px;align-items:center;min-width:0}
.jsb-ai-chatbot__avatar{flex:0 0 auto;width:40px;height:40px;border-radius:14px;background:rgba(255,255,255,.14);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;letter-spacing:.08em;line-height:1;color:var(--jsb-accent-text)}
.jsb-ai-chatbot__header-copy{display:flex;flex-direction:column;min-width:0}
.jsb-ai-chatbot__header-copy strong{display:block;margin:0;font-size:15px;line-height:1.25;font-weight:700;color:var(--jsb-accent-text)}
.jsb-ai-chatbot__status{display:block;font-size:12px;line-height:1.35;opacity:.82;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:color-mix(in srgb,var(--jsb-accent-text) 88%, transparent)}
.jsb-ai-chatbot__header-actions{display:flex;align-items:flex-start;gap:8px}
.jsb-ai-chatbot__close,.jsb-ai-chatbot__utility{border:0;background:rgba(255,255,255,.12);color:var(--jsb-accent-text);border-radius:10px;padding:8px 10px;cursor:pointer;font-size:13px;line-height:1.2;font-weight:600;transition:background .18s ease,transform .18s ease}
.jsb-ai-chatbot__close:hover,.jsb-ai-chatbot__utility:hover{background:rgba(255,255,255,.18);transform:translateY(-1px)}
.jsb-ai-chatbot__close{font-size:20px;line-height:1;padding:4px 10px}
.jsb-ai-chatbot__utility--ghost{background:#eef2f7;color:#0f172a}
.jsb-ai-chatbot__utility--ghost:hover{background:#e2e8f0}
.jsb-ai-chatbot__messages{max-height:360px;overflow:auto;padding:14px;background:var(--jsb-surface-soft);display:flex;flex-direction:column;gap:10px;scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent}
.jsb-ai-chatbot__messages::-webkit-scrollbar{width:8px}.jsb-ai-chatbot__messages::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px}
.jsb-ai-chatbot__message,.jsb-ai-chatbot__message *{font-size:14px !important;line-height:1.55 !important;font-weight:400 !important;letter-spacing:normal !important;text-transform:none !important}
.jsb-ai-chatbot__message{max-width:84%;padding:12px 14px;border-radius:16px;background:#fff;color:#111827;box-shadow:0 3px 10px rgba(15,23,42,.06);word-break:break-word}
.jsb-ai-chatbot__message.is-user{align-self:flex-end;background:var(--jsb-accent);color:var(--jsb-accent-text);border-bottom-right-radius:6px}
.jsb-ai-chatbot__message.is-bot{align-self:flex-start;border-bottom-left-radius:6px}
.jsb-ai-chatbot__meta{font-size:12px;line-height:1.4;color:var(--jsb-muted);padding:0 2px}
.jsb-ai-chatbot__quick{padding:0 14px 10px;display:flex;flex-wrap:wrap;gap:8px;background:var(--jsb-surface-soft)}
.jsb-ai-chatbot__chip{border:1px solid var(--jsb-border);background:#fff;border-radius:999px;padding:8px 12px;cursor:pointer;font-size:13px;line-height:1.3;color:#0f172a;transition:background .18s ease,border-color .18s ease,transform .18s ease}
.jsb-ai-chatbot__chip:hover{background:#f1f5f9;border-color:#cbd5e1;transform:translateY(-1px)}
.jsb-ai-chatbot__lead-slot{padding:0 14px 10px;background:var(--jsb-surface-soft)}
.jsb-ai-chatbot__lead-box,.jsb-ai-chatbot__lead-success,.jsb-ai-chatbot__lead-compact{position:relative;border:1px solid var(--jsb-border);background:#fff;border-radius:16px;padding:14px;box-shadow:0 3px 10px rgba(15,23,42,.04)}
.jsb-ai-chatbot__lead-compact{display:flex;flex-direction:column;gap:12px;padding-right:48px}
.jsb-ai-chatbot__lead-compact-copy{display:flex;flex-direction:column;gap:4px}
.jsb-ai-chatbot__lead-compact-copy strong{font-size:14px;line-height:1.35;font-weight:700;color:#111827}
.jsb-ai-chatbot__lead-compact-copy span{font-size:13px;line-height:1.45;color:#475569}
.jsb-ai-chatbot__lead-compact-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.jsb-ai-chatbot__lead-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}
.jsb-ai-chatbot__lead-title{font-size:14px;line-height:1.4;font-weight:700;color:#111827;max-width:calc(100% - 44px)}
.jsb-ai-chatbot__lead-close{position:absolute;top:12px;right:12px;border:0;background:#eef2f7;color:#0f172a;border-radius:999px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-size:18px;line-height:1;font-weight:700;transition:background .18s ease,transform .18s ease}
.jsb-ai-chatbot__lead-close:hover{background:#e2e8f0;transform:scale(1.03)}
.jsb-ai-chatbot__lead-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}
.jsb-ai-chatbot__lead-box input,.jsb-ai-chatbot__lead-box textarea,.jsb-ai-chatbot__composer textarea{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:12px;padding:11px 12px;font:inherit;font-size:14px;line-height:1.4;resize:none;background:#fff;color:#111827;transition:border-color .18s ease,box-shadow .18s ease}
.jsb-ai-chatbot__lead-box input:focus,.jsb-ai-chatbot__lead-box textarea:focus,.jsb-ai-chatbot__composer textarea:focus{outline:none;border-color:color-mix(in srgb,var(--jsb-accent) 45%, #94a3b8);box-shadow:0 0 0 3px color-mix(in srgb,var(--jsb-accent) 14%, transparent)}
.jsb-ai-chatbot__lead-box input::placeholder,.jsb-ai-chatbot__lead-box textarea::placeholder,.jsb-ai-chatbot__composer textarea::placeholder{color:#94a3b8}
.jsb-ai-chatbot__lead-box textarea{margin-bottom:8px;min-height:88px}
.jsb-ai-chatbot__lead-actions{display:flex;justify-content:space-between;gap:8px;align-items:center}
.jsb-ai-chatbot__lead-feedback{font-size:12px;line-height:1.4;color:var(--jsb-muted);margin-top:8px}
.jsb-ai-chatbot__form{padding:12px 14px 14px;background:#fff;border-top:1px solid var(--jsb-border)}
.jsb-ai-chatbot__composer{display:flex;gap:10px;align-items:flex-end}
.jsb-ai-chatbot__composer textarea{min-height:46px;max-height:132px}
.jsb-ai-chatbot__submit{border:0;background:var(--jsb-accent);color:var(--jsb-accent-text);border-radius:14px;padding:12px 14px;cursor:pointer;font-weight:700;font-size:14px;line-height:1;min-width:48px;flex:0 0 auto;transition:transform .18s ease,box-shadow .18s ease,opacity .18s ease}
.jsb-ai-chatbot__submit:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(15,23,42,.16)}
.jsb-ai-chatbot__submit.is-lead{min-width:unset;padding:10px 14px}
.jsb-ai-chatbot__message.is-typing{display:flex;gap:4px;align-items:center}
.jsb-ai-chatbot__message.is-typing span{width:8px;height:8px;border-radius:50%;background:#94a3b8;display:block;animation:jsbtyping 1.1s infinite ease-in-out}
.jsb-ai-chatbot__message.is-typing span:nth-child(2){animation-delay:.15s}.jsb-ai-chatbot__message.is-typing span:nth-child(3){animation-delay:.3s}
@keyframes jsbtyping{0%,80%,100%{opacity:.35;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
@media (max-width:640px){.jsb-ai-chatbot.is-floating{right:12px;left:12px;bottom:12px}.jsb-ai-chatbot__launcher{width:100%;justify-content:center;padding:12px 14px}.jsb-ai-chatbot__panel{width:100%;bottom:66px}.jsb-ai-chatbot__messages{max-height:52vh}.jsb-ai-chatbot__lead-grid{grid-template-columns:1fr}.jsb-ai-chatbot__message{max-width:92%}.jsb-ai-chatbot__lead-compact-actions,.jsb-ai-chatbot__lead-actions{justify-content:stretch;flex-direction:column-reverse}.jsb-ai-chatbot__lead-compact-actions button,.jsb-ai-chatbot__lead-actions button{width:100%}}
