.xd-icon img{max-width: 28px;}
.xd-cbtn-wrap { display: block; }

.xd-btn {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-family: 'Be Vietnam Pro', sans-serif;
    position: relative;

}

.xd-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    animation: xd-wiggle 2s infinite;
}

.xd-icon svg, .xd-icon img {
    width: 25px;
    height: 25px;
    fill: #fff;
    display: block;
}

.xd-icon::before, .xd-icon::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; height: 100%;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.6;
}
.xd-icon::before { animation: xd-pulse 2s infinite; }
.xd-icon::after  { animation: xd-pulse 2s infinite 0.5s; }

.xd-body {
    color: #fff;
    padding: 12px 18px 12px 36px;
    border-radius: 30px;
    margin-left: -28px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    white-space: nowrap;
    line-height: 1;
}

.xd-btn:not(.xd-btn-right) .xd-body {
    border-radius: 0 30px 30px 0;
}

.xd-btn.xd-btn-right {
    flex-direction: row-reverse;
}
.xd-btn.xd-btn-right .xd-body {
    border-radius: 30px 0 0 30px;
    margin-left: 0;
    margin-right: -28px;
    padding-left: 18px;
    padding-right: 36px;
}

.xd-phone .xd-icon::before, .xd-phone .xd-icon::after { background: rgba(227, 27, 35, 0.4); }
.xd-zalo .xd-icon::before,  .xd-zalo .xd-icon::after  { background: rgba(0, 104, 255, 0.4); }

@keyframes xd-wiggle {
    0%, 100% { transform: rotate(0); }
    10%, 30%, 50%, 70% { transform: rotate(-15deg); }
    20%, 40%, 60%, 80% { transform: rotate(15deg); }
}

@keyframes xd-pulse {
    0% { width: 100%; height: 100%; opacity: 0.6; }
    100% { width: 200%; height: 200%; opacity: 0; }
}

.xd-messenger-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,132,255,.45);
    text-decoration: none;
    animation: xd-messenger-shake 1.4s ease-in-out infinite;
    transform-origin: top center;
}
.xd-messenger-btn:hover { animation-play-state: paused; transform: scale(1.12); }
@keyframes xd-messenger-shake {
    0%,100%{transform:rotate(0)} 15%{transform:rotate(-18deg)} 30%{transform:rotate(16deg)}
    45%{transform:rotate(-12deg)} 60%{transform:rotate(10deg)} 75%{transform:rotate(-6deg)} 90%{transform:rotate(4deg)}
}

@media (max-width: 768px) {
    .xd-body { display: none; }
    .xd-icon { margin-left: 0; }
}

#xd-back-to-top {
    position: fixed !important;
    bottom: 50px !important;
    width: 60px !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 99999 !important;
    transition: transform 0.4s ease-in-out, visibility 0.4s !important;
    visibility: hidden;
}

#xd-back-to-top.xd-totop-right { right: 0 !important; left: auto !important; border-radius: 50px 0 0 50px !important; transform: translateX(100%); }
#xd-back-to-top.xd-totop-left  { left: 0 !important; right: auto !important; border-radius: 0 50px 50px 0 !important; transform: translateX(-100%); }
#xd-back-to-top.show {
    transform: translateX(0) !important;
    visibility: visible !important;
}

#xd-back-to-top.xd-totop-right.show { transform: translateX(0) !important; }
#xd-back-to-top.xd-totop-left.show  { transform: translateX(0) !important; }
#xd-back-to-top .xd-totop-inner {
    width: 40px !important;
    height: 40px !important;
    background-color: #f7c315 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 8px !important;
}
#xd-back-to-top:hover .xd-totop-inner {
    transform: scale(1.1);
}

@media (min-width: 769px) {
    .xd-call-tooltip { display: none !important; }
}
@media (max-width: 768px) {
    .xd-call-tooltip {
        color: #ffffff !important;
        padding: 8px 12px;
        border-radius: 30px;
        font-size: 13px;
        font-family: Arial, sans-serif;
        font-weight: bold;
        text-decoration: none;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        display: flex;
        align-items: center;
        white-space: nowrap;
        -webkit-tap-highlight-color: transparent;
        animation: xd-call-appear 5s infinite;
    }
    .xd-call-tooltip .xd-call-highlight {
        color: #ffde00 !important;
        margin-left: 4px;
        font-weight: 900;
        text-transform: uppercase;
    }
    .xd-call-tooltip .xd-call-hand {
        font-size: 16px;
        margin-right: 5px;
        animation: xd-call-hand-point 0.8s infinite alternate;
    }
    @keyframes xd-call-appear {
        0%, 10%   { opacity: 0; transform: translateX(10px) scale(0.9); }
        15%, 85%  { opacity: 1; transform: translateX(0) scale(1); }
        90%, 100% { opacity: 0; transform: translateX(10px) scale(0.9); }
    }
    @keyframes xd-call-hand-point {
        0%   { transform: translateX(0); }
        100% { transform: translateX(-4px); }
    }
}
