﻿#chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 500px;
    max-width: 120%;
    background: #f8f8f8 !important;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
}

/*Icono de cerrar chat*/
.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 25px;
    cursor: pointer;
}

#close-chat:hover {
    color: #ea3327;
}

#chat-header {
    background: #4caf50;
    color: #fff;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    border-bottom: 2px solid #9ac59c
}

#chat-box-container {
    height: 350px;
    overflow-y: auto;
    padding: 10px;  
}

#chat-controls {
    display: flex;
    border-top: 1px solid #ccc;
    padding: 12px;
    justify-content: space-between;
}

#user-input {
    flex: 1;
    resize: none;
    overflow-y: hidden;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    min-width: 80%;
}

#send-btn {
    margin-left: 5px;
    margin-bottom: 5px;
    margin-top: 5px;
    padding: 5px 10px;
    background: #4caf50;
    color: #fff;
    border: none;
    border-radius: 10%;
    cursor: pointer;
    min-width:18%;
}

#chat-icon {
    position: fixed;
    bottom: 5%;
    right: 5%;
    height: 55px;
    width: 55px;
    background: #4CAF50;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 9998;
}

/* Estilo para las burbujas de mensajes */
.message {
    display: flex;
    padding: 10px;
    margin: 5px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 14px;
}

    .message.user {
        background-color: #DCD5CA;
        align-self: flex-end;
        color: #333;
    }

    .message.bot {
        background-color: #4caf50;
        align-self: flex-start;
        color: #fff;
    }

/* Contenedor para mensajes */
#chat-box-container {
    height: 300px;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

/* Estilo responsive */
@media (max-width: 600px) {
    #chat-widget {
        width: 95%;
        bottom: 10px;
        right: 10px;
    }

    #chat-header {
        font-size: 16px;
        padding: 8px;
    }

    #user-input {
        font-size: 14px;
    }

    .message {
        font-size: 12px;
        padding: 8px;
    }
}

/* Estilo para la burbuja de stream del bot */
.bot-streaming-response {
    background-color: #4caf50;
    text-align: left;
    margin-left: 10px;
    color: white;
}

#chat-icon:hover {
    animation: pulse 1s infinite ease-in-out;
}

/* Efecto de pulso cada 2 segundos */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.25);
    }

    100% {
        transform: scale(1);
    }
}


#chat-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px; /* Mismo tamaño que el chat */
    text-align: center;
}

/* Ocultar elementos por defecto */
.hidden {
    display: none;
}

/* Spinner */
.loader {
    width: 50px;
    padding: 8px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #25b09b;
    --_m: conic-gradient(#0000 10%, #000), linear-gradient(#000 0 0) content-box;
    -webkit-mask: var(--_m);
    mask: var(--_m);
    -webkit-mask-composite: source-out;
    mask-composite: subtract;
    animation: l3 1s infinite linear;
}

@keyframes l3 {
    to {
        transform: rotate(1turn);
    }
}



