.chat-widget {
    position: fixed;
    bottom: 60px;
    right: 20px;
    z-index: 1000;
}

.chat-toggle {
    background-color: #4299e1;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-container {
    position: fixed;
    bottom: 120px;
    right: 20px;
    width: 500px;
    height: 500px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
}

.chat-container.hidden {
    display: none;
}

/* Keyframes*/

@keyframes blink {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Animaciones */
@keyframes expandIn {
    0% {
        transform: translate(50%, 50%) scale(0); /* Inicia en la esquina inferior derecha y muy pequeño */
        opacity: 0;
    }
    100% {
        transform: translate(0, 0) scale(1); /* Expande a su tamaño original en la esquina superior izquierda */
        opacity: 1;
    }
}

@keyframes expandOut {
    0% {
        transform: translate(0, 0) scale(1); /* Comienza en su tamaño completo */
        opacity: 1;
    }
    100% {
        transform: translate(50%, 50%) scale(0); /* Se encoge hacia la esquina inferior derecha */
        opacity: 0;
    }
}

.chat-container.open {
    animation: expandIn 0.5s ease-out forwards;
}

.chat-container.closechat {
    animation: expandOut 0.5s ease-in forwards;
}


.chat-header {
    background-color: #4299e1;
    color: white;
    padding: 10px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
}

.message {
    max-width: 80%;
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 20px;
}

.message.user {
    background-color: #4299e1;
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.message.ai {
    background-color: #e2e8f0;
    color: #1a202c;
}

.chat-form {
    display: flex;
    padding: 10px;
    border-top: 1px solid #e2e8f0;
}

#chat-input {
    flex-grow: 1;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 8px 12px;
    margin-right: 8px;
}

.chat-form button {
    background-color: #4299e1;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
}

.typing-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 2px;
    border-radius: 50%;
    background-color: #4299e1;
    animation: blink 1.5s infinite;
}




/* Estilo del mensaje de confirmación */
.message.ai.confirmation {
    background-color: #f4f4f8;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

/* Estilo de los botones dentro del chat */
.chat-btn {
    padding: 6px 12px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}



.confirm-yes {
    background-color: #4caf50;
    color: white;
}


.confirm-no {
    background-color: #f44336;
    color: white;
}


.chat-btn:hover {
    opacity: 0.8;
}
