/* ============================================
   BOTÓN FLOTANTE DE WHATSAPP - ROTAR
   ============================================ */

/* ── Wrapper contenedor (posición fija) ─────── */
.wa-wrapper {
    position: fixed;
    bottom: 28px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.wa-wrapper.wa-pos-right {
    right: 28px;
    left: auto;
}

.wa-wrapper.wa-pos-left {
    left: 28px;
    right: auto;
    align-items: flex-start;
}

@media (max-width: 480px) {
    .wa-wrapper.wa-pos-right {
        right: 16px;
        bottom: 20px;
    }

    .wa-wrapper.wa-pos-left {
        left: 16px;
        bottom: 20px;
    }
}

/* ── Globo CTA ──────────────────────────────── */
.wa-cta-bubble {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .16), 0 2px 8px rgba(0, 0, 0, .08);
    padding: 16px 16px 16px 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 280px;
    position: relative;

    /* Oculto por defecto */
    opacity: 0;
    transform: translateY(16px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Cola del globo apuntando al botón */
.wa-wrapper.wa-pos-right .wa-cta-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 22px;
    width: 16px;
    height: 16px;
    background: #fff;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .08));
}

.wa-wrapper.wa-pos-left .wa-cta-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 22px;
    width: 16px;
    height: 16px;
    background: #fff;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* Visible */
.wa-cta-bubble.wa-cta-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Salida */
.wa-cta-bubble.wa-cta-hiding {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
}

/* ── Avatar del globo ── */
.wa-cta-avatar {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(145deg, #25D366, #128C7E);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(37, 211, 102, .4);
}

.wa-cta-avatar svg {
    width: 26px;
    height: 26px;
    fill: #fff;
}

.wa-cta-online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 11px;
    height: 11px;
    background: #4ade80;
    border: 2px solid #fff;
    border-radius: 50%;
    animation: waOnlineBlink 2.5s ease-in-out infinite;
}

/* ── Contenido del globo ── */
.wa-cta-content {
    flex: 1;
    min-width: 0;
}

.wa-cta-name {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #128C7E;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.wa-cta-text {
    margin: 0 0 10px;
    font-size: 13.5px;
    line-height: 1.45;
    color: #1e293b;
    font-weight: 500;
}

.wa-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff !important;
    text-decoration: none !important;
    font-size: 12.5px;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 20px;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 3px 10px rgba(37, 211, 102, .4);
    letter-spacing: .2px;
}

.wa-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, .55);
    color: #fff !important;
}

/* ── Botón de cierre ── */
.wa-cta-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    font-size: 11px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background .2s, color .2s;
    padding: 0;
}

.wa-cta-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* ── Animación de entrada del wrapper completo ── */
.wa-wrapper {
    animation: waSlideIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 1.5s both;
}

@keyframes waSlideIn {
    from {
        transform: translateX(120px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.wa-wrapper.wa-pos-left {
    animation-name: waSlideInLeft;
}

@keyframes waSlideInLeft {
    from {
        transform: translateX(-120px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.whatsapp-float-btn {
    display: flex;
    align-items: center;
    gap: 0;
    cursor: pointer;
    text-decoration: none !important;
    font-family: 'Segoe UI', Arial, sans-serif;
    flex-shrink: 0;
}

/* Etiqueta de texto que aparece al hover */
.whatsapp-float-label {
    background: #ffffff;
    color: #128C7E;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 20px 0 0 20px;
    box-shadow: -3px 3px 12px rgba(0, 0, 0, 0.18);
    white-space: nowrap;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-width 0.4s ease, opacity 0.35s ease, padding 0.4s ease;
    letter-spacing: 0.3px;
}

.whatsapp-float-btn:hover .whatsapp-float-label {
    max-width: 180px;
    opacity: 1;
    padding: 8px 14px;
}

/* Círculo principal del botón */
.whatsapp-float-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(145deg, #25D366, #128C7E);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 6px 20px rgba(37, 211, 102, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.whatsapp-float-btn:hover .whatsapp-float-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow:
        0 10px 28px rgba(37, 211, 102, 0.65),
        0 4px 12px rgba(0, 0, 0, 0.25);
}

/* SVG del ícono WhatsApp */
.whatsapp-float-icon svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
    position: relative;
    z-index: 2;
}

/* Pulso de onda animada */
.whatsapp-float-icon::before,
.whatsapp-float-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.4);
    animation: waPulse 2.2s ease-out infinite;
    z-index: 1;
}

.whatsapp-float-icon::after {
    background: rgba(37, 211, 102, 0.25);
    animation-delay: 0.8s;
}

@keyframes waPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    70% {
        transform: scale(1.7);
        opacity: 0;
    }

    100% {
        transform: scale(1.7);
        opacity: 0;
    }
}

/* Punto verde de "en línea" */
.whatsapp-online-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    background: #4ade80;
    border-radius: 50%;
    border: 2px solid #fff;
    z-index: 3;
    animation: waOnlineBlink 2.5s ease-in-out infinite;
}

@keyframes waOnlineBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* Badge eliminado — sin número en el botón */

/* Responsive: botón más pequeño en móvil */
@media (max-width: 480px) {
    .whatsapp-float-icon {
        width: 54px;
        height: 54px;
    }

    .whatsapp-float-icon svg {
        width: 28px;
        height: 28px;
    }
}