:root{--brand:#0A2540;--deep:#0E2F52;--cta:#00B4D8;--cta-dark:#0093B1;}
.chat-fab,.chat-panel,.chat-greet{--ink:#1E2A2B;--muted:#5A6B6C;}

/* chat widget */
.chat-fab{position:fixed;right:20px;bottom:20px;z-index:200;width:auto;min-width:120px;height:56px;border-radius:999px;border:0;background:var(--brand);color:#fff;cursor:pointer;box-shadow:0 10px 26px rgba(14,47,82,.35);display:flex;align-items:center;justify-content:center;padding:0 20px;gap:8px;font-weight:700;font-size:15px;font-family:inherit}
.chat-fab:hover{background:var(--deep)}
.chat-fab svg{width:28px;height:28px;display:block}
.chat-fab .chat-x{display:none;font-size:26px;line-height:1;font-weight:700}
.chat-fab.open .chat-ic{display:none}
.chat-fab.open .chat-fab-txt{display:none}
.chat-fab.open .chat-x{display:block}
.chat-panel{position:fixed;right:20px;bottom:92px;z-index:200;width:370px;max-width:calc(100vw - 40px);max-height:min(560px,calc(100vh - 120px));max-height:min(560px,calc(100dvh - 120px));background:#fff;border-radius:16px;box-shadow:0 18px 50px rgba(14,47,82,.30);display:none;flex-direction:column;overflow:hidden;border:1px solid rgba(0,0,0,.08)}
.chat-panel.open{display:flex}
.chat-head{background:var(--deep);color:#fff;padding:14px 16px;display:flex;align-items:center;gap:10px}
.chat-head b{font-size:16px;display:block;line-height:1.25}
.chat-head span{font-size:12.5px;opacity:.85;display:block}
.chat-dot{width:10px;height:10px;border-radius:50%;background:#2AA5A0;flex:none}
.chat-close{margin-left:auto;background:none;border:0;color:#fff;font-size:22px;cursor:pointer;line-height:1;padding:4px 8px}
.chat-body{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:#F2F7F6}
.chat-msg{max-width:88%;padding:10px 14px;border-radius:14px;font-size:14.5px;line-height:1.5}
.chat-msg.bot{background:#fff;border:1px solid rgba(0,0,0,.08);border-bottom-left-radius:4px;align-self:flex-start}
.chat-msg.user{background:var(--brand);color:#fff;border-bottom-right-radius:4px;align-self:flex-end}
.chat-msg a{color:var(--brand);font-weight:700;text-decoration:underline}
.chat-msg.user a{color:#fff}
.chat-chips{display:flex;flex-wrap:wrap;gap:8px}
.chat-chip{background:#fff;border:1px solid var(--brand);color:var(--brand);border-radius:999px;padding:7px 13px;font-size:13.5px;font-weight:600;cursor:pointer;font-family:inherit}
.chat-chip:hover{background:var(--brand);color:#fff}
.chat-input{display:flex;gap:8px;padding:12px;border-top:1px solid rgba(0,0,0,.08);background:#fff}
.chat-input input{flex:1;border:1px solid rgba(0,0,0,.18);border-radius:999px;padding:10px 14px;font-size:14.5px;font-family:inherit;min-width:0}
.chat-input input:focus{outline:2px solid var(--brand);outline-offset:1px}
.chat-send{background:var(--cta);color:#fff;border:0;border-radius:999px;padding:10px 18px;font-weight:700;font-size:14.5px;cursor:pointer;font-family:inherit}
.chat-send:hover{background:var(--cta-dark)}
.chat-foot{padding:10px 16px;background:#fff;border-top:1px solid rgba(0,0,0,.06);font-size:13.5px;text-align:center}
.chat-foot a{color:var(--brand);font-weight:700}
.chat-foot a.chat-call{color:var(--cta)}
@media(max-width:560px){.chat-panel{right:12px;bottom:calc(84px + env(safe-area-inset-bottom, 0px));max-width:calc(100vw - 24px)}.chat-fab{right:12px;bottom:calc(12px + env(safe-area-inset-bottom, 0px))}}
.nav-viewall{color:var(--cta)!important;font-weight:800}
.chat-dot{background:#22C55E;animation:chat-pulse 2s infinite}
@keyframes chat-pulse{0%{box-shadow:0 0 0 0 rgba(34,197,94,.45)}70%{box-shadow:0 0 0 7px rgba(34,197,94,0)}100%{box-shadow:0 0 0 0 rgba(34,197,94,0)}}
.chat-head .chat-online-txt{display:inline;color:#4ADE80;font-weight:700;opacity:1}
.chat-fab .chat-online-dot{position:absolute;right:2px;bottom:2px;width:14px;height:14px;border-radius:50%;background:#22C55E;border:2px solid #fff}
.chat-greet{position:fixed;right:20px;bottom:92px;z-index:199;max-width:240px;background:#fff;color:var(--ink);font-weight:700;font-size:15px;padding:12px 14px;border-radius:16px;border-bottom-right-radius:4px;box-shadow:0 10px 28px rgba(14,47,82,.30);display:flex;align-items:center;gap:8px;cursor:pointer;border:2px solid var(--cta);animation:chat-greet-in .5s ease 1s both}
.chat-greet.hide{display:none}
.chat-greet-x{background:none;border:0;font-size:17px;cursor:pointer;color:var(--muted);padding:0 0 0 2px;line-height:1}
.chat-sound{background:none;border:0;color:#fff;cursor:pointer;padding:6px;display:flex;align-items:center;position:relative}
.chat-sound svg{width:20px;height:20px}
.chat-sound.muted::after{content:'';position:absolute;left:50%;top:50%;width:22px;height:2px;background:#fff;transform:translate(-50%,-50%) rotate(-45deg)}
@keyframes chat-greet-in{from{opacity:0;transform:translateY(10px) scale(.92)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:560px){.chat-greet{right:12px;bottom:calc(78px + env(safe-area-inset-bottom, 0px));max-width:190px;font-size:13px;padding:9px 11px}}
/* stats collapse to pill,then auto-hide (2026-11-15 collapse fix plus
   2026-11-18 auto-hide fix): the full card auto-collapses to a small pill
   6 seconds after load; the pill shows the today number and reopens the
   full card on tap. 5 seconds after collapsing,the pill hides completely
   (auto-hidden class{display:none}
/* chat footer hide (2026-11-18): the chat button and greet hide near the
   page bottom and return on scroll up; the open panel is never hidden. */
.chat-fab.at-foot{display:none}
.chat-greet.at-foot{display:none}

/* per-site override */
@media(max-width:820px){.chat-fab{bottom:88px}.chat-panel{bottom:160px}.chat-greet{bottom:154px}}
