/* VD-Contact CSS */
.vd-chatbox {
    position: fixed;
    z-index: 10150;
    right: 25px;
    bottom: 25px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.vd-chatbox button {
    border: none !important;
    width: 65px !important;
    height: 65px !important;
    border-radius: 50% !important;
    background: #e0052b !important;
    color: #fff !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.3s ease;
    position: relative;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
.vd-chatbox button::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: rgba(224, 5, 43, 0.25);
    border-radius: 50%;
    z-index: -1;
    animation: vd-pulse-ring 2s infinite;
}
.vd-chatbox button:hover {
    transform: scale(1.05);
}
.vd-chatbox button svg {
    width: 40px !important;
    height: 40px !important;
    max-width: 100% !important;
    max-height: 100% !important;
    display: block !important;
    margin: 0 auto !important;
}
.vd-icon-open, .vd-icon-close {
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
.vd-icon-open {
    display: flex;
}
.vd-chatbox.is-active .vd-icon-open {
    display: none !important;
}
.vd-chatbox.is-active .vd-icon-close {
    display: flex !important;
}
.vd-chatbox.is-active .vd-chaton {
    display: block !important;
}
.vd-chatbox.is-active .vd-chaton-overlay {
    display: block !important;
}
@keyframes vd-pulse-ring {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

.vd-chaton {
    display: none;
    position: absolute;
    bottom: 85px;
    right: 0px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    min-width: 220px;
    padding: 15px;
    animation: vd-slide-up 0.3s ease forwards;
    transform-origin: bottom right;
}
.vd-chaton::after {
    content: '';
    position: absolute;
    right: 22.5px;
    bottom: -8px;
    border-top: 10px solid #fff;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
}
@keyframes vd-slide-up {
    from { opacity: 0; transform: scale(0.8) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.vd-chaton-scroll {
    display: flex;
    flex-direction: column;
}
.vd-chaton a.vd-cco {
    display: flex;
    align-items: center;
    padding: 12px 10px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    border-radius: 8px;
    transition: background 0.2s;
}
.vd-chaton a.vd-cco:hover {
    background: #f5f5f5;
}
.vd-chaton a.vd-cco i {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    overflow: hidden; /* Prevent scaled SVG from bleeding out of circle */
}
.vd-chaton a.vd-cco i svg {
    width: 26px;
    height: 26px;
    fill: #fff;
}
/* No scale needed, viewBoxes are fixed */
.vd-ctel i svg { }
.vd-cwha i svg { }
.vd-cmes i svg { }
.vd-czal i svg { }

.vd-ctel i { background: #29A9EB; }
.vd-cwha i { background: #29A71A; }
.vd-cmes i { background: #448AFF; }
.vd-czal i { background: #0068FF; }

.vd-chaton-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    z-index: -1;
}

/* Mobile Nav */
.vd-boxnavi {
    display: none;
}

@media (max-width: 768px) {
    .vd-chatbox { right: 20px; transform: none; bottom: 100px; }
    .vd-chatbox button { width: 50px !important; height: 50px !important; }
    .vd-chatbox button svg { width: 30px !important; height: 30px !important; }
    .vd-chaton { bottom: 60px; right: 0; left: auto; transform: none; transform-origin: bottom right; animation: vd-slide-up-right 0.3s ease forwards; }
    .vd-chaton::after { right: 15px; left: auto; transform: none; }

    @keyframes vd-slide-up-right {
        from { opacity: 0; transform: scale(0.8) translateY(20px); }
        to { opacity: 1; transform: scale(1) translateY(0); }
    }

    .vd-boxnavi {
        display: none !important;
    }
    .vd-navi {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr;
        position: relative;
    }
    .vd-navi > div {
        text-align: center;
    }
    .vd-navi a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px 0 8px;
        color: #555;
        text-decoration: none;
        font-size: 11px;
        font-weight: 600;
    }
    .vd-navi-ico {
        width: 22px;
        height: 22px;
        margin-bottom: 4px;
        color: #555;
    }
    
    .vd-navi-cen-but {
        position: absolute;
        left: 50%;
        bottom: 5px;
        transform: translateX(-50%);
        width: 70px;
    }
    .vd-navi-cen-but a {
        padding: 0;
    }
    .vd-navi-cen-icon {
        width: 52px;
        height: 52px;
        background: #fff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #eaeaea;
        box-shadow: 0 -3px 6px rgba(0,0,0,0.06);
        margin-bottom: 4px;
    }
    .vd-navi-cen-icon i {
        width: 44px;
        height: 44px;
        background: #0068FF;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden; /* Keep scaled SVG inside */
    }
    .vd-navi-cen-icon i svg {
        width: 100%;
        height: 100%;
        transform: scale(1.5); /* Scale mobile zalo SVG */
        fill: #fff;
    }
    .vd-navi-cen-span {
        white-space: nowrap;
    }
    
    .vd-boxnavi.active .vd-navi-cen-icon i {
        background: #e0052b;
    }
    .vd-boxnavi.active .vd-navi-cen-icon i svg {
        display: none;
    }
    .vd-boxnavi.active .vd-navi-cen-icon i::before,
    .vd-boxnavi.active .vd-navi-cen-icon i::after {
        content: '';
        position: absolute;
        width: 20px;
        height: 2px;
        background: #fff;
    }
    .vd-boxnavi.active .vd-navi-cen-icon i::before { transform: rotate(45deg); }
    .vd-boxnavi.active .vd-navi-cen-icon i::after { transform: rotate(-45deg); }
}
