/* ============================================================
   WIDGET WHATSAPP - ESTILO COMPLETO
   ============================================================ */

/* Reset básico para el contenedor */
.wa-widget-container *, 
.wa-widget-container *::before, 
.wa-widget-container *::after {
    box-sizing: border-box !important;
}

.wa-widget-container {
    position: fixed;
    bottom: 95px;
    right: 40px;
    z-index: 999999 !important;
    font-family: 'Segoe UI', Arial, sans-serif !important;
}

/* --- BOTÓN INICIAL (LANZADOR) --- */
.wa-launcher-btn {
    width: 55px !important;
    height: 55px !important;
    background-color: #25D366 !important;
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2) !important;
    padding: 0 !important;
    transition: transform 0.3s ease !important;
}

.wa-launcher-btn:hover {
    transform: scale(1.1) !important;
}

.wa-launcher-icon svg { 
    width: 30px !important; 
    fill: white !important; 
}

/* --- VENTANA EMERGENTE --- */
.wa-popup-window {
    width: 400px !important;
    background: #fff !important;
    border-radius: 30px !important;
    overflow: hidden !important;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15) !important;
    margin-bottom: 15px !important;
}

.wa-header {
    background: #25D366 !important;
    padding: 20px 25px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.wa-header-brand {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    color: white !important;
}

.wa-header-icon { 
    width: 25px !important; 
    fill: white !important; 
}

/* Botón cerrar (X) */
.wa-close-circle {
    background: rgba(0,0,0,0.1) !important;
    border: none !important;
    color: white !important;
    font-size: 20px !important;
    
    /* Dimensiones fijas para evitar deformación */
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important; /* Evita que se aplaste */
    aspect-ratio: 1 / 1 !important;
    
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s !important;
    padding: 0 !important;
    line-height: 1 !important;
    flex-shrink: 0 !important; /* Crucial para que no se deforme en flexbox */
}

.wa-close-circle:hover {
    background: rgba(0,0,0,0.2) !important;
}

/* --- CUERPO Y BURBUJA --- */
.wa-body {
    background: #fdfdfd !important;
    padding: 25px 25px !important;
    overflow: visible !important; /* Permite ver la colita de la burbuja */
}

.wa-bubble {
    background: #ffffff !important;
    padding: 18px 22px !important;
    border-radius: 25px !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    color: #444 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06) !important;
    position: relative !important;
    border: 1px solid #f0f0f0 !important;
    margin-left: 10px !important;
    display: inline-block !important;
}

/* Colita de la burbuja (Estilo imagen original) */
.wa-bubble::before {
    content: "" !important;
    position: absolute !important;
    left: -8px !important;
    top: 20px !important;
    width: 15px !important;
    height: 15px !important;
    background: #ffffff !important;
    border-left: 1px solid #f0f0f0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    transform: rotate(45deg) !important;
    z-index: 1 !important;
}

/* --- FOOTER Y BOTÓN DE ACCIÓN --- */
.wa-footer {
    padding: 0 25px 25px !important;
    display: flex !important;
    justify-content: flex-end !important; /* Alinea a la derecha según tu imagen */
}

.wa-btn-open {
    display: inline-flex !important; /* No ocupa todo el ancho */
    align-items: center !important;
    gap: 10px !important;
    background-color: #25d366 !important;
    color: #fff !important;
    padding: 8px 20px !important; /* Dimensiones más compactas */
    border-radius: 40px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2) !important;
}

.wa-btn-open:hover {
    background-color: #20bd5a !important;
    transform: translateY(-2px) !important;
}

/* Bloqueo de interferencia de hijos en el clic */
.wa-btn-open * {
    pointer-events: none !important;
}

/* Contenedor del icono dinámico */
.wa-btn-svg-container {
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: opacity 0.4s ease !important;
}

.wa-btn-svg {
    width: 100% !important;
    height: 100% !important;
    fill: white !important;
}