/* Floating WhatsApp — hamesha visible + subtle animation */
@keyframes wa-float-bob {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes wa-pulse-ring {
    0% {
        box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.55);
    }
    70% {
        box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 0 0 14px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@keyframes wa-icon-pop {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

.whatsapp-float {
    position: fixed;
    z-index: 999;
    bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    left: 28px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #25d366;
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
    text-decoration: none !important;
    opacity: 1;
    visibility: visible;
    animation: wa-float-bob 3s ease-in-out infinite, wa-pulse-ring 2.2s ease-out infinite;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.2s ease;
}

.whatsapp-float i {
    animation: wa-icon-pop 2.4s ease-in-out infinite;
    transition: transform 0.25s ease;
}

.whatsapp-float:hover {
    color: #fff !important;
    animation: none;
    transform: scale(1.1);
    background: #20bd5a;
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.55);
}

.whatsapp-float:hover i {
    animation: none;
    transform: scale(1.05);
}

.whatsapp-float:focus {
    outline: none;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 0 0 3px rgba(37, 211, 102, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    .whatsapp-float,
    .whatsapp-float i {
        animation: none;
    }
}

@media (max-width: 991px) {
    .whatsapp-float {
        left: auto;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 26px;
    }

    body:has(#platformProfilesStrip) .whatsapp-float {
        bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    }

    body:not(:has(#platformProfilesStrip)) .whatsapp-float {
        bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }

    body:has(#platformProfilesStrip) .go-to-top.is-visible {
        bottom: calc(140px + env(safe-area-inset-bottom, 0px));
        right: 16px;
        display: flex !important;
    }
}

@media (max-width: 767px) {
    .whatsapp-float {
        right: 12px;
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    body:has(#platformProfilesStrip) .whatsapp-float {
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    body:not(:has(#platformProfilesStrip)) .whatsapp-float {
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }

    body:has(#platformProfilesStrip) .go-to-top.is-visible {
        bottom: calc(128px + env(safe-area-inset-bottom, 0px));
        right: 12px;
    }
}
