/* =============================================
   WhatsApp Floating Button - Liam Vercceli
   ============================================= */

/* ── Wrapper principal ── */
.rm-wa-wrap {
    position: fixed;
    left: 24px;
    bottom: 32px;
    z-index: 99998;
    width: fit-content;
}

/* ── Burbuja de texto (tooltip) ── */
.rm-wa-bubble {
    background: #fff;
    color: #1a1a1a;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    padding: 10px 16px;
    border-radius: 14px 14px 14px 4px;
    box-shadow: 0 6px 28px rgba(0,0,0,0.14);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-12px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
    position: absolute;
    bottom: 76px;
    left: 0;
}

/* Triangulito inferior de la burbuja (izquierda) */
.rm-wa-bubble::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 18px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid #fff;
}

/* Mostrar burbuja solo cuando el JS activa la clase (hover del botón) */
.rm-wa-wrap.rm-wa-show-bubble .rm-wa-bubble {
    opacity: 1;
    transform: translateX(0);
}

/* ── Botón principal ── */
.rm-wa-btn {
    position: relative;
    width: 62px;
    height: 62px;
    background: linear-gradient(135deg, #25d366 0%, #128c5e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: rm-wa-bounce 2.8s ease-in-out infinite;
}

.rm-wa-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 10px 36px rgba(37, 211, 102, 0.60);
    animation-play-state: paused;
}

/* Icono WhatsApp */
.rm-wa-btn svg {
    width: 34px;
    height: 34px;
    fill: #fff;
    transition: transform 0.25s ease;
}

.rm-wa-btn:hover svg {
    transform: rotate(-8deg) scale(1.1);
}

/* ── Ping / ondas expansivas ── */
.rm-wa-btn::before,
.rm-wa-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.35);
    animation: rm-wa-ping 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.rm-wa-btn::after {
    animation-delay: 0.8s;
    background: rgba(37, 211, 102, 0.20);
}

/* ── Badge de notificación ── */
.rm-wa-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: #0d2137;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    animation: rm-wa-badge-pop 0.5s 1.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* ── Label texto bajo el botón ── */
.rm-wa-label {
    display: none;
}

/* ────────────────────────────────────────
   ANIMACIONES
   ──────────────────────────────────────── */

/* Rebote suave vertical */
@keyframes rm-wa-bounce {
    0%, 100% { transform: translateY(0);    }
    30%       { transform: translateY(-7px); }
    60%       { transform: translateY(-3px); }
}

/* Ping expansivo */
@keyframes rm-wa-ping {
    0%   { transform: scale(1);   opacity: 0.7; }
    80%  { transform: scale(2.1); opacity: 0;   }
    100% { transform: scale(2.1); opacity: 0;   }
}

/* Pop del badge */
@keyframes rm-wa-badge-pop {
    0%, 100% { transform: scale(1);    }
    40%      { transform: scale(1.4);  }
    70%      { transform: scale(0.85); }
}

/* ── Responsive ── */
@media (max-width: 575px) {
    .rm-wa-wrap {
        left: 14px;
        bottom: 20px;
    }
    .rm-wa-btn {
        width: 54px;
        height: 54px;
    }
    .rm-wa-btn svg {
        width: 28px;
        height: 28px;
    }
    .rm-wa-bubble { font-size: 12px; padding: 8px 12px; bottom: 68px; }
}
