/**
 * Pulsey ERP — Floating WhatsApp Widget Stylesheet
 * Author: Hai Technologies LLC (pulsey.haitechnologies.com)
 */

#pulseyWhatsappWidget {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

[dir="rtl"] #pulseyWhatsappWidget {
    right: auto;
    left: 28px;
    flex-direction: row-reverse;
}

.whatsapp-tooltip {
    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 0.5rem 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
}

#pulseyWhatsappWidget:hover .whatsapp-tooltip,
#pulseyWhatsappWidget:focus-within .whatsapp-tooltip {
    display: flex !important;
}

@keyframes waPulse {
    0% { transform: scale(1); box-shadow: 0 8px 30px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 12px 35px rgba(37, 211, 102, 0.55), 0 0 0 16px rgba(37, 211, 102, 0); }
    100% { transform: scale(1); box-shadow: 0 8px 30px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-fab-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.45);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: waPulse 2.5s infinite;
}

.whatsapp-fab-btn:hover {
    transform: scale(1.1) rotate(5deg) !important;
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.65) !important;
}

.whatsapp-fab-btn:focus-visible {
    outline: 3px solid var(--primary, #ea580c) !important;
    outline-offset: 4px !important;
}

@media (max-width: 640px) {
    #pulseyWhatsappWidget {
        bottom: max(20px, env(safe-area-inset-bottom, 20px));
        right: max(20px, env(safe-area-inset-right, 20px));
    }
    [dir="rtl"] #pulseyWhatsappWidget {
        right: auto;
        left: max(20px, env(safe-area-inset-left, 20px));
    }
    .whatsapp-fab-btn {
        width: 52px !important;
        height: 52px !important;
        font-size: 28px !important;
    }
    .whatsapp-tooltip {
        display: none !important;
    }
}
