/* VTS Contact List - Enhanced CSS with Shake Animation */

/* Container chính */
#vts-contact-container {
    position: fixed;
    bottom: 10%;
    z-index: 99999;
}

#vts-contact-container.vts-right {
    right: 0;
}

#vts-contact-container.vts-left {
    left: 0
}

/* Button contact wrapper */
#vts-contact-container .vts-contact-item {
    position: relative;
    margin-top: -5px;
}

/* Contact button base */
#vts-contact-container .vts-contact-item .vts-contact-btn {
    position: relative;
    visibility: visible;
    background-color: transparent;
    width: 90px;
    height: 90px;
    cursor: pointer;
    z-index: 11;
    backface-visibility: hidden;
    transform: translateZ(0);
    transition: visibility 0.5s;
    left: 0;
    bottom: 0;
    display: block;
    text-decoration: none;
}

/* Circle fill animation */
.vts-circle-fill {
    width: 65px;
    height: 65px;
    top: 12px;
    left: 12px;
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    animation: vts-circle-shake 2.3s infinite ease-in-out, vts-zoom 1.3s infinite;
    transition: all 0.5s;
    transform-origin: 50% 50%;
}

/* Inner circle with image */
.vts-img-circle {
    width: 40px;
    height: 40px;
    line-height: 40px;
    top: 25px;
    left: 25px;
    position: absolute;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: vts-circle-shake 1s infinite ease-in-out;
}

.vts-img-circle img {
    max-height: 25px;
    max-width: 27px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Phone button - Red */
#vts-tel .vts-circle-fill {
    background-color: rgba(221, 51, 51, 0.7);
    box-shadow: 0 0 0 0 #dd3333;
}

#vts-tel .vts-img-circle {
    background-color: #dd3333;
}

/* Zalo button - Blue */
#vts-zalo .vts-circle-fill {
    background-color: rgba(33, 150, 243, 0.7);
    box-shadow: 0 0 0 0 #2196F3;
}

#vts-zalo .vts-img-circle {
    background-color: #2196F3;
}

/* Messenger button - Blue */
#vts-messenger .vts-circle-fill {
    background-color: rgba(0, 132, 255, 0.7);
    box-shadow: 0 0 0 0 #0084ff;
}

#vts-messenger .vts-img-circle {
    background-color: #0084ff;
}

/* Facebook button - Blue */
#vts-facebook .vts-circle-fill {
    background-color: rgba(24, 119, 242, 0.7);
    box-shadow: 0 0 0 0 #1877f2;
}

#vts-facebook .vts-img-circle {
    background-color: #1877f2;
}

/* Register button - Orange */
#vts-register .vts-circle-fill {
    background-color: rgba(255, 152, 0, 0.7);
    box-shadow: 0 0 0 0 #ff9800;
}

#vts-register .vts-img-circle {
    background-color: #ff9800;
}

/* Contact button - Green */
#vts-contact .vts-circle-fill {
    background-color: rgba(103, 226, 36, 0.7);
    box-shadow: 0 0 0 0 #67e224;
}

#vts-contact .vts-img-circle {
    background-color: #67e224;
}

/* Custom button - Purple */
#vts-custom .vts-circle-fill {
    background-color: rgba(156, 39, 176, 0.7);
    box-shadow: 0 0 0 0 #9c27b0;
}

#vts-custom .vts-img-circle {
    background-color: #9c27b0;
}

/* WhatsApp button - Green */
#vts-whatsapp .vts-circle-fill {
    background-color: rgba(37, 211, 102, 0.7);
    box-shadow: 0 0 0 0 #25d366;
}

#vts-whatsapp .vts-img-circle {
    background-color: #25d366;
}

/* Viber button - Purple */
#vts-viber .vts-circle-fill {
    background-color: rgba(102, 92, 172, 0.7);
    box-shadow: 0 0 0 0 #665CAC;
}

#vts-viber .vts-img-circle {
    background-color: #665CAC;
}

/* Telegram button - Blue */
#vts-telegram .vts-circle-fill {
    background-color: rgba(0, 136, 204, 0.7);
    box-shadow: 0 0 0 0 #0088cc;
}

#vts-telegram .vts-img-circle {
    background-color: #0088cc;
}

/* Transition cho container */
#vts-all-buttons .vts-contact-item {
    transition: 1.6s all;
}

/* Hover effects */
.vts-contact-btn:hover .vts-circle-fill {
    animation-duration: 0.8s;
    transform: scale(1.1);
}

.vts-contact-btn:hover .vts-img-circle {
    animation-duration: 0.5s;
}

/* Tooltip/Label khi hover */
.vts-contact-item {
    position: relative;
}

.vts-contact-tooltip {
    position: absolute;
    right: 100px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99999;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.vts-contact-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.8);
}

.vts-contact-btn:hover + .vts-contact-tooltip,
.vts-contact-item:hover .vts-contact-tooltip {
    opacity: 1;
    visibility: visible;
    right: 105px;
}

/* Left position tooltips */
#vts-contact-container.vts-left .vts-contact-tooltip {
    right: auto;
    left: 100px;
}

#vts-contact-container.vts-left .vts-contact-tooltip::after {
    left: auto;
    right: 100%;
    border-left-color: transparent;
    border-right-color: rgba(0, 0, 0, 0.8);
}

#vts-contact-container.vts-left .vts-contact-btn:hover + .vts-contact-tooltip,
#vts-contact-container.vts-left .vts-contact-item:hover .vts-contact-tooltip {
    left: 105px;
}

/* Animations */
@keyframes vts-circle-shake {
    0%, 50%, 100% {
        transform: rotate(0) scale(1) skew(1deg);
    }
    10%, 30% {
        transform: rotate(-25deg) scale(1) skew(1deg);
    }
    20%, 40% {
        transform: rotate(25deg) scale(1) skew(1deg);
    }
}

@keyframes vts-zoom {
    0%, 100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 transparent;
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 15px transparent;
    }
}

/* Responsive */
@media (max-width: 768px) {
    #vts-contact-container {
        bottom: 5%;
    }
    
    #vts-contact-container.vts-right {
        right: 2%;
    }
    
    #vts-contact-container.vts-left {
        left: 2%;
    }
    
    .vts-contact-btn {
        width: 70px !important;
        height: 70px !important;
    }
    
    .vts-circle-fill {
        width: 50px !important;
        height: 50px !important;
        top: 10px !important;
        left: 10px !important;
    }
    
    .vts-img-circle {
        width: 30px !important;
        height: 30px !important;
        top: 20px !important;
        left: 20px !important;
    }
    
    .vts-img-circle img {
        max-height: 18px !important;
        max-width: 20px !important;
    }
    
    /* Mobile tooltip adjustments */
    .vts-contact-tooltip {
        font-size: 12px !important;
        padding: 6px 10px !important;
        right: 80px !important;
    }
    
    .vts-contact-btn:hover + .vts-contact-tooltip,
    .vts-contact-item:hover .vts-contact-tooltip {
        right: 85px !important;
    }
    
    #vts-contact-container.vts-left .vts-contact-tooltip {
        left: 80px !important;
    }
    
    #vts-contact-container.vts-left .vts-contact-btn:hover + .vts-contact-tooltip,
    #vts-contact-container.vts-left .vts-contact-item:hover .vts-contact-tooltip {
        left: 85px !important;
    }
}

/* Hide/Show on specific devices */
@media (max-width: 767px) {
    #vts-contact-container.vts-mobile-hidden {
        display: none !important;
    }
}

@media (min-width: 768px) {
    #vts-contact-container.vts-desktop-hidden {
        display: none !important;
    }
}