/* ============================================
   WhatsApp Floating Button — BarraTouch
   Phase 2.1 CRO Component
   
   Posición:  fixed bottom-right
   Tracking:  automático via gtm-datalayer.js
              (selector a[href*="wa.me"])
   ============================================ */

.whatsapp-float {
    position: fixed;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    right: 24px;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: #25D366;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: whatsappFadeSlideUp 0.5s 0.3s ease-out both;
}

.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

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

.whatsapp-float svg {
    width: 26px;
    height: 26px;
    fill: #fff;
    pointer-events: none;
}

/* ─── Tooltip (desktop only) ────────────────── */
.whatsapp-float::after {
    content: 'Escribinos por WhatsApp';
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #1f2937;
    color: #fff;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.whatsapp-float:hover::after {
    opacity: 1;
}

/* ─── Entrance animation ───────────────────── */
@keyframes whatsappFadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Mobile: bigger tap target, safe area ─── */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 56px;
        height: 56px;
        bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        right: 16px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }

    /* sin tooltip en mobile */
    .whatsapp-float::after {
        display: none;
    }
}