

.block_meo_openai_chat.active .card-body > h5::after {
    background: url(/blocks/meo_openai_chat/pix/model.svg) right center no-repeat;
    content: "" !important;
    width: 20px;
    height: 20px;
    color: #027ef7;
    display: block;
    position: absolute;
    right: -5px;
    top: -5px;
}

.block_meo_openai_chat.active #select_model{
    position: absolute;
    top: 20px;
    right: 20px;
    width: 120px;
}

.block_meo_openai_chat:not(.active) #select_model{
    display: none;
}


.block_meo_openai_chat #meo_openai_chat_log {
    display: flex;
    flex-direction: column;
    max-height: 20rem;
    overflow-y: scroll;
    margin-bottom: 0.5rem;
}
.block_meo_openai_chat #meo_openai_chat_log p {
    margin: 0;
}
.block_meo_openai_chat #meo_openai_chat_log a {
    color: white;
    text-decoration: underline;
}
.block_meo_openai_chat #openai_input {
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid gray;
    width: 100%;
    height: 60px;
    min-height: 39px;
    transition: background 0.4s ease;
}
.block_meo_openai_chat #openai_input.error {
    border: 1px solid red;
}
.block_meo_openai_chat #openai_input.disabled {
    background: #dbdbdb;
    pointer-events: none;
}
.block_meo_openai_chat .openai_message {
    padding: 0.75rem 1rem;
    background: #f4f4f4;
    border-radius: 0.5rem;
    margin-bottom: 1.75rem;
    width: fit-content;
    max-width: 90%;
    animation: block_meo_openai_chat_popup 0.4s cubic-bezier(0.87, 0, 0.13, 1);
    position: relative;
}
.block_meo_openai_chat .openai_message:before {
    position: absolute;
    top: -1.5rem;
    left: 0;
    color: gray;
    opacity: 0;
    animation: block_meo_openai_chat_fade-in 0.4s ease 0.4s forwards;
}
.block_meo_openai_chat .openai_message.user {
    align-self: flex-end;
    text-align: right;
}
.block_meo_openai_chat .openai_message.user:before {
    right: 0;
    left: unset;
}
.block_meo_openai_chat .openai_message.bot {
    background: var(--blue);
    color: var(--white);
}
.block_meo_openai_chat .openai_message.loading {
    animation: block_meo_openai_chat_thinking 1s ease infinite;
}
.block_meo_openai_chat .openai_message.loading:before {
    animation: none;
    opacity: 0;
}

@keyframes block_meo_openai_chat_popup {
    0% {
        opacity: 0;
        transform: translateY(5px);
    }
    70% {
        opacity: 1;
        transform: translateY(-2.5px);
    }
    85% {
        transform: translateY(2.5px);
    }
    100% {
        transform: translateY(0);
    }
}

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

@keyframes block_meo_openai_chat_fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
