
/* Estilo para la ventana del chat */
.chat-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50%;
    height: 70vh;
    background-color: #f7f7f7;
    border-radius: 10px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1);
    display: none; /* Oculto por defecto */
    flex-direction: column;
    overflow: hidden;
    opacity: 0; /* Comienza completamente transparente */
    transform: translateY(20px); /* Mueve hacia abajo ligeramente */
    transition: all 0.3s ease-in-out;
    border: 1px solid #ff5e00;
    z-index: 99999;
}

/* Cuando el chat está visible */
#chatWindow.visible {
    display: block; /* Lo muestra */
    opacity: 1; /* Lo hace visible */
    transform: translateY(0); /* Lo coloca en su posición final */
}

/* Estilo para el header del chat */
.chat-header {
    background-color: #fc5e28;
    color: white;
    padding: 10px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0px 11px 39px #3517023d;
}

.profile-bot-img{
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

.button-close-chat{
    background-color: #fc5e28;
    width: 30px;
    border:1px solid;
}

.button-close{
    background-color: #fc5e28;
    color: white;
    font-size: 30px;
}

.container-profile{
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}
/* Estilo para el cuerpo del chat */
.chat-body {
    padding: 15px;
    flex-grow: 1;
    overflow-y: auto; /* Esto permite el desplazamiento */
    height: 78%; /* Define la altura del área de los mensajes */
    
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: -1;
}

/* Estilo para el footer del chat */
.chat-footer {
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f1f1f1;
    position: absolute;
    width: 100%;
    bottom: 0;
    border-top: 1px solid #c2c2c2;
}

/* Estilo para el área de texto */
textarea {
    width: 80%;
    font-size:0.9rem !important;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 5px;
    font-size: 14px;
    resize: none;
    font-family: Arial, Helvetica, sans-serif;
}

/* Estilo para el botón de envío */
.abrir-boton {
    width: 19%;
    height: 40px;
    background-color: #fc5e28;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-size: 14px;
}

.abrir-boton:hover {
    background-color: #e04e1a;
    color:white;
}

/* Estilo para los mensajes del usuario */
.user-message {
    background-color: #fc5e28;
    color: white;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 5px;
    align-self: flex-end;
    max-width: 75%;
    word-wrap: break-word;
    display: flex;
    justify-content: space-between;
    line-height: 1.5;
}

/* Estilo para la hora en los mensajes del usuario */
.user-message .message-time {
    font-size: 12px;
    color: #ddd;
    margin-left: 10px;
}

.bot-message {
    background-color: #ffffff;
    margin-right: auto;
    padding: 16px;
    width: 95%;
    color: black;
    border-radius: 5px;
}

/* Estilo para los mensajes del asistente */
.assistant-message {
    background-color: #ddd;
    color: black;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 5px;
    align-self: flex-start;
    max-width: 75%;
    word-wrap: break-word;
    display: flex;
    justify-content: space-between;
    line-height: 1.5;
}

/* Estilo para la hora en los mensajes del asistente */
.assistant-message .message-time {
    font-size: 12px;
    color: #888;
    margin-left: 10px;
}

/* Estilo para el ícono de chat flotante */
.chat-icon {
    position: fixed;
    bottom: 175px;
    right: 10px;
    background-color: #fc5e28;
    color: white;
    font-size: 30px;
    width: 60px;
    height: 60px;
    display: block;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1);
    transition: .3s all ease;
}

.chat-icon::after{
    content: "Chat";
    position: absolute;
    width: 55px;
    right: 55px;
    font-size: 1rem;
    bottom: 14px;
    background: #fc5e28;
    padding-left: 8px;
    border-radius: 13px 0 0 13px;
    color: #ffffff;
    z-index: -1;
}

.chat-icon:hover {
    background-color: #e04e1a;
}

/* Estilo para el scrollbar del chat */
.chat-body::-webkit-scrollbar {
    width: 8px;
}

.chat-body::-webkit-scrollbar-thumb {
    background-color: #fc5e28;
    border-radius: 10px;
}

/* Media queries para pantallas más pequeñas */
@media screen and (max-width: 768px) {
    /* Ajusta el tamaño del chat en pantallas más pequeñas */
    .chat-window {
        width: 94%;
        height: 90%;
        border: 1px solid #ff5e00;
    }

    /* Ajusta el tamaño del texto */
    textarea {
        width: 70%;
        height: 35px;
    }

    /* Ajusta los márgenes de los mensajes */
    .user-message, .assistant-message {
        max-width: 90%;
    }
}

/* Media queries para pantallas muy pequeñas (móviles) */
@media screen and (max-width: 480px) {
    /* Ajusta el tamaño del chat */
    .chat-window {
        width: 90%;
        height: 95%;
        bottom: 10px;
    }

    /* Ajusta el área de texto */
    textarea {
        width: 65%;
        height: 35px;
    }


    .user-message, .assistant-message {
        max-width: 95%;
    }
}

.icono-chat-click{
    margin: 0;
    position: absolute;
    left: 10px;
    bottom: 2px;
}

.titulo-asistente{
    color:white;
    margin:0;
}

.entrada-mensaje-asistente{
    width: fit-content;
    min-width: 100px; /* Tamaño mínimo inicial */
    max-width: 100%; /* Evita que exceda el ancho del contenedor */
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: width 0.2s ease-out; /* Suaviza el cambio de tamaño */
    box-sizing: content-box;
    width:73%;
}

p .message-time{
    text-align: end;
}

.container-text {
    margin-left: 10px;
}

h3.asitente-text {
    text-align: start;
    margin: 0;
    color: white;
}

p.tiempo-espera-text {
    margin: 0;
    font-size: 0.8rem;
    text-align:start;
}
