/* ================================================== */
/* Estilos Base del Botón Flotante (Botón principal) */
/* ================================================== */
/* La posición (right/left) se maneja con CSS dinámico en PHP */
#whatsapp-chat-button {
    position: fixed;
    bottom: 20px;
    z-index: 99998;
}

/* ANULAMOS EL ESTILO BASE DEL BOTÓN PARA QUE SOLO SEA EL ÍCONO (ESTILO 1) */
.whatsapp-btn-base {
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    cursor: pointer;
    font-size: 0;
    border: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center; 
    justify-content: center;
}
.whatsapp-btn-base:hover {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* --- ESTILO 1: Botón Minimalista (Sólo Ícono Cuadrado de WhatsApp - FIX FINAL) --- */
.whatsapp-btn-style-1::before {
    content: none !important;
}

/* Estilo para el ícono SVG/i inyectado por Font Awesome */
.whatsapp-btn-style-1 i, .whatsapp-btn-style-1 svg {
    font-size: 55px;
    width: 55px; 
    height: 55px;
    
    /* Color verde oficial */
    color: #25D366; 
    
    position: static; 
    transform: none;
    
    /* Sombra sutil para separarlo del fondo */
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2)); 
}

.whatsapp-btn-style-1:hover i, .whatsapp-btn-style-1:hover svg {
    /* Oscurecemos el color al pasar el mouse */
    color: #1FAF54; 
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}


/* --- ESTILO 2: Botón Alargado (Con Color Dinámico) --- */
.whatsapp-btn-style-2 {
    /* Estos estilos sobreescriben el .whatsapp-btn-base para el Estilo 2 */
    padding: 12px 20px !important;
    border-radius: 30px !important; 
    color: white !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    font-size: 16px !important;
    /* El background-color es inyectado dinámicamente en PHP */
}


/* ================================================== */
/* Estilos del Widget de Chat y Flujo por Etapas      */
/* ================================================== */

.whatsapp-chat-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 300px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    padding: 15px;
    z-index: 99999;
}

/* Estilos de los Pasos (Steps) */
.chat-step {
    padding: 10px 0;
}
.chat-step h3 {
    margin-top: 0;
    font-size: 1.1em;
    border-bottom: 1px solid #eee;
    
    /* FIX: Margen ajustado para "Selecciona un agente" */
    padding-bottom: 5px; 
    margin-bottom: 10px;
}

/* Estilos para el listado de Agentes */
.chat-agents-list .agent-option {
    display: block;
    padding: 8px 10px;
    margin-bottom: 5px;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    background: #f9f9f9;
    transition: all 0.2s;
}

.chat-agents-list .agent-option:hover {
    background: #eef;
}
.chat-agents-list input[type="radio"] {
    display: none; 
}
.chat-agents-list input[type="radio"]:checked + span {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
    font-weight: bold;
    box-shadow: 0 0 5px rgba(37, 211, 102, 0.5);
}
.chat-agents-list .agent-option span {
    display: block;
}


/* Estilos del formulario de datos (FIX: Color del texto oscuro para que se vea) */
.chat-user-data input, .chat-user-data textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #333; 
}

.start-whatsapp-chat-button {
    width: 100%;
    padding: 10px;
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
}

.next-step-btn {
    width: 100%;
    padding: 10px;
    background-color: #0088cc; /* Color por defecto */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
.back-step-btn {
    width: 100%;
    padding: 10px;
    background-color: #ccc !important;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 5px;
}