/* IG Physiotherapy Virtual Assistant */
.chat-fab{position:fixed;right:20px;bottom:20px;z-index:90;display:flex;align-items:center;gap:8px;height:58px;padding:0 20px 0 16px;border:0;border-radius:999px;
  background:linear-gradient(135deg,var(--p),var(--p2));color:#fff;font:600 15px var(--ff);box-shadow:0 10px 30px rgba(15,76,151,.45);cursor:pointer;transition:transform .2s}
.chat-fab:hover{transform:translateY(-2px) scale(1.02)}
.chat-fab svg{width:26px;height:26px}
.chat-fab::after{content:"";position:absolute;right:10px;top:10px;width:11px;height:11px;border-radius:50%;background:var(--gold);box-shadow:0 0 0 3px var(--p)}
@media (max-width:900px){.chat-fab{display:none}}   /* phones/tablets: the bottom bar's "Ask us" opens the chat */
body.chat-on .chat-fab{display:none}
.chat-panel{position:fixed;right:20px;bottom:20px;z-index:100;width:min(400px,calc(100vw - 24px));height:min(640px,calc(100vh - 40px));background:#fff;border-radius:22px;
  box-shadow:0 24px 70px rgba(19,32,58,.35);display:none;flex-direction:column;overflow:hidden;border:1px solid var(--line)}
.chat-panel.open{display:flex;animation:chatIn .25s ease}
@keyframes chatIn{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
@media (max-width:560px){.chat-panel{right:0;bottom:0;width:100vw;height:100dvh;max-height:100vh;border-radius:0}}
.chat-head{display:flex;align-items:center;gap:10px;padding:14px 14px;background:linear-gradient(135deg,var(--p3),var(--p));color:#fff}
.chat-av{width:40px;height:40px;border-radius:12px;background:#fff;display:flex;align-items:center;justify-content:center;flex:none}
.chat-av img{width:30px;height:30px}
.chat-ttl{flex:1;min-width:0;line-height:1.25}
.chat-ttl b{display:block;font-size:15px}.chat-ttl small{color:#d6e4f7;font-size:12px}
.chat-lang{display:flex;background:rgba(255,255,255,.12);border-radius:999px;padding:3px}
.chat-lang button{border:0;background:none;color:#fff;font:600 12px var(--ff);padding:5px 9px;border-radius:999px;cursor:pointer;min-height:28px}
.chat-lang button[aria-pressed=true]{background:var(--gold);color:#fff}
.chat-x{border:0;background:rgba(255,255,255,.12);color:#fff;width:34px;height:34px;border-radius:50%;cursor:pointer;flex:none}
.chat-log{flex:1;overflow-y:auto;padding:16px;background:var(--pbg);display:flex;flex-direction:column;gap:10px}
.cm{max-width:86%;padding:10px 14px;border-radius:16px;font-size:14.5px;line-height:1.5;white-space:pre-wrap;word-wrap:break-word}
.cm.bot{background:#fff;border:1px solid var(--line);border-top-left-radius:4px;align-self:flex-start;color:var(--ink)}
.cm.me{background:var(--p);color:#fff;border-top-right-radius:4px;align-self:flex-end}
.cm a.src{display:inline-flex;margin-top:8px;font-weight:600;font-size:13px;color:var(--p2)}
.cm.typing{color:var(--mut)}
.cm.typing i{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--p2);margin:0 2px;animation:dot 1s infinite}
.cm.typing i:nth-child(2){animation-delay:.15s}.cm.typing i:nth-child(3){animation-delay:.3s}
@keyframes dot{0%,60%,100%{opacity:.25}30%{opacity:1}}
.chat-btns{display:flex;flex-wrap:wrap;gap:6px;padding:10px 12px;border-top:1px solid var(--line);max-height:150px;overflow-y:auto;background:#fff}
.chat-btns:empty{display:none}
.chat-btns button{border:1.5px solid var(--p2);background:#fff;color:var(--p);border-radius:999px;padding:6px 12px;font:600 13px var(--ff);cursor:pointer;min-height:34px}
.chat-btns button:hover{background:var(--p);color:#fff}
.chat-in{display:flex;gap:8px;padding:10px 12px;border-top:1px solid var(--line);background:#fff}
.chat-in input{flex:1;min-height:44px;border-radius:999px;padding:10px 16px}
.chat-in button{width:44px;height:44px;border-radius:50%;border:0;background:var(--gold);color:#fff;cursor:pointer;flex:none;display:flex;align-items:center;justify-content:center}
.chat-in button svg{width:20px;height:20px}
.chat-foot{margin:0;padding:6px 14px 10px;font-size:11.5px;color:var(--mut);background:#fff;text-align:center}
.chat-foot a{color:var(--mut)}
