/* General Styles for the Chatbot */
#chatbot-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

#chatbot-toggle {
    width: 60px;
    height: 60px;
    border: #010857;
    border-radius: 50%;
    background-color: #F0F0F0;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#chatbot-container {
    display: none;
    flex-direction: column; /* Apila los elementos verticalmente */
    width: 90vw;
    max-width: 400px;
    height: 550px;
    border: 1px solid #ccc;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    bottom: 80px; /* Ajusta la distancia desde el borde inferior de la ventana */
    right: 20px;
    z-index: 10000;
    overflow: hidden; /* Evita que los elementos desborden */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 9998;
    
}

#headerBot{
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: #F0F0F0;
    width: 100%;
    height: 71px;
 }

#logBot{
    width: 60;
    height: 60;
    align-items: center;
    margin-left: 30px;
    margin-right: 30px;
}



#chatbot-messages {
    flex: 1; /* Permite que se ajuste dentro de un contenedor flex */
    padding: 10px; /* Espaciado interno (si lo deseas, puedes reducirlo para ahorrar espacio) */
    margin: 0; /* Elimina cualquier margen extra */
    overflow-y: auto; /* Scroll solo en el eje vertical si el contenido excede */
    height: 420px; /* Tamaño máximo fijo del contenedor */
    border: 1px solid #ccc; /* (Opcional) Borde para visualizar el contenedor */
    box-sizing: border-box; /* Asegura que el padding no afecte el ancho total */
    display: flex;
    flex-direction: column;
    -ms-overflow-style: none; 
    scrollbar-width: none;
    
}
.message {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 10px;
    max-width: 80%;
}

.message.bot {
  
    background-color: #F0F0F0;
    color: black;
    align-self: flex-start;
    border-bottom-left-radius: 0;
    font-size: 14px;
    text-align: left; 
    margin-top: 10px;
    margin-bottom: 10px;
    display: inline-block;
}

.message.user {
   
    background-color: #00095B;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0;
    font-size: 14px; 
    font-family: "roboto", sans-serif;
    text-align: right;
    margin-right: 0; /* Elimina cualquier margen derecho adicional */
    margin-left: auto; /* Asegura que el mensaje del usuario se alinee a la derecha */
    margin-top: 10px;
    margin-bottom: 10px;
    display: inline-block;
    
}

#chatbot-input {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 50px;
    padding: 0 10px;
    background-color: #f9f9f9;
    border-top: 2px solid #020957;
}

#chatbot-user-message {
    flex: 1;
    padding: 0;                 /* quitamos padding desigual */
    height: 100%;               /* usa todo el alto del contenedor */
    border: none;               /* sin bordes */
    border-bottom: 1px solid #7F7F7F;  /* solo línea inferior */
    outline: none;
    font-size: 14px;
    color: #7F7F7F;
    font-family: "roboto",sans-serif;
    background: none;
    box-shadow: none;
}

#chatbot-send {

    width: 30px; /* Ancho del botón */
    height: 30px; /* Alto del botón */
    border: none;
    cursor: pointer;
    background: none;
}

.loading-dots {
    display: flex;
    align-items: flex-start;
    justify-content: right;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #ccc;
    border-radius: 50%;
    animation: loading-dots 1.4s infinite;
}

@keyframes loading-dots {
    0% { opacity: 0.2; }
    20% { opacity: 1; }
    100% { opacity: 0.2; }
}

.message p {
    white-space: pre-wrap; /* Mantiene los saltos de línea y espacios */
    word-wrap: break-word;
}

.user {
    align-self: flex-end;
    background-color: #d1e7fd;
}


.bot {
    align-self: flex-start;
    background-color: #f1f1f1;
}

.timestamp {
    font-size: 12px;
    color: gray;
    align-self: flex-end;
}

/* ----------------------------------------------------- */

.bot-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.bot-options button {
    padding: 6px 12px;
    border-radius: 12px;
    border: none;
    background: #e8f0ff;
    color: #003366;
    cursor: pointer;
    font-size: 14px;
}

.bot-options button:hover {
    background: #d0e2ff;
}