/* =================================================== */
/* === FLOATING WHATSAPP CHAT BUTTON (FINAL V2)      === */
/* =================================================== */

.whatsapp-float {
    position: fixed;
    /* THE FIX: Increased bottom position to be above the back-to-top button */
    bottom: 85px; 
    right: 11px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128C7E;
    color: #fff;
}

/* --- The Tooltip Message (Now positioned to the left) --- */
.whatsapp-float .tooltip-text {
    visibility: hidden;
    width: 240px; /* Increased width slightly */
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1;
    /* THE FIX: New positioning logic for left side */
    top: 50%;
    right: 110%; /* Move it to the left of the button */
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* THE FIX: Arrow now points from the right */
.whatsapp-float .tooltip-text::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 100%; /* Position arrow on the right side of the tooltip */
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent #333; /* Arrow points left */
}

.whatsapp-float:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* --- NEW: Classes for JavaScript Animation --- */
.whatsapp-float .tooltip-show {
    visibility: visible;
    opacity: 1;
}

.whatsapp-float .tooltip-fade-out {
    opacity: 0;
    transition: opacity 0.5s ease; /* Fade out smoothly */
}


/* --- Responsive Adjustments for Mobile --- */
@media (max-width: 767px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 75px; /* Adjusted for mobile */
        right: 20px;
        font-size: 24px;
    }
    .whatsapp-float .tooltip-text {
        display: none;
    }
}