/* @import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css"); */
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css");

/* Burbuja flotante */
.chatbot-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: rgb(153, 177, 39);
    background: linear-gradient(45deg, rgba(153, 177, 39, 1) 0%, rgba(130, 156, 3, 1) 100%);
    color: white;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 8px var(--shadow-color);

}

.chatbot-bubble:hover {
    background: rgb(153, 177, 39);
    background: linear-gradient(72deg, rgba(153, 177, 39, 1) 0%, rgba(130, 156, 3, 1) 100%);

}

/* Ventana del chatbot */
#chatgpt-bot {
    bottom: 90px;
    right: 20px;
    width: 420px;
    height: 450px;
    border: 1px solid #e7e7e7;
    border: 1px solid #e7e7e7;
    border-radius: 12px;
    padding: 16px 16px 32px;
    display: none;
    z-index: 9999;
    font-size: 14px;
    font-family: Arial;
}

#chatgpt-bot.default {
    display: none;
    position: fixed;
    background-color: white;
	font-family: 'DM Sans';
}


#chatgpt-bot.minimalist {
    display: block;
    position: static;
    background-color: transparent;
    border: 0;
    width: 100%;
}

#chatgpt-bot.minimalist #chat-output {
    max-height: 400px;
    background-color: transparent;
    border: 0px;
}

#chatgpt-bot.minimalist #chat-output .chat-welcome {
    display: none;
}

#chatgpt-bot.minimalist {
    height: auto;
}


#chatgpt-bot.block {
    display: block;
    background-color: white;
    position: static;
    height: 450px;
    width: 100%;
}

#chatgpt-bot .chatbot-content {
    height: 100%;
}


#chatgpt-bot #chat-output {
    overflow-y: auto;
    height: calc(100% - 154px);
    margin-bottom: 8px;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: white;
    scroll-behavior: smooth;
}

#chatgpt-bot input {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #dcdcdc;
    font-size: 14px;
    background-color: white;
}

#chatgpt-bot button {
    width: 100%;
    padding: 8px;
    background-color: #99b127;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

#chatgpt-bot.minimalist button {
    max-width: 30px;
    padding: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#chatgpt-bot.minimalist button svg {
    display: flex;
    width: 22px;
}


#chatgpt-bot .chat-input-container {
    display: flex;
    gap: 8px;
}

/* Para default y block: columna */
#chatgpt-bot .chat-input-container.default,
#chatgpt-bot .chat-input-container.block {
    flex-direction: column;
}

#chatgpt-bot .chat-input-container.minimalist {
    flex-direction: row;
}

#chatgpt-bot button:disabled {
    cursor: not-allowed;
}

#chatgpt-bot .closeBtn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 16px;
    max-width: 16px;
    height: 16px;
    background-color: #ffffff;
    color: #303030;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 14px;
}

#chatgpt-bot .closeBtn:hover {
    font-weight: 600;
}

#chatgpt-bot .msg {
    margin: 8px 0;
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 80%;
}

#chatgpt-bot .msg.user {
    text-align: right;
    margin-left: auto;
    background-color: white;
    color: black;
}

#chatgpt-bot .msg.bot {
    text-align: left;
    background-color: gainsboro;
    color: #333817;
}

#chatgpt-bot .responding {
    font-style: italic;
    color: #888;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    font-size: 18px;
    font-weight: bold;
    color: black;
    padding: 8px 2px;
}

.chat-wellcome {
    color: black;
    font-size: 8px;
    line-height: 1rem;
}

@media (max-width: 768px) {
    #chatgpt-bot {
        width: 95%;
        left: 2.5%;
        right: 2.5%;
        bottom: 4.375rem;
    }
}

@media (max-width: 400px) {
    #chatgpt-bot #chat-output {
        height: calc(90% - 130px);
    }
}

.responding {
    animation: movimiento 1s infinite;
    animation-delay: calc(.1s * var(--i));
}

@keyframes movimiento {

    0%,
    40%,
    100% {
        opacity: 1;
    }

    20% {
        opacity: 0.5;
    }
}

#chat-output::-webkit-scrollbar {
    width: 5px;
}

#chat-output::-webkit-scrollbar-track {
    background-color: #a9a9a930;
}

#chat-output::-webkit-scrollbar-thumb {
    border-radius: 5px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.6;
    }
}

@keyframes typing {
    0% {
        content: ".";
    }

    33% {
        content: "..";
    }

    66% {
        content: "...";
    }

    100% {
        content: "";
    }
}

.listening #mic-icon {
    border-radius: 100%;
    animation: pulse 1s infinite;
    background-color: var(--mic-icon-color, black);
}

.typing::after {
    content: "";
    animation: typing 1.5s infinite;
}