/* --- ESTILOS CORREGIDOS PARA EL CHATBOT --- */

.chatbot-modal {
    display: none; 
    position: fixed;
    bottom: 85px; 
    right: 20px;
    width: 250px;
    height: 350px;
    background-color: #836c6cc1;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: fadeIn 0.3s ease-in-out;
    overflow-y: auto;
    flex-direction: column; 
}

/* Esta clase ayuda a que se vea bien si usas toggleClass en JS, 
   aunque tu JS actual usa estilos en línea, lo cual también funciona */
.chatbot-modal.active {
    display: flex;
}

/* Cabecera */
.chatbot-header {
    background: linear-gradient(to right, #805c01, #f2f2f2);
    color: white;
    padding: 15px 20px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Botón X de cerrar */
.close-btn {
    cursor: pointer;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: white;
    font-size: 16px;
    font-weight: bold;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close-btn:hover {
    background: #000;
}

/* Área de mensajes */
.chatbot-messages {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    background-color: #c6adadc8;
    border-radius: 15px;
    padding: 15px;
    max-width: 80%;
    font-family: 'Arial', sans-serif;
    animation: messageFadeIn 0.4s ease-in-out;
}

/* Botones de acción dentro del chat */
.chat-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 20px 20px;
    margin-bottom: 10px;
}

.chat-button {
    background-color: #000000;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
}

.chat-button:hover {
    background-color: #5f4705;
    transform: translateY(-2px);
}

/* --- AQUÍ ESTÁ LA CORRECCIÓN DE LA IMAGEN --- */

/* Botón flotante (El contenedor redondo) */
.chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;  /* Forzamos un tamaño fijo para que sea círculo perfecto */
    height: 60px; /* Igual al ancho */
    background-color: #fff;
    border-radius: 50%;
    padding: 5px; /* Un pequeño borde blanco alrededor de la bandera */
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    animation: bounce 2s infinite; /* Hice la animación un poco más lenta para que no maree */
    border: none;
    display: flex;             /* Centra la imagen perfectamente */
    align-items: center;
    justify-content: center;
    overflow: hidden;          /* Asegura que nada se salga del círculo */
}

/* La imagen dentro del botón (La bandera) */
.chatbot-toggle img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* <--- ESTA ES LA CLAVE: Evita que se deforme/estire */
    border-radius: 50%; /* Hace que la imagen misma sea redonda */
}

/* --- FIN DE LA CORRECCIÓN --- */

/* Animaciones */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes messageFadeIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }
@keyframes bounce { 
    0%, 100% { transform: translateY(0); } 
    50% { transform: translateY(-10px); } 
}

/* Ocultar elementos innecesarios */
.chatbot-input {
    display: none !important;
}

.opciones-rapidas, 
.quick-options {
    display: none !important;
}