/* ============================================================
   FINATIC — AI assistant widget (bottom-right, powered by Total Effex)
   ============================================================ */
.fab-chat{position:fixed;right:22px;bottom:22px;z-index:1000;display:flex;align-items:center;gap:10px;
  background:var(--primary);color:#fff;border:0;cursor:pointer;padding:13px 18px 13px 14px;border-radius:50px;
  font-family:var(--body);font-weight:600;font-size:14.5px;box-shadow:0 14px 34px rgba(7,29,112,.34);
  transition:transform .2s ease,box-shadow .25s ease}
.fab-chat:hover{transform:translateY(-3px);box-shadow:0 20px 44px rgba(7,29,112,.42)}
.fab-chat svg{width:22px;height:22px}
.fab-chat .pulse{position:absolute;right:14px;top:11px;width:9px;height:9px;background:#3ad07a;border-radius:50%;
  box-shadow:0 0 0 0 rgba(58,208,122,.6);animation:pulse 2s infinite}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(58,208,122,.55)}70%{box-shadow:0 0 0 9px rgba(58,208,122,0)}100%{box-shadow:0 0 0 0 rgba(58,208,122,0)}}

.chat-panel{position:fixed;right:22px;bottom:22px;z-index:1001;width:378px;max-width:calc(100vw - 32px);
  height:560px;max-height:calc(100vh - 40px);background:#fff;border-radius:22px;box-shadow:0 30px 80px rgba(7,29,112,.30);
  display:flex;flex-direction:column;overflow:hidden;opacity:0;visibility:hidden;transform:translateY(20px) scale(.97);
  transition:.26s cubic-bezier(.2,.8,.2,1);border:1px solid var(--line)}
.chat-panel.open{opacity:1;visibility:visible;transform:none}
.chat-head{background:var(--primary);color:#fff;padding:16px 18px;display:flex;align-items:center;gap:12px}
.chat-head .avatar{width:40px;height:40px;border-radius:12px;background:rgba(255,255,255,.16);display:grid;place-items:center;flex-shrink:0}
.chat-head .avatar svg{width:22px;height:22px}
.chat-head .meta{flex:1;min-width:0}
.chat-head .meta strong{display:block;font-family:var(--head);font-size:15.5px;font-weight:700}
.chat-head .meta span{font-size:11.5px;color:rgba(255,255,255,.78);display:flex;align-items:center;gap:5px}
.chat-head .meta span::before{content:"";width:7px;height:7px;border-radius:50%;background:#3ad07a;display:inline-block}
.chat-head .close{background:none;border:0;color:#fff;cursor:pointer;opacity:.8;padding:4px;font-size:20px;line-height:1}
.chat-head .close:hover{opacity:1}

.chat-body{flex:1;overflow-y:auto;padding:18px;background:var(--bg-soft);display:flex;flex-direction:column;gap:12px}
.msg{max-width:84%;padding:11px 15px;border-radius:16px;font-size:14px;line-height:1.55;animation:msgIn .25s ease}
@keyframes msgIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.msg.bot{align-self:flex-start;background:#fff;border:1px solid var(--line);border-bottom-left-radius:5px;color:var(--ink)}
.msg.user{align-self:flex-end;background:var(--primary);color:#fff;border-bottom-right-radius:5px}
.msg.bot a{color:var(--primary);font-weight:600;text-decoration:underline}
.msg p{margin:0 0 7px}.msg p:last-child{margin:0}
.msg ul{margin:6px 0 6px 18px}.msg li{margin-bottom:3px}

.chat-chips{display:flex;flex-wrap:wrap;gap:7px;padding:0 18px 6px;background:var(--bg-soft)}
.chip{background:#fff;border:1px solid var(--line);color:var(--primary);font-size:12.5px;font-weight:500;
  padding:8px 13px;border-radius:30px;cursor:pointer;transition:.18s}
.chip:hover{background:var(--bg-tint);border-color:var(--primary-400)}

.typing{align-self:flex-start;display:flex;gap:4px;padding:13px 16px;background:#fff;border:1px solid var(--line);border-radius:16px;border-bottom-left-radius:5px}
.typing i{width:7px;height:7px;border-radius:50%;background:var(--muted);animation:blink 1.3s infinite}
.typing i:nth-child(2){animation-delay:.2s}.typing i:nth-child(3){animation-delay:.4s}
@keyframes blink{0%,60%,100%{opacity:.3}30%{opacity:1}}

.chat-foot{padding:12px 14px;border-top:1px solid var(--line);background:#fff}
.chat-input{display:flex;gap:9px;align-items:flex-end}
.chat-input textarea{flex:1;border:1.5px solid var(--line);border-radius:14px;padding:11px 13px;font-family:var(--body);
  font-size:14px;resize:none;max-height:110px;line-height:1.5;transition:border .2s}
.chat-input textarea:focus{outline:none;border-color:var(--primary-400)}
.chat-send{background:var(--primary);border:0;color:#fff;width:42px;height:42px;border-radius:12px;cursor:pointer;
  display:grid;place-items:center;flex-shrink:0;transition:.2s}
.chat-send:hover{background:var(--primary-600)}
.chat-send:disabled{opacity:.5;cursor:not-allowed}
.chat-send svg{width:19px;height:19px}
.powered{text-align:center;font-size:11px;color:var(--muted);padding:7px 0 2px}
.powered a{color:var(--primary);font-weight:600}

@media(max-width:480px){
  .chat-panel{right:10px;bottom:10px;height:calc(100vh - 20px);width:calc(100vw - 20px);border-radius:18px}
  .fab-chat{right:14px;bottom:14px}
}
