/* Contact Icons - 2 bên màn hình */
.contact-icons-left {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-icons-right {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Legacy support - nếu dùng class cũ, đặt bên phải */
.contact-icons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
    text-decoration: none;
}

.contact-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

/* Zalo Icon */
.contact-icon.zalo {
    background: linear-gradient(135deg, #0068FF, #0180FF);
}

.contact-icon.zalo img {
    width: 35px;
    height: 35px;
    filter: brightness(0) invert(1);
}

/* Messenger Icon */
.contact-icon.messenger {
    background: linear-gradient(135deg, #0084FF, #00C6FF);
}

.contact-icon.messenger img {
    width: 35px;
    height: 35px;
    filter: brightness(0) invert(1);
}

/* Phone Icon */
.contact-icon.phone {
    background: linear-gradient(135deg, #34C759, #30D158);
    animation: ring 3s infinite;
}

.contact-icon.phone i {
    font-size: 28px;
    color: white;
}

/* WhatsApp Icon */
.contact-icon.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.contact-icon.whatsapp i {
    font-size: 28px;
    color: white;
}

/* Email Icon */
.contact-icon.email {
    background: linear-gradient(135deg, #EA4335, #D93025);
}

.contact-icon.email i {
    font-size: 28px;
    color: white;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(0, 100, 255, 0.5);
    }
}

@keyframes ring {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30% {
        transform: rotate(-15deg);
    }
    20%, 40% {
        transform: rotate(15deg);
    }
}

/* Tooltip - Hiển thị text khi hover */
.contact-icon::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 75px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.contact-icon::after {
    content: '';
    position: absolute;
    right: 65px;
    border: 8px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Tooltip cho icons bên trái - hiển thị bên phải */
.contact-icons-left .contact-icon::before {
    left: 75px;
    right: auto;
}

.contact-icons-left .contact-icon::after {
    left: 65px;
    right: auto;
    border-left-color: transparent;
    border-right-color: rgba(0, 0, 0, 0.8);
}

.contact-icon:hover::before,
.contact-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .contact-icons,
    .contact-icons-left,
    .contact-icons-right {
        bottom: 15px;
        gap: 10px;
    }

    .contact-icons-left {
        left: 15px;
    }

    .contact-icons-right {
        right: 15px;
    }

    .contact-icon {
        width: 50px;
        height: 50px;
    }

    .contact-icon.zalo img,
    .contact-icon.messenger img {
        width: 28px;
        height: 28px;
    }

    .contact-icon.phone i,
    .contact-icon.whatsapp i,
    .contact-icon.email i {
        font-size: 24px;
    }

    /* Tooltip cho bên trái */
    .contact-icons-left .contact-icon::before {
        left: 75px;
        right: auto;
    }

    .contact-icons-left .contact-icon::after {
        left: 65px;
        right: auto;
        border-left-color: transparent;
        border-right-color: rgba(0, 0, 0, 0.8);
    }

    /* Tooltip cho bên phải */
    .contact-icons-right .contact-icon::before {
        right: 65px;
        font-size: 12px;
        padding: 6px 12px;
    }

    .contact-icons-right .contact-icon::after {
        right: 55px;
        border-width: 6px;
    }
}

/* Very small mobile */
@media (max-width: 480px) {
    .contact-icons {
        bottom: 10px;
        right: 10px;
        gap: 8px;
    }

    .contact-icon {
        width: 45px;
        height: 45px;
    }

    .contact-icon.zalo img,
    .contact-icon.messenger img {
        width: 25px;
        height: 25px;
    }

    .contact-icon.phone i {
        font-size: 22px;
    }
}

/* Print - Ẩn khi in */
@media print {
    .contact-icons {
        display: none;
    }
}
