/* ============================================================
   ANIMATED CHAT WIDGET - Customer Support Bottom Right
   ============================================================ */
.whatsapp-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    gap: 15px;
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    animation: widgetReveal 0.5s ease 1s forwards;
}

.whatsapp-chat-widget.show {
    opacity: 1;
    transform: translateY(0);
}

@keyframes widgetReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-avatar {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 25px rgba(2, 62, 88, 0.35), 0 0 0 3px rgba(235, 113, 29, 0.15);
    border: 4px solid #fff;
    cursor: pointer;
    animation: bounce 2s infinite;
    position: relative;
}

.chat-avatar::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    animation: pulse-ring 2s infinite;
}

.chat-avatar::after {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 2px solid var(--secondary);
    animation: pulse-ring 2s infinite 0.6s;
    opacity: 0.6;
}

.chat-avatar i {
    font-size: 2rem;
    color: #fff;
    animation: wave 1.5s ease-in-out infinite;
}

.chat-bubble {
    background: #fff;
    padding: 12px 18px;
    border-radius: 20px 20px 4px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    max-width: 240px;
    animation: fadeInRight 0.5s ease;
}

.chat-bubble-tail {
    position: absolute;
    bottom: 0;
    right: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 10px 10px;
    border-color: transparent transparent #fff transparent;
}

.chat-message {
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    display: block;
}

.whatsapp-chat-widget:hover .chat-avatar {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 30px rgba(235, 113, 29, 0.5);
}

.whatsapp-chat-widget:hover .chat-bubble {
    transform: translateX(-5px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-ring {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.3); }
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 768px) {
    .whatsapp-chat-widget {
        bottom: 20px;
        right: 20px;
    }
    
    .chat-avatar {
        width: 60px;
        height: 60px;
    }
    
    .chat-avatar i {
        font-size: 1.6rem;
    }
    
    .chat-bubble {
        max-width: 200px;
        padding: 10px 14px;
    }

    .chat-message {
        font-size: 0.85rem;
    }
}
