/**
 * WhatsApp Chat Widget
 * Floating WhatsApp button with smart positioning and animations
 */

.whatsapp-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
}

.whatsapp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    position: relative;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.whatsapp-button svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.whatsapp-tooltip {
    position: absolute;
    left: 70px;
    background-color: #128C7E;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.whatsapp-button:hover .whatsapp-tooltip {
    opacity: 1;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #128C7E;
}

/* Pulse animation for attention */
@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-button.pulse {
    animation: whatsapp-pulse 2s infinite;
}

/* Hide on mobile if needed */
@media (max-width: 767px) {
    .whatsapp-widget {
        bottom: 15px;
        left: 15px;
    }

    .whatsapp-button {
        width: 50px;
        height: 50px;
    }

    .whatsapp-button svg {
        width: 26px;
        height: 26px;
    }

    .whatsapp-tooltip {
        display: none;
    }
}

/* RTL support */
[dir="rtl"] .whatsapp-widget {
    left: auto;
    right: 20px;
}

[dir="rtl"] .whatsapp-tooltip {
    left: auto;
    right: 70px;
}

[dir="rtl"] .whatsapp-tooltip::after {
    left: auto;
    right: -6px;
    border-right-color: transparent;
    border-left-color: #128C7E;
}
