/* =========================================================
   Botón flotante de WhatsApp — I.E. 10153
   Todo el contenido se administra desde el panel
   (módulo «WhatsApp Flotante»).
   ========================================================= */

.wa-float {
    position: fixed;
    bottom: 32px;
    left: 28px;
    z-index: 9989;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

/* ── Botón circular ── */
#wa-btn {
    position: relative;
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366 0%, #128c4e 100%);
    box-shadow: 0 6px 22px rgba(37, 211, 102, .45), 0 2px 6px rgba(0, 0, 0, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    transition: transform .28s cubic-bezier(.4, 0, .2, 1), box-shadow .28s ease, background .28s ease;
    animation: wa-idle 3s ease-in-out 2s infinite;
}

#wa-btn:hover,
#wa-btn:focus {
    background: linear-gradient(135deg, #20c45a 0%, #0e6e3b 100%);
    box-shadow: 0 10px 30px rgba(37, 211, 102, .55), 0 4px 10px rgba(0, 0, 0, .22);
    transform: translateY(-4px) scale(1.08);
    animation: none;
    color: #fff;
    text-decoration: none;
}

@keyframes wa-idle {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-5px) scale(1.05); }
}

/* Pulso verde exterior */
#wa-btn::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, .45);
    animation: wa-ring 2.4s ease-out infinite;
    pointer-events: none;
}

@keyframes wa-ring {
    0%   { transform: scale(1);   opacity: .7; }
    100% { transform: scale(1.7); opacity: 0; }
}

/* ── Contador (badge) ── */
.wa-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-family: "Open Sans", sans-serif;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
    pointer-events: none;
}

/* ── Etiqueta junto al botón ── */
.wa-label {
    font-family: "Open Sans", sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #128c4e;
    background: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 14px rgba(10, 26, 58, .15);
    margin-bottom: 14px;
    white-space: nowrap;
    text-decoration: none;
}

.wa-label:hover {
    color: #0e6e3b;
    text-decoration: none;
}

/* ── Burbuja de mensaje ── */
.wa-bubble {
    position: absolute;
    bottom: 68px;
    left: 0;
    max-width: 280px;
    background: #ffffff;
    border-radius: 14px;
    padding: 12px 40px 12px 16px;
    box-shadow: 0 10px 30px rgba(10, 26, 58, .18);
    font-family: "Open Sans", sans-serif;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .35s ease, transform .35s ease, visibility .35s;
}

.wa-bubble.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wa-bubble .l1 {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #0a1a3a;
    line-height: 1.35;
}

.wa-bubble .l2 {
    display: block;
    font-size: 12.5px;
    color: #64748b;
    margin-top: 3px;
    line-height: 1.35;
}

/* Punta de la burbuja */
.wa-bubble::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 20px;
    width: 14px;
    height: 14px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: 3px 3px 8px rgba(10, 26, 58, .08);
}

/* Cerrar burbuja */
.wa-bubble-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.wa-bubble-close:hover { color: #0a1a3a; }

/* ── Móvil ── */
@media (max-width: 576px) {
    .wa-float { bottom: 24px; left: 16px; }
    #wa-btn { width: 50px; height: 50px; font-size: 24px; }
    .wa-label { display: none; }
    .wa-bubble { max-width: 220px; bottom: 62px; }
}
