/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    outline: none;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.whatsapp-float:active {
    transform: scale(0.95);
}

/* Icono de WhatsApp - CENTRADO PERFECTAMENTE */
.whatsapp-float i {
    color: white;
    font-size: 30px;
    line-height: 1;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tooltip del botón */
.whatsapp-float::before {
    content: "¡Escríbenos por WhatsApp!";
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-family: Arial, sans-serif;
    font-weight: normal;
}

.whatsapp-float::after {
    content: "";
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.whatsapp-float:hover::before,
.whatsapp-float:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Animación de pulso */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-float.pulse {
    animation: pulse 2s infinite;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 15px;
        right: 15px;
        font-size: 26px;
    }
    
    .whatsapp-float i {
        font-size: 26px;
    }
    
    .whatsapp-float::before {
        font-size: 12px;
        padding: 6px 10px;
        right: 65px;
    }
    
    .whatsapp-float::after {
        right: 55px;
        border-width: 5px;
    }
}

@media screen and (max-width: 480px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 10px;
        right: 10px;
        font-size: 22px;
    }
    
    .whatsapp-float i {
        font-size: 22px;
    }
    
    .whatsapp-float::before {
        font-size: 11px;
        padding: 5px 8px;
        right: 60px;
    }
    
    .whatsapp-float::after {
        right: 50px;
        border-width: 4px;
    }
}

/* Ocultar tooltip en móviles */
@media screen and (max-width: 768px) {
    .whatsapp-float::before,
    .whatsapp-float::after {
        display: none;
    }
}

/* Accesibilidad */
.whatsapp-float:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
    .whatsapp-float {
        box-shadow: 2px 2px 6px rgba(255, 255, 255, 0.1);
    }
    
    .whatsapp-float:hover {
        box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
    }
}

/* Fallback para emoji si no hay Font Awesome */
.whatsapp-float.emoji-fallback {
    font-size: 24px;
    line-height: 60px;
    text-align: center;
}

@media screen and (max-width: 768px) {
    .whatsapp-float.emoji-fallback {
        font-size: 22px;
        line-height: 55px;
    }
}

@media screen and (max-width: 480px) {
    .whatsapp-float.emoji-fallback {
        font-size: 20px;
        line-height: 50px;
    }
}