/* === FLOATING CHAT BUTTON === */
.chat-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
}

.chat-float a {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

.chat-zalo { background: #0068ff; }
.chat-mess { background: #00b2ff; }
.chat-call { background: #dc3545; }

/* Container */
.fab-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

/* Nút chính (+) */
.fab-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ff4d4f;
    color: #fff;
    font-size: 32px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,.3);
    transition: transform .3s ease;
}

/* Container */
.fab-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}

/* Nút chính (+) */
.fab-main {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e90ff, #007bff);
    color: #fff;
    font-size: 34px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,123,255,.45);
    transition: transform .3s ease, box-shadow .3s ease;
}

.fab-main span {
    transition: transform .3s ease;
}

/* Icon con */
.fab-item {
    position: absolute;
    right: 4px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(0) scale(0.5);
    transition: all .3s ease;
    box-shadow: 0 8px 18px rgba(0,0,0,.25);
}

/* Icon hình ảnh */
.fab-item img {
    width: 26px;
    height: 26px;
}

/* Hotline icon */
.fab-item.phone {
    background: #e53935;
    color: #fff;
    font-size: 22px;
}

/* Hover bung menu */
.fab-container:hover .fab-main span {
    transform: rotate(45deg);
}

.fab-container:hover .fab-item {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

/* Vị trí từng nút */
.fab-container:hover .fab-item.zalo {
    transform: translateY(-70px);
}

.fab-container:hover .fab-item.messenger {
    transform: translateY(-130px);
}

.fab-container:hover .fab-item.phone {
    transform: translateY(-190px);
}

@media (max-width: 768px) {
    .fab-container:active .fab-item {
        opacity: 1;
        pointer-events: auto;
        transform: scale(1);
    }
}
 
/* Bubble text */
.fab-tooltip {
    position: absolute;
    right: 70px;
    bottom: 12px;
    background: #ffffff;
    color: #333;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(0,0,0,.2);
    opacity: 0;
    transform: translateY(10px);
    transition: all .3s ease;
    pointer-events: none;
}

/* Mũi tên bubble */
.fab-tooltip::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent #fff;
}

/* Hover / active hiện bubble */
.fab-container:hover .fab-tooltip,
.fab-container:active .fab-tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* Xoay dấu + */
.fab-container:hover .fab-main span,
.fab-container:active .fab-main span {
    transform: rotate(45deg);
}
