.whatsapp-float {
    position: fixed;
    height: 60px;
    width: 60px; /* Start fixed small */
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 30px;
    text-align: center;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Animate width explicitly */
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.3s ease;
    text-decoration: none;
    overflow: hidden;
    padding: 0;
}

.whatsapp-float:hover {
    width: 260px; /* Force spread width */
    background-color: #128C7E;
    padding-left: 0; /* Reset/Keep clean */
    padding-right: 0;
}

.whatsapp-text {
    opacity: 0;
    white-space: nowrap;
    overflow: hidden;
    /* Collapsed initially so icon centers correctly */
    max-width: 0;
    margin-right: 0;
    transition: opacity 0.3s ease 0.2s, max-width 0.6s ease, margin-right 0.6s ease;
    font-size: 15px;
    font-weight: 500;
}

.whatsapp-float:hover .whatsapp-text {
    opacity: 1;
    max-width: 200px;
    margin-right: 10px;
}

.whatsapp-float svg {
    /* Prevent icon from squishing */
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    margin: 0;
}

/* Remove transform scale on hover to avoid conflicting with expansion or looking weird */
.whatsapp-float:hover {
    transform: none; 
}

@keyframes pulse-green-subtle {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(37, 211, 102, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
.whatsapp-pulse {
    animation: pulse-green-subtle 3s infinite;
}
