.bhw-fcb-widget {
    position: fixed;
    z-index: 99999;
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.bhw-fcb-button {
    --bhw-button-color: #2374e1;
    position: relative;
    isolation: isolate;
    display: inline-flex;
    width: var(--bhw-desktop-size, 52px);
    height: var(--bhw-desktop-size, 52px);
    min-width: var(--bhw-desktop-size, 52px);
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    color: #fff;
    background: var(--bhw-button-color);
    box-shadow: 0 7px 18px rgba(15, 23, 42, .20), inset 0 1px 0 rgba(255, 255, 255, .18);
    text-decoration: none !important;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform .26s cubic-bezier(.2, .8, .2, 1), box-shadow .26s ease, filter .26s ease;
    will-change: transform;
}

.bhw-fcb-button::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -1px;
    border-radius: inherit;
    border: 2px solid var(--bhw-button-color);
    opacity: 0;
    pointer-events: none;
}

.bhw-fcb-button::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, 0) 46%);
    pointer-events: none;
}

.bhw-fcb-facebook { --bhw-button-color: #2374e1; }
.bhw-fcb-messenger { --bhw-button-color: #168aff; }
.bhw-fcb-zalo { --bhw-button-color: #0a91e9; }
.bhw-fcb-phone { --bhw-button-color: #59bd45; }

.bhw-fcb-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: 54%;
    height: 54%;
    align-items: center;
    justify-content: center;
    transition: transform .26s cubic-bezier(.2, .8, .2, 1);
}

.bhw-fcb-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.bhw-fcb-zalo .bhw-fcb-icon {
    width: 67%;
    height: 67%;
}

.bhw-fcb-button:hover,
.bhw-fcb-button:focus-visible {
    color: #fff;
    filter: saturate(1.06) brightness(1.03);
    transform: translateY(-3px) scale(1.055);
    box-shadow: 0 12px 25px rgba(15, 23, 42, .26), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.bhw-fcb-button:hover .bhw-fcb-icon,
.bhw-fcb-button:focus-visible .bhw-fcb-icon {
    transform: scale(1.07) rotate(-3deg);
}

.bhw-fcb-button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .92);
    outline-offset: 3px;
}

.bhw-fcb-button:active {
    transform: translateY(-1px) scale(.95);
    transition-duration: .1s;
}

.bhw-fcb-tooltip {
    position: absolute;
    top: 50%;
    right: calc(100% + 11px);
    display: block;
    padding: 7px 10px;
    border-radius: 7px;
    color: #fff;
    background: rgba(20, 20, 20, .88);
    box-shadow: 0 5px 15px rgba(0, 0, 0, .18);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translate(5px, -50%);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    pointer-events: none;
}

.bhw-fcb-position-left .bhw-fcb-tooltip {
    right: auto;
    left: calc(100% + 11px);
    transform: translate(-5px, -50%);
}

.bhw-fcb-button:hover .bhw-fcb-tooltip,
.bhw-fcb-button:focus-visible .bhw-fcb-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%);
}

.bhw-fcb-animated .bhw-fcb-button {
    opacity: 0;
    animation: bhw-fcb-enter .52s cubic-bezier(.22, .9, .3, 1.18) forwards;
}

.bhw-fcb-animated .bhw-fcb-button::before {
    animation: bhw-fcb-soft-ring 3.8s ease-out infinite;
}

.bhw-fcb-animated .bhw-fcb-button:nth-child(1) { animation-delay: .05s; }
.bhw-fcb-animated .bhw-fcb-button:nth-child(2) { animation-delay: .13s; }
.bhw-fcb-animated .bhw-fcb-button:nth-child(3) { animation-delay: .21s; }
.bhw-fcb-animated .bhw-fcb-button:nth-child(4) { animation-delay: .29s; }

.bhw-fcb-animated .bhw-fcb-button:nth-child(1)::before { animation-delay: .7s; }
.bhw-fcb-animated .bhw-fcb-button:nth-child(2)::before { animation-delay: 1.55s; }
.bhw-fcb-animated .bhw-fcb-button:nth-child(3)::before { animation-delay: 2.4s; }
.bhw-fcb-animated .bhw-fcb-button:nth-child(4)::before { animation-delay: 3.25s; }

@keyframes bhw-fcb-enter {
    from {
        opacity: 0;
        transform: translateY(9px) scale(.90);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bhw-fcb-soft-ring {
    0%, 74%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    78% {
        opacity: .28;
    }
    92% {
        opacity: 0;
        transform: scale(1.28);
    }
}

@media (hover: none) {
    .bhw-fcb-button:hover {
        filter: none;
        transform: none;
        box-shadow: 0 7px 18px rgba(15, 23, 42, .20), inset 0 1px 0 rgba(255, 255, 255, .18);
    }

    .bhw-fcb-button:hover .bhw-fcb-icon {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bhw-fcb-button,
    .bhw-fcb-button::before,
    .bhw-fcb-icon,
    .bhw-fcb-tooltip {
        animation: none !important;
        transition-duration: .01ms !important;
    }

    .bhw-fcb-animated .bhw-fcb-button {
        opacity: 1;
    }
}

/* Zalo dùng logo ảnh chính thức: chữ Zalo trắng trên nền tròn xanh. */
.bhw-fcb-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bhw-fcb-zalo .bhw-fcb-icon {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 999px;
}

.bhw-fcb-zalo .bhw-fcb-icon img {
    border-radius: 999px;
}
