/* Widget chatbot công khai (SC-EXT-02 / báo giá).
    Theo ngôn ngữ thiết kế V10.2: navy #132d65/#163c5e, cam #dc7840, bo góc 12px.
    Bong bóng đặt góc dưới-PHẢI ở mọi viewport (trước đây góc
    dưới-trái, đè thẻ stat hero ở 1440px và nội dung/footer ở mobile).
    Nút "FME Portal · Quản trị" cũng cố định góc phải (bottom:19px, cao ~40px)
    nên bong bóng đặt bottom:76px để không đè lên nút đó; <=560px nút quản trị
    đã ẩn (public-media.css) nên bong bóng về bottom:12px. z-index:20
    THẤP HƠN header sticky (.hdr z-index:30) để drawer nav mobile mở ra thì
    che lên trên bong bóng/panel thay vì bị bong bóng đè. Mặc định ĐÓNG khi
    tải trang. */
body.fme-chat-open .totop{display:none !important}
.fme-chat-bubble{position:fixed;right:18px;bottom:76px;z-index:20;display:flex;gap:8px;align-items:center;background:#132d65;color:#fff;padding:12px 16px;border:1px solid #dfa058;border-radius:999px;box-shadow:0 8px 22px #0004;font:700 13px 'Be Vietnam Pro',Arial,sans-serif;cursor:pointer}
.fme-chat-bubble:hover{background:#1d4a86}
.fme-chat-panel{position:fixed;right:18px;bottom:132px;z-index:20;width:min(360px,calc(100vw - 36px));height:min(480px,calc(100vh - 120px));background:#fff;border:1px solid #dbe4ec;border-radius:14px;box-shadow:0 16px 40px #0005;display:none;flex-direction:column;overflow:hidden;font-family:'Be Vietnam Pro',Arial,sans-serif}
.fme-chat-panel.open{display:flex}
.fme-chat-head{background:#132d65;color:#fff;padding:13px 16px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.fme-chat-head b{font-size:14px}
.fme-chat-head small{display:block;font-weight:400;color:#b9d5f0;font-size:11px}
.fme-chat-head button{background:transparent;border:0;color:#fff;font-size:18px;cursor:pointer;padding:2px 6px}
.fme-chat-log{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;background:#f4f7fb}
.fme-chat-msg{max-width:85%;padding:10px 12px;border-radius:12px;font-size:13.5px;line-height:1.55;white-space:pre-line;word-break:break-word}
.fme-chat-msg.user{align-self:flex-end;background:#132d65;color:#fff;border-bottom-right-radius:4px}
.fme-chat-msg.bot{align-self:flex-start;background:#fff;border:1px solid #dbe4ec;color:#222;border-bottom-left-radius:4px}
.fme-chat-msg.bot .src{display:block;font-size:11px;color:#768995;margin-top:6px}
.fme-chat-msg.sys{align-self:center;background:#fff3e7;color:#8a4a12;font-size:12px;text-align:center}
.fme-chat-form{display:flex;gap:8px;padding:10px;border-top:1px solid #e9eef4;background:#fff}
.fme-chat-form input{flex:1;border:1px solid #bccbd6;border-radius:8px;padding:10px 11px;font:inherit;font-size:14px;color:#152c57;min-width:0}
.fme-chat-form input:focus{outline:none;border-color:#132d65;box-shadow:0 0 0 3px #132d6522}
/* Nút Gửi nền cam #dc7840/chữ trắng chỉ 3.09:1 (WCAG AA cần
    4.5:1): đậm lên #B5541F (4.94:1), giữ tông cam thương hiệu. */
.fme-chat-form button{background:#B5541F;color:#fff;border:0;border-radius:8px;padding:0 16px;font-weight:700;font-size:14px;cursor:pointer}
.fme-chat-form button:disabled{opacity:.6;cursor:default}
.fme-chat-typing{color:#768995;font-size:12px;font-style:italic}
@media (max-width:820px){.fme-chat-bubble{right:12px;bottom:66px}.fme-chat-panel{right:12px;bottom:122px}}
/* AUDIT- — Trên điện thoại (<=560px) nút "FME Portal · Quản trị" đã
    bị ẩn (public-media.css) nên góc dưới-phải trống: bong bóng về sát
    đáy (bottom:12px) và thu gọn thành nút tròn 48px chỉ icon, để không che
    CTA / banner / footer. Panel chat cũng dời sang phải theo. */
@media (max-width:560px){
  .fme-chat-bubble{left:auto;right:12px;bottom:12px;width:48px;height:48px;padding:0;justify-content:center;border-radius:50%;font-size:20px}
  .fme-chat-bubble .fme-chat-bubble-label{display:none}
  .fme-chat-panel{left:auto;right:12px;bottom:66px}
}
