/* static/css/wbubble.css */
/* Burbuja de WhatsApp -- oculta mientras el hero está a la vista, aparece
   con una entrada suave al bajar (controlado por js/whatsappBubble.js vía
   la clase .is-visible). Diseño más "widget de chat profesional" que
   ícono flotante: círculo con anillo de pulso sutil, se expande a pill
   con texto en hover/foco. */

.whatsapp-bubble {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999;
    display: inline-flex;
    align-items: center;
    height: 58px;
    min-width: 58px;
    padding: 0;
    border-radius: 50px;
    background: linear-gradient(160deg, #2fdb75 0%, #20b95c 100%);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(15, 28, 51, 0.28), 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    overflow: hidden;

    /* Oculta por defecto; JS agrega .is-visible al salir del hero */
    opacity: 0;
    transform: translateY(16px) scale(0.92);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.25s ease, width 0.3s ease;
}

.whatsapp-bubble.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Anillo de pulso sutil -- reemplaza la animación de rebote anterior,
   se siente más "señal en vivo" que juguete */
.whatsapp-bubble::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50px;
    border: 2px solid rgba(47, 219, 117, 0.55);
    animation: wa-pulse 2.4s ease-out infinite;
    pointer-events: none;
}

@keyframes wa-pulse {
    0% {
        opacity: 0.7;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.35);
    }
}

.whatsapp-bubble-icon {
    flex: 0 0 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    position: relative;
    z-index: 1;
}

.whatsapp-bubble-label {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: max-width 0.35s ease, padding 0.35s ease;
    position: relative;
    z-index: 1;
}

.whatsapp-bubble:hover,
.whatsapp-bubble:focus-visible {
    box-shadow: 0 10px 28px rgba(15, 28, 51, 0.35), 0 3px 10px rgba(0, 0, 0, 0.2);
}

.whatsapp-bubble:hover .whatsapp-bubble-label,
.whatsapp-bubble:focus-visible .whatsapp-bubble-label {
    max-width: 160px;
    padding-right: 22px;
}

/* Ajustes responsive */
@media (max-width: 768px) {
    .whatsapp-bubble {
        height: 52px;
        min-width: 52px;
        bottom: 20px;
        right: 20px;
    }
    .whatsapp-bubble-icon {
        flex-basis: 52px;
        height: 52px;
        font-size: 24px;
    }
    /* En touch no hay hover real -- el label nunca se expande, evita que
       quede "pegado" abierto por accidente */
    .whatsapp-bubble-label {
        display: none;
    }
}