.chat-container {
    width: 350px;
    height: 500px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    /* display: flex; */
    display: none;
    flex-direction: column;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-header {
    background-color: #007bff;
    color: #fff;
    padding: 15px 0 15px 18px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    /* text-align: center; */
    position: relative;
    font-size: 16px;
}

#closeChat {
    position: absolute;
    right: 10px;
    top: 0;
    bottom: 0;
    margin: auto;
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    border-bottom: 1px solid #ddd;
}

.message {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
    max-width: 70%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.message.visible {
    opacity: 1;
    transform: translateY(0);
}

.user-message {
    background-color: #007bff;
    color: #fff;
    margin-left: auto;
}

.bot-message {
    background-color: #f1f1f1;
    color: #333;
    margin-right: auto;
}

.chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-right: 10px;
}

.chat-input button {
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* boton para comando por voz */
#btnvoz {
    padding: 10px;
    background-color: #28a745;
    /* Verde para diferenciar */
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
}

.chat-input button:hover {
    background-color: #0056b3;
}

#btnvoz:hover {
    background-color: #218838;
}

.chat-input button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#btn-loading {
    display: none;
}

#chatButton {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: transparent;
    color: #007bff;
    font-weight: bold;
    border: none;
    cursor: pointer;
    z-index: 1000;
}

/* Responsividad */
@media only screen and (max-width: 768px) {
    .chat-container {
        /* width: 100%;
        height: 80vh; */
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    .chat-header {
        font-size: 14px;
        padding: 10px;
    }

    .chat-input input {
        padding: 8px;
        font-size: 14px;
    }

    .chat-input button {
        padding: 8px 10px;
        font-size: 14px;
    }

    .message {
        font-size: 14px;
    }
}