:root {
    --color-primary: #007bff;
    --color-secondary: #6c757d;
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-warning: #ffc107;    

    /* Colores para chatbot soen*/
    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-message-user: #128C7C33;
    --color-border-message-user: #128C7C;
    --color-timestamp-user: #000000;
    --color-message-bot: #F3F3F3;
    --color-border-message-bot: #ADADAD;
    --color-timestamp-bot: #797979;
    --color-border-input: #E0DCDC;
    --color-loading-dot: #666;
}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--color-white);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.chat-container {
    width: 100%;
    height: 100vh;
    max-width: 1200px;
    background: var(--color-white);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.chat-header {
    background: var(--color-black);
    color: var(--color-white);
    padding: 10px;
    text-align: center;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-icon {
    color: var(--color-white);
    cursor: pointer;
    font-size: 20px;
    user-select: none;
}

.chat-avatar {
    width: 40px;
    /* height: 40px; */
    border-radius: 50%;
    object-fit: cover;
}

.chat-body {
    flex: 1;
    padding: 10px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scrollbar-gutter: stable;
}

/* Mensajes */
.mensaje {
    font-size: 14px;
    padding: 8px;
    border-radius: 10px;
    margin: 5px 0;
    max-width: 80%;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
    position: relative;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}


/* Elimina el margen de los textos dentro de los mensajes */
.mensaje p {
    margin: 0;
}

/* Mensajes del usuario */
.user {
    background: var(--color-message-user);
    color: var(--color-black);
    border: 1px solid var(--color-border-message-user);
    align-self: flex-end;
    border-bottom-right-radius: 0;
}

/* Mensajes del bot */
.bot {
    background: var(--color-message-bot);
    color: var(--color-black);    
    border: 1px solid var(--color-border-message-bot);
    align-self: flex-start;
    border-bottom-left-radius: 0;
}

/* Estilo para la hora debajo del mensaje */
.hora {
    font-size: 10px;
    text-align: right;
    margin-top: 5px;
}

/* Color de la hora según el tipo de mensaje */
.user .hora {
    color:var(--color-timestamp-user);
}

.bot .hora {
    color: var(--color-timestamp-bot);
}

/* Footer del chat */
.chat-footer {
    display: flex;
    border-top: 1px solid var(--color-black);
    padding: 10px 20px;
    gap: 10px;
}

.chat-footer textarea {
    flex: 1;
    border: 1px solid var(--color-border-input);
    padding: 10px;
    outline: none;
    font-size: 14px;
    border-radius: 5px;
    font-family: 'NeoSans', sans-serif;
    resize: none;
    overflow-y: auto;
    word-wrap: break-word;
    min-height: 40px;
    height: 40px;
    border: 1px solid var(--color-border-input);
    box-sizing: border-box;
}

.chat-footer button {
    background: var(--color-black);
    color: white;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Estilos para el indicador de carga */
.loading-container {
    display: flex;
    align-items: center;
    padding: 5px;
    min-height: 20px;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-loading-dot);
    border-radius: 50%;
    margin: 0 3px;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-message {
    min-width: 50px;
    min-height: 40px;
    /* Añadir transición suave */
    transition: opacity 0.3s ease-in-out;
}

.bot .loading-dot {
    background-color: var(--color-loading-dot);
}

.loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% { 
        transform: scale(0);
    } 40% { 
        transform: scale(1);
    }
}