.ai-chat{position:fixed;z-index:220;right:22px;bottom:92px;font-family:Inter,Arial,sans-serif}
.ai-chat-toggle{display:flex;align-items:center;gap:8px;height:48px;padding:0 18px;border:0;border-radius:999px;background:#111b58;color:#fff;font-weight:800;font-size:14px;box-shadow:0 15px 40px #0004;cursor:pointer}
.ai-chat-toggle-icon{flex:0 0 auto}
/* Pinned with top+bottom (not a fixed height) so it can never grow into the header or the floating buttons below it, on any viewport size. */
.ai-chat-panel{position:fixed;z-index:220;right:22px;top:100px;bottom:148px;display:flex;flex-direction:column;width:min(360px,calc(100vw - 32px));border-radius:20px;background:#fff;box-shadow:0 30px 80px #0007;overflow:hidden;border:1px solid #e3e7e9}
.ai-chat-panel[hidden]{display:none}
.ai-chat-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:16px 16px 14px;background:#0d1a4a;color:#fff}
.ai-chat-head-title{display:flex;align-items:flex-start;gap:10px}
.ai-chat-head-title svg{flex:0 0 auto;margin-top:2px;color:#e7c76b}
.ai-chat-head b{display:block;font-size:15px}
.ai-chat-head small{display:block;margin-top:3px;color:#ffffffa0;font-size:11px;line-height:1.4}
.ai-chat-head button{border:0;background:transparent;color:#fff;font-size:15px;cursor:pointer;opacity:.8}
.ai-chat-head button:hover{opacity:1}
.ai-chat-body{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:#f7f7f5}
.ai-msg{display:flex;flex-direction:column;max-width:88%}
.ai-msg-user{align-self:flex-end;align-items:flex-end}
.ai-msg-bot{align-self:flex-start;align-items:flex-start}
.ai-bubble{padding:10px 13px;border-radius:14px;font-size:13.5px;line-height:1.55;white-space:pre-line}
.ai-msg-user .ai-bubble{background:#111b58;color:#fff;border-bottom-right-radius:4px}
.ai-msg-bot .ai-bubble{background:#fff;color:#17212b;border:1px solid #e3e7e9;border-bottom-left-radius:4px}
.ai-cta{display:inline-block;margin-top:6px;padding:8px 12px;border-radius:10px;background:#0075bd;color:#fff;font-size:12px;font-weight:800;text-decoration:none}
.ai-typing .ai-bubble{display:flex;gap:4px;padding:13px}
.ai-typing .ai-bubble span{width:6px;height:6px;border-radius:50%;background:#9aa3ab;animation:ai-bounce 1s infinite ease-in-out}
.ai-typing .ai-bubble span:nth-child(2){animation-delay:.15s}
.ai-typing .ai-bubble span:nth-child(3){animation-delay:.3s}
@keyframes ai-bounce{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-4px);opacity:1}}
.ai-chat-chips{display:flex;flex-wrap:wrap;gap:6px;padding:0 14px 12px;background:#f7f7f5}
.ai-chip{border:1px solid #d7dde0;background:#fff;color:#28323b;font-size:11.5px;padding:7px 10px;border-radius:999px;cursor:pointer}
.ai-chip:hover{background:#eef2f3}
.ai-chat-input{display:flex;gap:8px;padding:12px;border-top:1px solid #e3e7e9;background:#fff}
.ai-chat-input input{flex:1;min-width:0;height:40px;padding:0 12px;border:1px solid #d7dde0;border-radius:10px;font-size:13.5px}
.ai-chat-input button{width:40px;height:40px;border:0;border-radius:10px;background:#111b58;color:#fff;font-size:15px;cursor:pointer}
@media(max-width:600px){
  .ai-chat-toggle-text{display:none}
  .ai-chat-toggle{width:48px;height:48px;padding:0;justify-content:center;border-radius:50%}
  /* Full-screen on mobile: a small floating card gets crushed by the on-screen keyboard, so this behaves like a real chat app instead. */
  .ai-chat-panel{position:fixed;inset:0;top:0;right:0;bottom:0;left:0;z-index:300;width:100%;height:100dvh;max-height:100dvh;border-radius:0;border:0}
  .ai-chat-head{padding-top:max(16px,env(safe-area-inset-top))}
  .ai-chat-input{padding-bottom:max(12px,env(safe-area-inset-bottom))}
  .ai-chat-input input{font-size:16px}
  body.ai-chat-open .ai-chat-toggle,body.ai-chat-open .wa-float{display:none}
  body.ai-chat-open{overflow:hidden}
}
