/* CrossTrade Assistant — chat widget (Powered by Jarvis)
   Brand: charcoal #16171b, orange #ff7a1a / #d9630c. Scoped under #ct-chat. */
#ct-chat, #ct-chat *{box-sizing:border-box;margin:0;padding:0}
#ct-chat{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;-webkit-text-size-adjust:100%}

/* floating button */
#ct-chat-btn{position:fixed;right:18px;bottom:24px;z-index:999;display:flex;align-items:center;gap:9px;
  background:#ff7a1a;color:#16171b;border:none;border-radius:999px;padding:13px 20px 13px 15px;cursor:pointer;
  font-weight:700;font-size:1rem;line-height:1.2;font-family:inherit;box-shadow:0 6px 22px rgba(0,0,0,.35)}
#ct-chat-btn.ct-in-header{position:static;margin-left:auto;flex:none;box-shadow:0 4px 14px rgba(0,0,0,.3);padding:9px 14px 9px 11px;font-size:.85rem;gap:6px}
#ct-chat-btn.ct-in-header svg{width:19px;height:19px}
@media(max-width:560px){#ct-chat-btn.ct-in-header{padding:9px 11px}#ct-chat-btn.ct-in-header .ct-label{display:none}}
#ct-chat-btn:hover{background:#ff8c3d}
#ct-chat-btn svg{width:24px;height:24px;flex:none}
#ct-chat-btn .ct-dot{position:absolute;top:-3px;right:-3px;width:13px;height:13px;border-radius:50%;background:#2ecc71;border:2px solid #fff}
@media(max-width:719px){#ct-chat-btn{bottom:84px;right:14px}}

/* panel */
#ct-chat-panel{position:fixed;right:18px;bottom:92px;z-index:1000;width:384px;max-width:calc(100vw - 24px);
  height:560px;max-height:calc(100dvh - 120px);background:#fff;border-radius:16px;overflow:hidden;
  box-shadow:0 18px 50px rgba(0,0,0,.4);display:none;flex-direction:column;border:1px solid #e3e5e9}
#ct-chat-panel.ct-open{display:flex}
@media(max-width:719px){
  #ct-chat-panel{right:8px;left:8px;width:auto;bottom:80px;height:auto;max-height:calc(100dvh - 96px);top:70px}
}
#ct-chat-head{background:#16171b;color:#fff;padding:12px 14px;display:flex;align-items:center;gap:10px;flex:none}
#ct-chat-head img{width:40px;height:40px;border-radius:9px;border:2px solid #ff7a1a;object-fit:contain;background:#fff}
#ct-chat-head .ct-title{flex:1;min-width:0}
#ct-chat-head .ct-title strong{display:block;font-size:.98rem;letter-spacing:.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#ct-chat-head .ct-title span{display:block;font-size:.78rem;color:#aeb4bd}
#ct-chat-lang{background:transparent;color:#fff;border:1.5px solid #fff;border-radius:8px;padding:5px 9px;font-weight:700;font-size:.78rem;font-family:inherit;cursor:pointer;flex:none}
#ct-chat-lang:hover{background:rgba(255,255,255,.14)}
#ct-chat-close{background:transparent;border:none;color:#fff;font-size:1.45rem;line-height:1;cursor:pointer;padding:2px 4px;flex:none}

#ct-chat-msgs{flex:1;overflow-y:auto;padding:14px 12px;background:#f3f4f6;display:flex;flex-direction:column;gap:9px}
.ct-msg{max-width:86%;padding:10px 13px;border-radius:14px;font-size:.93rem;line-height:1.45;white-space:pre-wrap;word-wrap:break-word}
.ct-msg.bot{background:#fff;border:1px solid #e3e5e9;border-bottom-left-radius:4px;color:#24272d;align-self:flex-start}
.ct-msg.user{background:#ff7a1a;color:#16171b;border-bottom-right-radius:4px;align-self:flex-end;font-weight:600}
.ct-msg a{color:#d9630c;font-weight:700}
.ct-msg.user a{color:#16171b}
.ct-typing{align-self:flex-start;color:#5f6570;font-size:.85rem;font-style:italic;padding:2px 4px}

#ct-chat-chips{flex:none;display:flex;gap:7px;flex-wrap:wrap;padding:9px 12px;background:#f3f4f6;border-top:1px solid #e3e5e9}
.ct-chip{background:#fff;border:1.5px solid #ff7a1a;color:#d9630c;border-radius:999px;padding:6px 12px;font-weight:700;font-size:.8rem;font-family:inherit;line-height:1.25;white-space:normal;text-align:center;overflow-wrap:break-word;max-width:100%;flex:0 1 auto;cursor:pointer}
.ct-chip:hover{background:#fff3e8}

#ct-chat-form{flex:none;display:flex;gap:8px;padding:10px 12px;background:#fff;border-top:1px solid #e3e5e9}
#ct-chat-input{flex:1;border:1.5px solid #c9ccd2;border-radius:10px;padding:11px 12px;font-weight:400;font-size:.95rem;font-family:inherit;color:#24272d;min-width:0}
#ct-chat-input:focus{outline:none;border-color:#ff7a1a}
#ct-chat-send{background:#16171b;color:#fff;border:none;border-radius:10px;padding:0 18px;font-weight:700;font-size:.95rem;font-family:inherit;cursor:pointer}
#ct-chat-send:hover{background:#262a31}
#ct-chat-foot{flex:none;background:#fff;padding:0 12px 9px;font-size:.72rem;color:#8a9099;text-align:center}
#ct-chat-foot strong{color:#d9630c}
