/* Multi WhatsApp Button Styles - VERSIÓN BLINDADA */

/* Resetear estilos globales que puedan interferir */
.mwb-whatsapp-widget,
.mwb-whatsapp-widget *,
.mwb-whatsapp-widget *::before,
.mwb-whatsapp-widget *::after {
    box-sizing: border-box !important;
}

/* Botón flotante principal - ULTRA ESPECÍFICO */
.mwb-button.mwb-whatsapp-btn-fixed,
button.mwb-button.mwb-whatsapp-btn-fixed,
#mwb-button.mwb-whatsapp-btn-fixed {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    z-index: 999999 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* SVG DEL BOTÓN PRINCIPAL SOLAMENTE - NO AFECTAR MENÚ */
#mwb-button svg.mwb-svg-icon,
#mwb-button.mwb-whatsapp-btn-fixed > svg.mwb-svg-icon,
button#mwb-button > svg.mwb-svg-icon {
    display: block !important;
    pointer-events: none !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    fill: #ffffff !important;
    color: #ffffff !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
    transform: none !important;
}

/* Path del SVG del botón principal */
#mwb-button svg.mwb-svg-icon path,
#mwb-button.mwb-whatsapp-btn-fixed > svg.mwb-svg-icon path {
    fill: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.mwb-button:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25) !important;
}

.mwb-button:active {
    transform: scale(0.95) !important;
}

/* Menú desplegable */
.mwb-menu {
    position: absolute;
    bottom: 80px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    max-width: 320px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.mwb-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header del menú */
.mwb-menu-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mwb-menu-header strong {
    font-size: 16px;
    font-weight: 600;
}

.mwb-close {
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
    padding: 0 4px;
}

.mwb-close:hover {
    opacity: 1;
}

/* Lista de contactos */
.mwb-contacts {
    max-height: 400px;
    overflow-y: auto;
}

.mwb-contacts::-webkit-scrollbar {
    width: 6px;
}

.mwb-contacts::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.mwb-contacts::-webkit-scrollbar-thumb {
    background: #25D366;
    border-radius: 3px;
}

.mwb-contacts::-webkit-scrollbar-thumb:hover {
    background: #128C7E;
}

/* Item de contacto */
.mwb-contact-item {
    display: flex !important;
    align-items: center !important;
    padding: 14px 20px !important;
    text-decoration: none !important;
    color: #333 !important;
    transition: background-color 0.2s !important;
    border-bottom: 1px solid #f0f0f0 !important;
    gap: 12px !important;
}

.mwb-contact-item:last-child {
    border-bottom: none !important;
}

.mwb-contact-item:hover {
    background-color: #f5f5f5 !important;
}

/* SVG de los iconos del MENÚ - Verde y tamaño correcto */
.mwb-contact-item svg,
.mwb-contacts svg,
.mwb-menu svg:not(.mwb-svg-icon) {
    flex-shrink: 0 !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    fill: #25D366 !important;
    color: #25D366 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.mwb-contact-item svg path,
.mwb-contacts svg path {
    fill: #25D366 !important;
}

.mwb-contact-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

.mwb-contact-name {
    font-weight: 600 !important;
    font-size: 15px !important;
    color: #333 !important;
    line-height: 1.3 !important;
}

.mwb-contact-number {
    font-size: 12px !important;
    color: #666 !important;
    line-height: 1.3 !important;
}

/* Posicionamiento */
.mwb-position-right .mwb-menu {
    right: 0;
}

.mwb-position-left .mwb-menu {
    left: 0;
}

/* Animación de pulso para el botón */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.mwb-button {
    animation: pulse 2s infinite;
}

.mwb-button:hover {
    animation: none;
}

/* Responsive */
@media screen and (max-width: 480px) {
    .mwb-menu {
        min-width: 260px;
        max-width: calc(100vw - 80px);
    }
    
    .mwb-button {
        width: 55px;
        height: 55px;
    }
    
    .mwb-button svg {
        width: 28px;
        height: 28px;
    }
    
    .mwb-whatsapp-widget {
        bottom: 15px;
    }
    
    .mwb-position-right {
        right: 15px;
    }
    
    .mwb-position-left {
        left: 15px;
    }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .mwb-button,
    .mwb-menu {
        animation: none;
        transition: none;
    }
}
