/* =========================================================
   WhatsApp Floating Button — wfb-style.css
   ========================================================= */

#wfb-wrap {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction: row-reverse; /* tooltip على اليسار، زرار على اليمين */
}

/* ── الزرار الرئيسي ── */
#wfb-btn {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    border: none;
    outline: none;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.50);
    transition:
        transform  0.25s cubic-bezier(.34, 1.56, .64, 1),
        box-shadow 0.20s ease;
    animation: wfb-pop-in 0.55s cubic-bezier(.34, 1.56, .64, 1) both;
    flex-shrink: 0;
}

#wfb-btn:hover {
    transform: scale(1.13);
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.60);
}

#wfb-btn:active {
    transform: scale(0.94);
}

#wfb-btn svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
    display: block;
    pointer-events: none;
}

/* ── حلقة Pulse ── */
#wfb-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.40);
    animation: wfb-pulse 2.2s ease-out infinite;
    pointer-events: none;
}

/* ── Tooltip ── */
#wfb-tooltip {
    background: #ffffff;
    color: #1a1a1a;
    font-family: -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    padding: 9px 15px;
    border-radius: 50px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
    white-space: nowrap;
    pointer-events: none;

    /* مخفي بالأساس */
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

/* إظهار الـ tooltip عند hover على الـ wrap */
#wfb-wrap:hover #wfb-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* ── Keyframes ── */
@keyframes wfb-pulse {
    0%   { transform: scale(1);   opacity: 0.7; }
    65%  { transform: scale(1.75); opacity: 0; }
    100% { transform: scale(1.75); opacity: 0; }
}

@keyframes wfb-pop-in {
    0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg);   opacity: 1; }
}

/* ── موبايل ── */
@media screen and (max-width: 480px) {
    #wfb-wrap {
        bottom: 16px;
        right: 16px;
    }
    #wfb-btn {
        width: 54px;
        height: 54px;
    }
    #wfb-btn svg {
        width: 28px;
        height: 28px;
    }
    #wfb-tooltip {
        display: none;
    }
}
