        /* BOTÓN FLOTANTE (Para abrir/cerrar) */
        #chat-boton-flotante {
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 40px;
            height: 40px;
            background-color: #6CA0D0; /* Verde brillante de WhatsApp */
            border-radius: 50%;
            box-shadow: 0 4px 10px rgba(0,0,0,0.3);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            z-index: 1001;
            transition: transform 0.2s ease;
        }
        #chat-boton-flotante:hover {
            transform: scale(1.08);
        }
        #chat-boton-flotante .material-symbols-outlined {
            font-size: 16px;
        }

        /* CONTENEDOR DEL CHAT (Oculto por defecto) */
        #whatsapp-chat {
            position: fixed;
            bottom: 90px; /* Separación para quedar encima del botón */
            right: 20px;
            width: 550px;
            height: 480px;
            background-color: #efeae2;
            border-radius: 12px;
            box-shadow: 0 5px 25px rgba(0,0,0,0.25);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            z-index: 1000;
            
            /* Animación de desaparición */
            opacity: 0;
            pointer-events: none;
            transform: translateY(20px);
            transition: all 0.3s ease;
        }

        /* Clase activa para mostrar el chat */
        #whatsapp-chat.activo {
            opacity: 1;
            pointer-events: auto;
            transform: translateY(0);
        }
        
        /* CONTROLADOR DE REDIMENSIÓN (Esquina superior izquierda) */
        .chat-resizer {
            position: absolute;
            width: 15px;
            height: 15px;
            top: 0;
            left: 0;
            cursor: nwse-resize;
            z-index: 1002;
        }

        /* Cabecera estilo WhatsApp */
        .chat-header {
            background-color: #2F6596;
            color: white;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .header-info {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .chat-avatar {
            width: 40px;
            height: 40px;
            background-color: #e9edef;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
        }
        .chat-status .bot-name { font-weight: 600; font-size: 15px; }
        .chat-status .bot-state { font-size: 12px; color: #CEE0F0;text-align: left; }
        
        /* Botón de cerrar (X) en la cabecera */
        .btn-cerrar {
            cursor: pointer; 
            color: #CEE0F0; 
            display: flex; 
            align-items: center; 
            padding: 4px;
            border-radius: 50%;
            transition: background-color 0.2s, color 0.2s;
        }
        .btn-cerrar:hover { background-color: rgba(255, 255, 255, 0.1); color: white; }

        /* Cuerpo del chat (Mensajes) */
        .chat-body {
            flex: 1;
            padding: 16px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        /* Burbujas */
        .msg {
            max-width: 75%;
            padding: 8px 12px;
            border-radius: 8px;
            font-size: 14.5px;
            line-height: 1.4;
            word-wrap: break-word;
            text-align: left;
        }
        .msg.bot {
            background-color: #ffffff;
            align-self: flex-start;
            border-top-left-radius: 0;
            color: #111b21;
        }
        .msg.user {
            background-color: #DEEBF5;
            align-self: flex-end;
            border-top-right-radius: 0;
            color: #111b21;
        }
				
				/* ANIMACIÓN DEL LOADING (Tres puntos estilo WhatsApp) */
        .loading-chat {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 12px 16px;
        }
        .loading-chat span {
            width: 8px;
            height: 8px;
            background-color: #54656f;
            border-radius: 50%;
            display: inline-block;
            animation: puntosEscribiendo 1.4s infinite ease-in-out both;
        }
        .loading-chat span:nth-child(1) { animation-delay: -0.32s; }
        .loading-chat span:nth-child(2) { animation-delay: -0.16s; }

        @keyframes puntosEscribiendo {
            0%, 80%, 100% { transform: scale(0); }
            40% { transform: scale(1.0); }
        }
        
        /* Pie de chat */
        .chat-footer {
            background-color: #f0f2f5;
            padding: 10px 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .chat-footer input {
            flex: 1;
            background-color: #ffffff;
            border: none;
            padding: 10px 16px;
            border-radius: 8px;
            font-size: 15px;
            outline: none;
        }
        .chat-footer button {
            background-color: #2F6596;
            border: none;
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

#dialogRulesBtnF {margin-right:50px;}