#maici_container {
    width: -webkit-fill-available;
}

.path-mod-maici .overflow-hidden {
    max-height: 7rem;
    overflow-y: auto !important;
}

.path-mod-maici .overlay {
    opacity: 0.15;
    pointer-events: none;
}

#openai_chat_log {
    display: flex;
    flex-direction: column;
    height: 20rem;
    overflow-y: scroll;
    margin-bottom: 0.5rem;
}
 #openai_chat_log p {
    margin: 0;
}
 #openai_chat_log a {
    color: white;
    text-decoration: underline;
}
 #control_bar {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}
 #control_bar button {
    background: var(--blue);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    width: 2.5rem;
}
 #control_bar #go {
    border-radius: 0 0.5rem 0.5rem 0;
}
 #control_bar #refresh {
    background-color: var(--secondary);
    color: black;
}
 #input_bar {
    display: flex;
}
 #openai_input {
    padding: 0.5rem;
    border-radius: 0.5rem 0 0 0.5rem;
    border: 1px solid gray;
    width: 100%;
    transition: background 0.4s ease;
}
 #openai_input.error {
    border: 1px solid red;
}
 .openai_message {
    padding: 0.75rem 1rem;
    background: #f4f4f4;
    border-radius: 0.5rem;
    margin-bottom: 1.75rem;
    width: fit-content;
    max-width: 90%;
    animation: block_openai_chat_popup 0.4s cubic-bezier(0.87, 0, 0.13, 1);
    position: relative;
}
 .openai_message:before {
    position: absolute;
    top: -1.5rem;
    left: 0;
    color: gray;
    opacity: 0;
    animation: block_openai_chat_fade-in 0.4s ease 0.4s forwards;
}
 .openai_message.user {
    align-self: flex-end;
    text-align: right;
}
 .openai_message.user:before {
    right: 0;
    left: unset;
}
 .openai_message.bot {
    background: var(--blue);
    color: var(--white);
}
.openai_message.alert {
    background: var(--red);
    color: var(--white);
}
 .openai_message.loading {
    animation: block_openai_chat_thinking 1s ease infinite;
}
 .openai_message.loading:before {
    animation: none;
    opacity: 0;
}


@keyframes block_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_openai_chat_thinking {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.25;
    }
    100% {
        opacity: 1;
    }
}

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