/* ==========================================
   MENÚ FLOTANTE DE WHATSAPP POR DEPARTAMENTO
   ========================================== */

.wa-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 998; /* debajo del menú móvil (999) y de los modales */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    font-family: 'Poppins', sans-serif;
}

.wa-float-btn {
    position: relative;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    display: block;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(18, 140, 126, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wa-float-btn:hover {
    transform: scale(1.07);
    box-shadow: 0 10px 28px rgba(18, 140, 126, 0.5);
}

.wa-float-btn:focus-visible {
    outline: 3px solid #1e3a8a;
    outline-offset: 3px;
}

.wa-float-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25d366;
    z-index: -1;
    animation: waPulso 2.2s infinite;
}

.wa-float.open .wa-float-btn::after {
    animation: none;
}

.wa-float-btn i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.wa-float-btn .fa-times {
    font-size: 24px;
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg);
}

.wa-float.open .wa-float-btn .fa-whatsapp {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg);
}

.wa-float.open .wa-float-btn .fa-times {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0);
}

@keyframes waPulso {
    0% { transform: scale(1); opacity: 0.55; }
    80%, 100% { transform: scale(1.6); opacity: 0; }
}

.wa-float-menu {
    width: 300px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    transform-origin: bottom right;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.wa-float.open .wa-float-menu {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.wa-float-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: #fff;
}

.wa-float-header > i {
    font-size: 28px;
}

.wa-float-header strong {
    display: block;
    font-size: 15px;
    line-height: 1.3;
}

.wa-float-header span {
    font-size: 12px;
    opacity: 0.9;
}

.wa-float-menu ul {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.wa-float-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    color: #1f2937;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.wa-float-menu a:hover,
.wa-float-menu a:focus-visible {
    background: #f0fdf4;
    outline: none;
}

.wa-float-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #dcfce7;
    color: #128c7e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.wa-float-text {
    flex: 1;
    min-width: 0;
}

.wa-float-text strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.wa-float-text small {
    font-size: 12px;
    color: #6b7280;
}

.wa-float-arrow {
    font-size: 12px;
    color: #9ca3af;
}

@media (max-width: 600px) {
    .wa-float {
        right: 16px;
        bottom: 16px;
    }

    .wa-float-btn {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wa-float-btn::after { animation: none; }
    .wa-float-menu, .wa-float-btn i { transition: none; }
}
