/* WhatsApp Floating Widget Styles */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

/* Move WhatsApp button up when back-to-top button is visible */
.back-to-top.visible~.whatsapp-float,
body:has(.back-to-top.visible) .whatsapp-float {
    bottom: 100px;
    /* 30px (original bottom) + 50px (button height) + 20px (gap) */
}

.whatsapp-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    border: 3px solid #fff;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-button svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* Tooltip */
.whatsapp-tooltip {
    background: white;
    color: #333;
    padding: 12px 18px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Pulse animation */
@keyframes pulse-whatsapp {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 4px 25px rgba(37, 211, 102, 0.7),
            0 0 0 10px rgba(37, 211, 102, 0.1),
            0 0 0 20px rgba(37, 211, 102, 0.05);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }

    /* Adjust position when back-to-top is visible on mobile/tablet */
    .back-to-top.visible~.whatsapp-float,
    body:has(.back-to-top.visible) .whatsapp-float {
        bottom: 90px;
        /* 20px + 50px + 20px gap */
    }

    .whatsapp-button {
        width: 55px;
        height: 55px;
    }

    .whatsapp-button svg {
        width: 28px;
        height: 28px;
    }

    .whatsapp-tooltip {
        display: none;
        /* Hide tooltip on mobile */
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }

    /* Adjust position when back-to-top is visible on small mobile */
    .back-to-top.visible~.whatsapp-float,
    body:has(.back-to-top.visible) .whatsapp-float {
        bottom: 85px;
        /* 15px + 50px + 20px gap */
    }

    .whatsapp-button {
        width: 50px;
        height: 50px;
    }

    .whatsapp-button svg {
        width: 26px;
        height: 26px;
    }
}