/* ========================================================= */
/* ESTILOS BASE DEL MODAL (CAPA NEGRA/OVERLAY) */
/* ========================================================= */

.modal-overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); 
    justify-content: center;
    align-items: center;
    z-index: 99999; /* Alto z-index para cubrir toda la pantalla */
    overflow: auto;
}

.modal-overlay.active {
    display: flex !important; /* Forzar la visualización */
}

/* ========================================================= */
/* ESTILOS DEL CONTENIDO DEL MODAL (.modal-content) - CRÍTICO */
/* ========================================================= */

.modal-content {
    /* CRÍTICO 1: Fondo para que el contenido no sea transparente */
    background-color: white !important; 
    
    /* CRÍTICO 2: Para que esté por encima del overlay */
    position: relative !important; 
    z-index: 100000 !important; /* Mayor que el z-index del overlay (99999) */
    
    /* CRÍTICO 3: Asegurar que no está oculto o transparente por otra regla */
    opacity: 1 !important;
    visibility: visible !important;
    
    /* Propiedades de diseño */
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ========================================================= */
/* ESTILOS DEL BOTÓN FLOTANTE (whatsapp-float-btn) */
/* ========================================================= */

.whatsapp-float-btn {
    position: fixed;
    bottom: 25px; 
    right: 25px; 
    width: 60px;
    height: 60px;
    background-color: #25D366; 
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 10000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Regla para el LOGO: Lo convierte a BLANCO (asumiendo que el fondo del botón es VERDE) */
.whatsapp-float-btn img {
    width: 35px !important; 
    height: 35px !important;
    /* Filtro para hacer el logo blanco */
    filter: brightness(0) invert(1) !important; 
}

/* ========================================================= */
/* ESTILOS ESPECÍFICOS DEL CONTENIDO DE WHATSAPP */
/* ========================================================= */

.whatsapp-modal-content {
    max-width: 450px; 
    width: 90%;
    padding: 25px;
}

.whatsapp-modal-content .modal-title {
    color: var(--color-texto-principal);
    margin-bottom: 15px;
    font-size: 1.8em;
}

.whatsapp-modal-content p {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* --- NUEVOS ESTILOS PARA LAS PESTAÑAS (TABS) --- */

.whatsapp-tabs-nav {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.tab-button {
    background: none;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    color: #888;
    transition: color 0.3s, border-bottom 0.3s;
}

.tab-button.active {
    color: #25D366;
    border-bottom: 3px solid #25D366;
}

.tab-content {
    display: none; /* OCULTA por defecto */
    padding-top: 15px;
    text-align: center;
}

.tab-content.active {
    display: block; /* MUESTRA la pestaña activa */
}

/* --- ESTILOS DE VISTA PREVIA DEL ENLACE --- */
.whatsapp-link-preview {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin: 15px auto;
    max-width: 300px;
    text-align: left;
    background-color: #f9f9f9;
}

.preview-header {
    font-weight: bold;
    color: #1f7a0c;
    margin-bottom: 5px;
}

.preview-text {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 15px;
}

/* --- ESTILOS DE QR y BOTONES (existentes) --- */

.whatsapp-options {
    display: flex;
    flex-direction: column; 
    gap: 25px;
    align-items: center;
}

.whatsapp-qr-code {
    width: 180px; 
    height: 180px;
    border: 1px solid var(--color-neutro, #ccc);
    border-radius: 5px;
    padding: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.whatsapp-link-btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: #25D366; 
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.whatsapp-link-btn:hover {
    background-color: #1DA851;
    transform: translateY(-2px);
}