#w999-sales-chat{position:fixed;right:18px;bottom:18px;z-index:2147483000;font:14px/1.45 system-ui,-apple-system,Segoe UI,sans-serif;color:#172033}#w999-sales-chat *{box-sizing:border-box}.launcher{border:0;border-radius:999px;background:var(--sales,#10a82b);color:#fff;padding:15px 18px;font-weight:800;box-shadow:0 14px 38px #0f172a35;cursor:pointer}.panel{display:none;position:absolute;right:0;bottom:66px;width:min(390px,calc(100vw - 24px));height:min(650px,calc(100vh - 90px));background:#fff;border:1px solid #e2e8f0;border-radius:22px;overflow:hidden;box-shadow:0 28px 80px #0f172a40}.panel.open{display:flex;flex-direction:column}.head{display:flex;align-items:center;gap:10px;padding:14px;background:var(--sales,#10a82b);color:white}.head img,.avatar{width:42px;height:42px;border-radius:50%;object-fit:cover;background:#fff}.avatar{display:grid;place-items:center;color:var(--sales,#10a82b);font-weight:900}.identity{flex:1}.identity b,.identity small{display:block}.identity small{opacity:.9}.head button{border:0;background:#ffffff22;color:#fff;width:34px;height:34px;border-radius:10px;cursor:pointer}.stage{flex:1;min-height:0;overflow:hidden;background:#f8fafc;display:flex;flex-direction:column}.w999-sales-lang{text-align:center;padding:24px 16px}.w999-sales-lang .icon{font-size:38px}.w999-sales-lang h3{margin:8px 0}.w999-sales-lang p{color:#64748b}.w999-sales-lang .grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.w999-sales-lang button{padding:11px;border:1px solid #dbe3ee;background:white;border-radius:12px;cursor:pointer}.w999-sales-lang button b,.w999-sales-lang button small{display:block}.w999-sales-lang button:hover{border-color:var(--sales,#10a82b)}.chat{display:none;flex:1;min-height:0;height:100%}.chat.active{display:flex;flex-direction:column}.msgs{padding:12px;overflow-y:auto;overflow-x:hidden;flex:1;min-height:0;background:#f8fafc;display:flex;flex-direction:column;justify-content:flex-start}.msg{max-width:88%;padding:10px 12px;border-radius:14px;margin:7px 0;white-space:pre-wrap}.msg.bot{background:#fff;border:1px solid #e2e8f0}.msg.user{margin-left:auto;background:var(--sales,#10a82b);color:#fff}.cta{display:inline-block;margin:4px 12px 10px;padding:9px 12px;border-radius:10px;background:var(--sales,#10a82b);color:#fff;text-decoration:none}.w999-sales-quicks{display:flex;gap:7px;padding:9px;overflow:auto;border-top:1px solid #eef2f7;background:#fff}.w999-sales-quicks button{white-space:nowrap;border:1px solid #dbe3ee;background:#fff;border-radius:999px;padding:8px 10px;cursor:pointer}.composer{display:flex;gap:7px;padding:9px;border-top:1px solid #eef2f7}.composer textarea{flex:1;resize:none;height:44px;border:1px solid #cbd5e1;border-radius:12px;padding:10px}.composer button{width:44px;border:0;border-radius:12px;background:var(--sales,#10a82b);color:white;cursor:pointer}.foot{padding:0 10px 10px;display:flex;justify-content:space-between;gap:10px;font-size:11px;color:#64748b}.foot a{color:var(--sales,#10a82b);font-weight:700;text-decoration:none}.modal{display:none;position:fixed;inset:0;background:#0f172a80;place-items:center;padding:16px}.modal.open{display:grid}.modal .card{width:min(420px,96vw);background:white;border-radius:18px;padding:18px;display:grid;gap:9px}.modal input,.modal textarea{width:100%;border:1px solid #cbd5e1;border-radius:10px;padding:10px}.modal .card>div{display:flex;justify-content:flex-end;gap:8px}.modal button{border:0;border-radius:10px;padding:10px 13px;cursor:pointer}.modal .save{background:var(--sales,#10a82b);color:white}@media(max-width:500px){#w999-sales-chat{right:8px;bottom:8px}.launcher span{display:none}.panel{position:fixed;inset:8px;width:auto;height:auto;max-height:none;border-radius:18px}.panel.open{display:flex}.head{flex:0 0 auto}.stage{flex:1;min-height:0}.chat.active{height:100%}}

/* v258 chat vertical-flow fix: collapse the language stage once chat is active */
#w999-sales-chat .stage:empty{display:none!important;flex:0 0 0!important;height:0!important;min-height:0!important;overflow:hidden!important}
#w999-sales-chat .panel.open .chat.active{display:flex!important;flex:1 1 auto!important;height:auto!important;min-height:0!important}
#w999-sales-chat .chat.active .msgs{justify-content:flex-start!important;align-content:flex-start!important;flex:1 1 auto!important;min-height:0!important}
#w999-sales-chat .chat.active .msgs>.msg:first-child{margin-top:0!important}
@media(max-width:500px){#w999-sales-chat .panel.open .chat.active{height:auto!important;min-height:0!important}}
