body {
    font-family: 'Inter', sans-serif;
}

#char-counter {
    font-size: 12px;
    color: gray;
    transition: color 0.3s;
}

#char-counter.low {
    color: red;
    font-weight: bold;
}

.logo-ctic {
    height: 55px;  /* Ajusta el tamaño según necesites */
    width: auto;
}

.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    gap: 20px;
}

.intro-card {
    width: 600px;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-in-out;
}

.chat-container {
    width: 950px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    border-radius: 15px;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: #FFFFFF; /* 🔹 Gris más claro */
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

.message {
    max-width: 75%;
    padding: 12px 18px;
    border-radius: 20px;
    font-size: 16px;
    word-wrap: break-word;
    white-space: pre-line;
    overflow-wrap: break-word;
    animation: fadeIn 0.3s ease-in-out;
}

/* 🔹 Mensajes del bot (azul MUCHO más suave) */
.bot-message {
    background: #D6E6FA;  /* Azul pastel claro */
    color: #000000;  /* Texto negro */
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #A4C8F0; /* Azul suave más oscuro en el borde */
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1); /* Sombra ligera */
}

.bot-icon {
    width: 40px;
    height: 40px;
    background: #ffffff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
}

.user-message {
    background: #140D4F; /* Color corporativo */
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    padding: 15px;
    border-radius: 10px;
    max-width: 75%;
    border: 1px solid #140D4F; /* Borde más oscuro */
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.15); /* Sombra ligera */
}

.input-container textarea {
    flex: 1;
    border: none;
    padding: 12px;
    border-radius: 20px;
    outline: none;
    font-size: 16px;
    background: #f1f1f1;
    resize: none;
    height: 55px;
    overflow: hidden;
}

.input-container {
    display: flex;
    align-items: center;
    gap: 10px; /* 🔥 Separa mejor los botones */
    padding: 10px;
    background: white;
    border-top: 1px solid #ddd;
}

.reset{
    background: #140D4F !important;
    color: white;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    padding: 8px;
    font-size: 16px;
    font-weight: 600;
}

.input-container button{
    background: #140D4F;
    color: white;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
    width: 45px; /* 🔥 Tamaño uniforme de los botones */
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    
textarea#user-input {
    flex: 1;
    border: none;
    padding: 12px;
    border-radius: 20px;
    outline: none;
    font-size: 16px;
    background: #f1f1f1;
    resize: none;
    height: 45px;
    overflow: hidden;
}

#file-btn, #record-btn {
    background-color: #d3d3d3; /* 🔥 Color gris desactivado */
    color: #a0a0a0; /* 🔥 Texto gris */
    border: none;
    cursor: not-allowed; /* 🔥 El cursor indica que no se puede hacer clic */
    opacity: 0.5; /* 🔥 Efecto de difuminado */
    transition: background 0.3s ease-in-out, opacity 0.3s;
}

/* Estado activo: botones naranja cuando se activan */
#file-btn.active, #record-btn.active {
    background-color: #140D4F; /* 🔥 Naranja corporativo */
    color: white;
    cursor: pointer;
    opacity: 1; /* 🔥 Se vuelve visible */
}

/* Hover solo si están activos */
#file-btn.active:hover, #record-btn.active:hover {
    background-color: #140D4F; /* 🔥 Un tono más oscuro */
}

.input-container button:hover {
    background: #140D4F;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#user-input {
    background: white;
    border: 1px solid #ccc;
    padding: 12px;
    border-radius: 20px;
    font-size: 16px;
    transition: all 0.3s ease-in-out;
}

/* 🔥 Efecto cuando se hace clic en el input */
#user-input:focus {
    border: 1px solid #140D4F; /* 🔥 Resalta con un tono naranja */
    box-shadow: 0px 4px 10px rgba(193, 117, 35, 0.3); /* 🔥 Sombra ligera */
}

#chat-container {
    display: none; /* Se oculta completamente cuando aparece el resumen */
}

#resumen-container {
    display: none; /* Iniciar oculto, pero mostrarlo cuando se active */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: white;
    opacity: 1;
    visibility: visible;
    overflow-y: auto; 
}
.chat-container {
    width: 950px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    border-radius: 15px;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: #FFFFFF;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    padding-bottom: 100px; /* Espacio adicional al final para evitar que los mensajes queden ocultos */
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

.input-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 15px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

#loading-indicator {
    margin-bottom: 60px; /* Asegurar que el indicador de carga sea visible */
}

.message {
    max-width: 75%;
    padding: 12px 18px;
    border-radius: 20px;
    font-size: 16px;
    word-wrap: break-word;
    white-space: pre-line;
    overflow-wrap: break-word;
    animation: fadeIn 0.3s ease-in-out;
    margin-bottom: 10px; /* Espacio entre mensajes */
}

/* Asegurar que el último mensaje sea visible */
.message:last-child {
    margin-bottom: 10px;
}

/* Estilo para el contenedor principal que mantiene el scroll */
.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    gap: 20px;
    padding: 20px;
    position: relative;
}

/* Ajuste para el scroll en diferentes navegadores */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #140D4F;
    border-radius: 4px;
}

/* Asegurar que el contenedor de mensajes tenga un padding inferior adecuado */
@media screen and (max-height: 600px) {
    .chat-messages {
        padding-bottom: 120px; /* Más espacio en pantallas pequeñas */
    }
}
/*################################ FIN ESTILOS PARA PONER ELEGANTE EL CHATBOT*/