/* ==========================================================================
   BOTÓN FLOTANTE DE WHATSAPP (PUBLICIDAD RINCÓN)
   Estética limpia con CSS puro BEM, ondas de pulso y tooltip reactivo.
   ========================================================================== */

.whatsapp-float {
    position: fixed;
    bottom: 38px;
    right: 38px;
    z-index: 9990;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background-color: #25D366;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(37, 211, 102, 0.4), 0 6px 16px rgba(0, 26, 53, 0.18);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                background-color 0.3s ease,
                box-shadow 0.3s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.whatsapp-float:hover {
    background-color: #1ebe57;
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 14px 32px rgba(37, 211, 102, 0.48), 0 6px 18px rgba(0, 26, 53, 0.2);
}

.whatsapp-float:active {
    transform: scale(0.96);
}

/* Ondas de pulso concéntricas animadas */
.whatsapp-float__ping,
.whatsapp-float__ping-outer {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-color: #25D366;
    pointer-events: none;
    z-index: 1;
}

.whatsapp-float__ping {
    animation: whatsappPing 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.whatsapp-float__ping-outer {
    inset: -3px;
    animation: whatsappPing 2.6s cubic-bezier(0, 0, 0.2, 1) 0.35s infinite;
}

@keyframes whatsappPing {
    0% {
        transform: scale(0.95);
        opacity: 0.55;
    }
    70%, 100% {
        transform: scale(1.65);
        opacity: 0;
    }
}

/* Resplandor suave al interactuar */
.whatsapp-float__glow {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #34eb75, #25D366);
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.whatsapp-float:hover .whatsapp-float__glow {
    opacity: 0.65;
}

/* Ícono SVG oficial */
.whatsapp-float__icon {
    position: relative;
    z-index: 3;
    width: 42px;
    height: 42px;
    fill: #ffffff;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-float:hover .whatsapp-float__icon {
    transform: scale(1.1) rotate(-3deg);
}

/* Tooltip lateral "¡Escríbenos!" */
.whatsapp-float__tooltip {
    position: absolute;
    right: calc(100% + 16px);
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    background-color: #001a35;
    color: #ffffff;
    font-family: var(--font-primary, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 8px 16px;
    border-radius: 9px;
    box-shadow: 0 8px 24px rgba(0, 26, 53, 0.25);
    border: 1px solid rgba(0, 195, 255, 0.25);
    opacity: 0;
    visibility: hidden;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.3s ease;
    z-index: 10;
}

.whatsapp-float__tooltip-arrow {
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background-color: #001a35;
    border-top: 1px solid rgba(0, 195, 255, 0.25);
    border-right: 1px solid rgba(0, 195, 255, 0.25);
}

.whatsapp-float:hover .whatsapp-float__tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* Accesibilidad y adaptación responsiva en dispositivos móviles */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 66px;
        height: 66px;
        bottom: 28px;
        right: 28px;
    }

    .whatsapp-float__icon {
        width: 36px;
        height: 36px;
    }

    .whatsapp-float__tooltip {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .whatsapp-float__ping,
    .whatsapp-float__ping-outer {
        animation: none;
        display: none;
    }

    .whatsapp-float,
    .whatsapp-float__icon {
        transition: none;
    }
}

