/* ==========================================================================
   Légal Empresa — Botón flotante de WhatsApp (js/whatsapp-float.js)
   z-index 1500: por encima del contenido y del header (1000-1001), por debajo
   del aviso de cookies (2000) y del popup de promoción (2100).
   ========================================================================== */

.wa-float {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 1500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background-color: #25d366; /* verde oficial de WhatsApp: se reconoce al instante */
    color: #fff;
    font-family: var(--font, 'Poppins', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif);
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(11, 18, 12, 0.30), 0 2px 6px rgba(11, 18, 12, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    animation: waEntrada 0.5s 1s cubic-bezier(0.3, 1.5, 0.5, 1) backwards; /* backwards: deja libre el transform del hover */
}

/* Halo que late para llamar la atención; sigue la forma del botón
   (círculo en celular, píldora en escritorio). */
.wa-float::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    animation: waPulso 2.4s 2s ease-out infinite;
}

.wa-float:hover {
    background-color: #1ebe5b;
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(11, 18, 12, 0.34), 0 3px 8px rgba(11, 18, 12, 0.2);
}

.wa-float:focus-visible {
    outline: 3px solid var(--verde-lima, #84b72e);
    outline-offset: 4px;
}

.wa-float__icon {
    flex: none;
    width: 32px;
    height: 32px;
}

.wa-float__label {
    display: none;
}

@keyframes waEntrada {
    from { opacity: 0; transform: translateY(20px) scale(0.6); }
    to { opacity: 1; transform: none; }
}

@keyframes waPulso {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
    70%, 100% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
}

/* Escritorio: píldora con texto. */
@media (min-width: 768px) {
    .wa-float {
        right: 28px;
        bottom: 28px;
        width: auto;
        height: 60px;
        gap: 10px;
        padding: 0 22px 0 16px;
    }

    .wa-float__label {
        display: block;
        font-size: 14.5px;
        font-weight: 500;
        line-height: 1;
        white-space: nowrap;
    }

    .wa-float__label strong {
        font-weight: 700;
    }
}

@media print {
    .wa-float {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wa-float,
    .wa-float::before {
        animation: none;
    }

    .wa-float {
        transition: none;
    }
}
