/* ══════ AI CHAT WIDGET ══════ */
.bt-chat{
  position:fixed;
  right:28px;
  bottom:28px;
  z-index:1200;
  font-family:var(--font);
}
html[dir="rtl"] .bt-chat{right:auto;left:28px;}
.bt-chat-toggle{
  width:64px;height:64px;border-radius:50%;
  background:linear-gradient(135deg,var(--teal),var(--teal-light));
  color:var(--navy);box-shadow:0 16px 45px rgba(2,183,166,.35);
  display:flex;align-items:center;justify-content:center;position:relative;
  transition:all .35s cubic-bezier(.16,1,.3,1);
}
.bt-chat-toggle:hover{transform:translateY(-4px) scale(1.03);box-shadow:0 20px 60px rgba(2,183,166,.45)}
.bt-chat-toggle-icon{font-size:28px;font-weight:800;position:relative;z-index:2}
.bt-chat-toggle-pulse{position:absolute;inset:0;border-radius:50%;border:1px solid var(--teal);animation:pulseRing 2s ease-out infinite}
.bt-chat-window{
  position:absolute;right:0;bottom:82px;width:380px;max-width:calc(100vw - 40px);
  height:540px;max-height:calc(100vh - 130px);background:var(--white);
  border:1px solid rgba(2,32,120,.08);border-radius:24px;box-shadow:0 24px 80px rgba(2,32,120,.18);
  overflow:hidden;display:none;flex-direction:column;transform-origin:bottom right;
}
html[dir="rtl"] .bt-chat-window{right:auto;left:0;transform-origin:bottom left}
.bt-chat.open .bt-chat-window{display:flex;animation:btChatIn .28s cubic-bezier(.16,1,.3,1) both}
.bt-chat.open .bt-chat-toggle{opacity:0;pointer-events:none;transform:scale(.85)}
@keyframes btChatIn{from{opacity:0;transform:translateY(18px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}
.bt-chat-head{padding:18px;background:linear-gradient(135deg,var(--navy),var(--navy-deep));color:var(--white);display:flex;align-items:center;justify-content:space-between;gap:14px}
.bt-chat-brand{display:flex;align-items:center;gap:12px}
.bt-chat-logo{width:42px;height:42px;border-radius:13px;background:rgba(2,183,166,.14);border:1px solid rgba(2,183,166,.25);color:var(--teal);display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:800}
.bt-chat-brand strong{display:block;font-size:15px;line-height:1.2}.bt-chat-brand span{display:block;font-size:11px;color:rgba(255,255,255,.6);margin-top:3px}
.bt-chat-close{color:rgba(255,255,255,.65);font-size:28px;line-height:1;width:34px;height:34px;border-radius:10px;transition:all .25s}
.bt-chat-close:hover{background:rgba(255,255,255,.08);color:var(--white)}
.bt-chat-body{flex:1;padding:18px;background:linear-gradient(180deg,#F8FAFC,#F0F4F8);overflow-y:auto;display:flex;flex-direction:column;gap:12px}
.bt-chat-msg{display:flex;width:100%}.bt-chat-msg.user{justify-content:flex-end}html[dir="rtl"] .bt-chat-msg.user{justify-content:flex-start}html[dir="rtl"] .bt-chat-msg.bot{justify-content:flex-end}
.bt-chat-bubble{max-width:84%;padding:12px 14px;border-radius:16px;font-size:13.5px;line-height:1.55;box-shadow:var(--shadow-sm);white-space:pre-wrap;word-wrap:break-word}
.bt-chat-msg.bot .bt-chat-bubble{background:var(--white);color:var(--ink);border:1px solid var(--card-border);border-bottom-left-radius:5px}
.bt-chat-msg.user .bt-chat-bubble{background:var(--navy);color:var(--white);border-bottom-right-radius:5px}
html[dir="rtl"] .bt-chat-msg.bot .bt-chat-bubble{border-bottom-left-radius:16px;border-bottom-right-radius:5px}html[dir="rtl"] .bt-chat-msg.user .bt-chat-bubble{border-bottom-right-radius:16px;border-bottom-left-radius:5px}
.bt-chat-msg.error .bt-chat-bubble{background:rgba(220,50,50,.08);border:1px solid rgba(220,50,50,.18);color:#dc3232}
.bt-chat-typing{display:inline-flex;gap:4px;align-items:center}.bt-chat-typing span{width:6px;height:6px;border-radius:50%;background:var(--teal);animation:btTyping 1s infinite ease-in-out}.bt-chat-typing span:nth-child(2){animation-delay:.15s}.bt-chat-typing span:nth-child(3){animation-delay:.3s}
@keyframes btTyping{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-4px)}}
.bt-chat-form{display:flex;gap:10px;padding:14px;background:var(--white);border-top:1px solid var(--card-border)}
.bt-chat-input{flex:1;min-width:0;background:var(--bg);border:1px solid var(--card-border);border-radius:14px;padding:13px 14px;font-family:var(--font);font-size:13.5px;color:var(--ink);outline:none;transition:all .25s}
.bt-chat-input:focus{background:var(--white);border-color:var(--teal);box-shadow:0 0 0 3px rgba(2,183,166,.08)}
.bt-chat-send{width:46px;height:46px;border-radius:14px;background:var(--teal);color:var(--navy);font-size:22px;font-weight:800;transition:all .25s;flex-shrink:0}.bt-chat-send:hover{background:var(--teal-light);transform:translateY(-1px)}.bt-chat-send:disabled{opacity:.5;cursor:not-allowed;transform:none}
@media(max-width:768px){.bt-chat{right:18px;bottom:18px}html[dir="rtl"] .bt-chat{right:auto;left:18px}.bt-chat-toggle{width:58px;height:58px}.bt-chat-window{position:fixed;right:14px;left:14px;bottom:14px;width:auto;height:min(560px,calc(100vh - 28px));max-width:none;max-height:none;border-radius:22px}html[dir="rtl"] .bt-chat-window{right:14px;left:14px}}