/* =========================================================
   PREMIUM WHATSAPP FLOATING BUTTON
   Royal Night Theme
   Purple + Gold + WhatsApp Emerald
   ========================================================= */

.whatsapp-float {
    position: fixed;
    right: 24px;
    bottom: 24px;

    width: 64px;
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;

    background:
        linear-gradient(
            145deg,
            #22c55e 0%,
            #16a34a 55%,
            #087f46 100%
        );

    border: 1px solid rgba(255, 255, 255, 0.22);

    border-radius: 20px;

    box-shadow:
        0 16px 38px rgba(0, 0, 0, 0.48),
        0 0 28px rgba(34, 197, 94, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.30);

    z-index: 99999;

    transition:
        transform 0.28s cubic-bezier(.2,.8,.2,1),
        box-shadow 0.28s ease,
        border-color 0.28s ease;
}


/* ---------- Premium Shine ---------- */

.whatsapp-float::before {
    content: "";

    position: absolute;

    top: 0;
    left: -100%;

    width: 60%;
    height: 100%;

    transform: skewX(-20deg);

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,.30),
        transparent
    );

    transition: left .65s ease;

    pointer-events: none;
}


.whatsapp-float:hover::before {
    left: 140%;
}


/* ---------- Outer Glow Ring ---------- */

.whatsapp-float::after {
    content: "";

    position: absolute;

    inset: -6px;

    border-radius: 24px;

    border: 1px solid rgba(34, 197, 94, 0.28);

    opacity: 0;

    transform: scale(.88);

    pointer-events: none;

    animation: whatsappGlow 2.8s ease-out infinite;
}


/* ---------- Icon ---------- */

.whatsapp-float-icon {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;

    z-index: 2;
}


.whatsapp-float-icon svg {
    width: 34px;
    height: 34px;

    fill: #ffffff;

    filter:
        drop-shadow(0 2px 5px rgba(0,0,0,.25));

    transition:
        transform .28s ease,
        filter .28s ease;
}


/* ---------- Hover ---------- */

.whatsapp-float:hover {
    transform:
        translateY(-5px)
        scale(1.05);

    border-color:
        rgba(245, 196, 81, 0.55);

    box-shadow:
        0 22px 50px rgba(0, 0, 0, 0.55),
        0 0 35px rgba(34, 197, 94, 0.30),
        0 0 0 1px rgba(245, 196, 81, 0.10),
        inset 0 1px 0 rgba(255,255,255,.35);
}


.whatsapp-float:hover .whatsapp-float-icon svg {
    transform:
        scale(1.12)
        rotate(-5deg);

    filter:
        drop-shadow(0 3px 8px rgba(255,255,255,.25));
}


/* ---------- Tooltip ---------- */

.whatsapp-float-tooltip {
    position: absolute;

    right: 78px;
    top: 50%;

    transform:
        translateY(-50%)
        translateX(12px);

    padding: 9px 14px;

    background:
        linear-gradient(
            145deg,
            #211a2d,
            #110d19
        );

    color: #ffffff;

    border:
        1px solid rgba(168, 85, 247, .28);

    border-radius: 10px;

    font-family:
        'Inter',
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        sans-serif;

    font-size: 13px;
    font-weight: 650;

    letter-spacing: .01em;

    white-space: nowrap;

    box-shadow:
        0 12px 30px rgba(0,0,0,.40),
        0 0 20px rgba(168,85,247,.08);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity .22s ease,
        transform .22s ease;

    pointer-events: none;
}


/* Tooltip arrow */

.whatsapp-float-tooltip::after {
    content: "";

    position: absolute;

    right: -6px;
    top: 50%;

    width: 10px;
    height: 10px;

    transform:
        translateY(-50%)
        rotate(45deg);

    background: #181220;

    border-top:
        1px solid rgba(168,85,247,.28);

    border-right:
        1px solid rgba(168,85,247,.28);
}


.whatsapp-float:hover .whatsapp-float-tooltip {
    opacity: 1;
    visibility: visible;

    transform:
        translateY(-50%)
        translateX(0);
}


/* ---------- Online Status ---------- */

.whatsapp-online {
    position: absolute;

    right: 5px;
    bottom: 5px;

    width: 11px;
    height: 11px;

    background: #22c55e;

    border-radius: 50%;

    border:
        2px solid #15111e;

    box-shadow:
        0 0 10px rgba(34,197,94,.85);

    z-index: 4;
}


/* ---------- Animations ---------- */

@keyframes whatsappGlow {

    0% {
        opacity: 0;
        transform: scale(.88);
    }

    35% {
        opacity: .55;
    }

    70% {
        opacity: 0;
        transform: scale(1.16);
    }

    100% {
        opacity: 0;
        transform: scale(1.16);
    }
}


/* ---------- Mobile ---------- */

@media (max-width: 768px) {

    .whatsapp-float {
        width: 58px;
        height: 58px;

        right: 17px;
        bottom: 80px;

        border-radius: 18px;
    }

    .whatsapp-float-icon,
    .whatsapp-float-icon svg {
        width: 31px;
        height: 31px;
    }

    .whatsapp-float-tooltip {
        display: none;
    }

    .whatsapp-online {
        width: 10px;
        height: 10px;

        right: 4px;
        bottom: 4px;
    }
}


/* ---------- Small Phones ---------- */

@media (max-width: 380px) {

    .whatsapp-float {
        width: 54px;
        height: 54px;

        right: 14px;
        bottom: 14px;

        border-radius: 16px;
    }

    .whatsapp-float-icon,
    .whatsapp-float-icon svg {
        width: 29px;
        height: 29px;
    }
}


/* ---------- Accessibility ---------- */

@media (prefers-reduced-motion: reduce) {

    .whatsapp-float,
    .whatsapp-float *,
    .whatsapp-float::before,
    .whatsapp-float::after {
        animation: none !important;
        transition: none !important;
    }
}