/* ============================================================================================
   online-support.css — widget "Hỗ trợ trực tuyến" (14/10/2026, user yêu cầu: như public UI happyheath).
   Chép khối "HỖ TRỢ TRỰC TUYẾN KIỂU HAPPYLIFEGHL" cuối style.css của happyheath; biến màu --sd-* thay bằng màu site:
   navy #0a3347 (nền nút / thanh), vàng #ffc107 (nút chính mobile). View: Shared/Components/OnlineSupportWidget/Default.
     • PC ≥992px: .hs-rail — hàng DỌC nút tròn dính mép phải, vòng sáng nhấp nháy, rê chuột hiện nhãn.
     • <992px:    .hs-bar  — "viên nang" nổi sát đáy màn hình; kênh đầu = nút vàng kèm số điện thoại.
   Khác happyheath: site không có nút "về đầu trang" → hàng nút PC đặt sát góc (bottom 25px thay vì 96px).
   ============================================================================================ */
.hs-rail {
    position: fixed; right: 25px; bottom: 25px; z-index: 1081;
    display: flex; flex-direction: column; gap: 16px;
}
.hs-rail__btn {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; border-radius: 50%; background: var(--hs-bg); color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18); text-decoration: none; transition: transform .2s ease;
}
/* style.css site cũ tô màu link chung #333 (a:link/a:visited — cụ thể hơn 1 class) → nhuộm xám cả icon (currentColor).
   Tiền tố .hs-rail / .hs-bar + a.class để thắng. */
.hs-rail a.hs-rail__btn, .hs-rail a.hs-rail__btn:link, .hs-rail a.hs-rail__btn:visited,
.hs-rail a.hs-rail__btn:hover, .hs-rail a.hs-rail__btn:focus { color: #fff; text-decoration: none; }
.hs-rail__btn:hover { transform: scale(1.08); }
/* Vòng sáng lan ra rồi tan — cùng màu nút. */
.hs-rail__btn::before {
    content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--hs-bg);
    opacity: .45; z-index: -1; animation: hs-pulse 1.8s ease-out infinite;
}
.hs-rail__btn:nth-child(2)::before { animation-delay: .5s; }
.hs-rail__btn:nth-child(n+3)::before { animation-delay: 1s; }
@keyframes hs-pulse { 0% { transform: scale(1); opacity: .45; } 100% { transform: scale(1.55); opacity: 0; } }
.hs-rail__ico { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; }
.hs-rail__btn { --hs-ink: var(--hs-bg); }               /* chữ "Zalo" trong bong bóng = màu nền nút */
.hs-rail__ico svg { width: 26px; height: 26px; }
.hs-rail__ico svg[viewBox="0 0 32 32"] { width: 34px; height: 34px; }
.hs-rail__ico img { width: 100%; height: 100%; object-fit: cover; }
.hs-rail__tip {
    position: absolute; right: calc(100% + 12px); top: 50%; transform: translate(6px, -50%);
    padding: 6px 12px; border-radius: 6px; background: #1f2937; color: #fff; font-size: 13px; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.hs-rail__btn:hover .hs-rail__tip, .hs-rail__btn:focus-visible .hs-rail__tip { opacity: 1; transform: translate(0, -50%); }

.hs-bar { display: none; }
@media (max-width: 991.98px) {
    .hs-rail { display: none; }
    /* VIÊN NANG NỔI: cách mép 10px, bo tròn hết cỡ, nền navy chuyển sắc. Kênh đầu là nút chính màu vàng giãn hết chỗ
       trống, có số điện thoại; các kênh sau là ô gọn chữ trắng. */
    .hs-bar {
        position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 1081;
        display: flex; align-items: stretch; gap: 4px; padding: 6px;
        max-width: 460px; margin: 0 auto; border-radius: 999px;
        background: linear-gradient(135deg, #12506e 0%, #0a3347 45%, #061f2c 100%);
        box-shadow: 0 10px 28px rgba(4, 24, 35, .4), 0 2px 6px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .14);
        --hs-ink: #0a3347;
    }
    .hs-bar__item {
        flex: 0 0 54px; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
        height: 46px; border-radius: 999px; color: #fff; text-decoration: none;
        -webkit-tap-highlight-color: transparent; transition: background-color .15s ease, transform .15s ease;
    }
    .hs-bar a.hs-bar__item, .hs-bar a.hs-bar__item:link, .hs-bar a.hs-bar__item:visited,
    .hs-bar a.hs-bar__item:hover, .hs-bar a.hs-bar__item:focus { color: #fff; text-decoration: none; }
    .hs-bar__item:active { background: rgba(255, 255, 255, .16); color: #fff; transform: scale(.96); }
    .hs-bar__ico { display: flex; align-items: center; justify-content: center; height: 22px; }
    .hs-bar__ico svg { width: 20px; height: 20px; }
    .hs-bar__ico svg[viewBox="0 0 32 32"] { width: 24px; height: 24px; }
    .hs-bar__ico img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
    .hs-bar__lb { max-width: 100%; font-size: 10.5px; font-weight: 600; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    /* Nút chính */
    .hs-bar a.hs-bar__item--main, .hs-bar a.hs-bar__item--main:link, .hs-bar a.hs-bar__item--main:visited,
    .hs-bar a.hs-bar__item--main:hover, .hs-bar a.hs-bar__item--main:focus {
        flex: 1 1 auto; flex-direction: row; justify-content: flex-start; gap: 8px; padding: 0 12px 0 6px;
        background: #ffc107; color: #1a1a1a; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .08);
    }
    .hs-bar a.hs-bar__item--main:active { background: #ffb300; color: #1a1a1a; }
    .hs-bar__item--main .hs-bar__ico {
        flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; background: #0a3347; color: #fff;
        animation: hs-ring 1.6s ease-in-out infinite;
    }
    .hs-bar__item--main .hs-bar__ico svg { width: 17px; height: 17px; }
    .hs-bar__tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
    .hs-bar__item--main .hs-bar__lb { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
    .hs-bar__item--main > .hs-bar__lb { font-size: 14px; text-transform: none; letter-spacing: 0; opacity: 1; font-weight: 700; }
    .hs-bar__sub { font-size: 15px; font-weight: 800; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    @keyframes hs-ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(10, 51, 71, .45); } 60% { box-shadow: 0 0 0 7px rgba(10, 51, 71, 0); } }
    /* Chừa đáy trang cho thanh (footer không bị thanh che). */
    html.hs-has-bar body { padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
}
/* Điện thoại nhỏ (≤374px, vd 360px): thu ô phụ + chữ số để nút chính hiện đủ "0973.905.741". */
@media (max-width: 374.98px) {
    .hs-bar { gap: 2px; padding: 5px; }
    .hs-bar__item { flex-basis: 48px; }
    .hs-bar__lb { font-size: 10px; }
    .hs-bar a.hs-bar__item--main, .hs-bar a.hs-bar__item--main:link, .hs-bar a.hs-bar__item--main:visited { gap: 6px; padding: 0 10px 0 5px; }
    .hs-bar__item--main .hs-bar__ico { flex-basis: 30px; width: 30px; height: 30px; }
    .hs-bar__sub { font-size: 14px; }
}
/* Đang mở popup (Xem nhanh dự án — Bootstrap 5 modal) hoặc menu mobile: ẩn widget. */
body.modal-open .hs-rail, body.modal-open .hs-bar { display: none !important; }
@media (prefers-reduced-motion: reduce) { .hs-rail__btn::before { animation: none; opacity: 0; } .hs-bar__item--main .hs-bar__ico { animation: none; } }
