/* =============================================
   WhatsApp Floating Button - Premium Style
   ============================================= */

/* Floating Container */
.whatsapp-float {
    position: fixed !important;
    bottom: 30px;
    right: 30px;
    z-index: 2147483647 !important;
    display: flex !important;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Tooltip Label */
.whatsapp-float .wa-tooltip {
    background: #ffffff;
    color: #2d2d2d;
    font-family: 'Jost', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    position: relative;
}

/* Tooltip Arrow */
.whatsapp-float .wa-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent #ffffff;
}

/* Show tooltip on hover */
.whatsapp-float:hover .wa-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Main Button */
.whatsapp-float .wa-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    flex-shrink: 0;
}

/* Button Icon */
.whatsapp-float .wa-button svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
    transition: transform 0.3s ease;
}

/* Hover Effects */
.whatsapp-float:hover .wa-button {
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(37, 211, 102, 0.6);
    background: linear-gradient(135deg, #2be874 0%, #25d366 100%);
}

.whatsapp-float:hover .wa-button svg {
    transform: rotate(-10deg) scale(1.1);
}

/* Pulse Animation Ring */
.whatsapp-float .wa-button::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.35);
    animation: wa-pulse 2s ease-out infinite;
    z-index: -1;
}

/* Second Pulse Ring */
.whatsapp-float .wa-button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.2);
    animation: wa-pulse 2s ease-out infinite 0.5s;
    z-index: -1;
}

/* Stop pulse on hover for cleaner interaction */
.whatsapp-float:hover .wa-button::before,
.whatsapp-float:hover .wa-button::after {
    animation: none;
    opacity: 0;
}

/* Pulse Keyframes */
@keyframes wa-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* Entrance Animation Removed */

/* =============================================
   Responsive Adjustments
   ============================================= */

/* Tablet */
@media (max-width: 991px) {
    .whatsapp-float {
        bottom: 24px;
        right: 24px;
    }

    .whatsapp-float .wa-button {
        width: 56px;
        height: 56px;
    }

    .whatsapp-float .wa-button svg {
        width: 28px;
        height: 28px;
    }
}

/* Mobile */
@media (max-width: 575px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float .wa-button {
        width: 52px;
        height: 52px;
        box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    }

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

    /* Hide tooltip on mobile to save space */
    .whatsapp-float .wa-tooltip {
        display: none;
    }
}

/* Adjust position when scroll-to-top button is visible */
.scroll-top.show ~ .whatsapp-float,
body.scroll-active .whatsapp-float {
    bottom: 90px;
}

@media (max-width: 575px) {
    .scroll-top.show ~ .whatsapp-float,
    body.scroll-active .whatsapp-float {
        bottom: 80px;
    }
}

/* Dark Mode Support (if applicable) */
@media (prefers-color-scheme: dark) {
    .whatsapp-float .wa-tooltip {
        background: #1e1e2e;
        color: #e0e0e0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .whatsapp-float .wa-tooltip::after {
        border-color: transparent transparent transparent #1e1e2e;
    }
}
