.chat-thread-wrapper {
    display: flex;
    height: 100%;
    min-height: 100%;
    flex-direction: column;
    flex-grow: 1;
}

[data-theme="light"] .chat-thread-wrapper.incognito .chat-input-box {
    background-color: var(--bulma-dark);
    color: var(--bulma-light)
}

[data-theme="light"] .chat-thread-wrapper.incognito .button {
    background-color: var(--bulma-light);
    color: var(--bulma-dark)
}

[data-theme="dark"] .chat-input-box .button.message-submit {
    background-color: var(--bulma-light);
    color: var(--bulma-dark)
}

[data-theme="light"] .chat-input-box .button.message-submit {
    background-color: var(--bulma-dark);
    color: var(--bulma-light)
}

.chat-input-box .button {
    border-radius: 50%;
}

.chat-messages-container {
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 2em;
    flex-grow: 1;
}

.chat-messages-box,
.shared-chat-notification {
    flex-grow: 1;
    padding: 0 20%;
}

.chat-input-container {
    position: relative;
    margin: 0em 1em;
    padding: 0 20%;

    display: flex;
    flex-direction: column;

}

.new-chat .chat-input-container {
    flex-grow: 2;
}

.scroll-to-bottom {
    display: inline-block;
    margin-bottom: 2em;
    opacity: 0;
    transition: opacity ease .25s;
    z-index: -1;
    position: absolute;
    left: 50%;
    right: 50%;
    top: -3em;
    transform: translateX(-50%);
    width: 2em;
}

.scroll-to-bottom.visible {
    opacity: 1;
    z-index: 100;
}

.scroll-to-bottom button {
    width: 2em;
    height: 2em;
    border: 1px solid var(--bulma-border);
    border-radius: 50%;
}

.chat-input-box {
    max-width: 48rem;
    margin: 0 auto;
    width: 100%;
    border-radius: 2em !important;
    margin-bottom: 1em;
}

.chat-disclaimer-text {
    font-size: 0.75em;
    text-align: center;
    /* padding: 1em; */
    padding: 0em 0 1em 0;
    /* is-size-7 has-text-centered p-3 */
}

.action-message {
    margin: 0 1em;
    font-size: 0.85em;
    font-weight: 500;
}

.action-message .content {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.action-message .dropdown-memory-item {
    border: 1px solid var(--bulma-border);
    border-radius: var(--bulma-radius);
    padding: .5em;
    background: var(--bulma-background-hover);
    margin-bottom: .5em;
}

.action-message .manage-memory-link {
    padding: .5em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    border-radius: var(--bulma-radius);
    color: var(--bulma-text);
    font-weight: 500;
}

.action-message .manage-memory-link:hover {
    background: var(--bulma-background-hover);
}

.user-message {
    display: flex;
    justify-content: end;
    padding: 1em;
    white-space: pre-wrap;
    flex-flow: column;
    align-items: end;
}

.user-message .content {
    padding: 1em 1.5em;
    border-radius: 1.25em;
}

.user-message .attachment {
    border-radius: 1.25em;
    margin-bottom: .25em;
}

.user-message .attachment.file-attachment {
    padding: 1.5em;
    border: 1px solid var(--bulma-border);
}

.user-input-container {
    display: flex;
    /* margin: 0 1em; */
}

.message-input-container {
    flex-grow: 1;
    max-height: 25dvh;
    overflow-y: scroll;
}

.message-input {
    padding: .5em;
    word-break: break-word;
    white-space: pre-wrap;
}

.message-input:focus {
    outline: 0;
}


.assistant-message {
    padding: 1em;
    /* white-space: pre-wrap; */
    line-height: 1;
}

.buttons-container {
    display: flex;
    justify-content: center;
    flex-direction: column;
}


/* Headings */
.assistant-message h1,
.assistant-message h2,
.assistant-message h3,
.assistant-message h4,
.assistant-message h5,
.assistant-message h6 {
    margin: 1em 0;
}

.assistant-message h1 {
    font-size: 2em;
}

.assistant-message h2 {
    font-size: 1.6em;
}

.assistant-message h3 {
    font-size: 1.3em;
}

/* Paragraphs */
.assistant-message p {
    margin-bottom: .5em;
    line-height: 1.5;
}

/* Lists */
.assistant-message ul,
.assistant-message ol {
    margin-bottom: 1em;
    margin-left: 1.5em;
    list-style: initial;
}

.assistant-message li {
    list-style-type: initial;
    margin-bottom: .5em;
    line-height: 1.5;
}

/* Blockquotes */
.assistant-message blockquote {}

/* Code blocks */
.assistant-message pre {}

.assistant-message code {}

/* Inline code inside pre should not be re-styled */
.assistant-message pre code {}

/* Links */
.assistant-message a {}

.assistant-message a:hover {}


.thinking {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    height: 40px;
    /* padding-bottom: 4rem; */
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #999;
    border-radius: 50%;
    animation: bounce 1.4s infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}



@media (max-width: 767px) {

    .chat-messages-box,
    .shared-chat-notification {
        padding: 0;
    }

    .chat-input-container {
        padding: 0;
    }

    .new-chat .chat-input-container {
        /* flex-grow: 0; */
    }

    .chat-disclaimer-text {
        display: none;
    }

    .chat-input-container {
        /* margin: auto; */
        justify-content: space-between;
    }

}

.sentinel {
    height: 4em;
}

.invisible {
    opacity: 0;
    height: 0;
}


#initialChatGreeting {
    position: relative;
    padding: 2em;
}

#initialChatGreeting.invisible {
    padding: 0;
}

.chat-greeting {
    transform: translate(0, 0);
    transition: all ease .2s;
    width: 100%;
}

.chat-greeting:nth-child(1).invisible {
    transform: translate(0, -80px);
}

.chat-greeting.invisible:nth-child(2) {
    transform: translate(0, 80px);
}


.upload-area.dragover {
    border-color: #2563eb;
    background: #eff6ff;
}

[data-theme="dark"] .upload-area.dragover {
    border-color: #2563eb;
    background: #333;
}

.upload-label svg {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    fill: #9ca3af;
}

.file-list {
    display: flex;
    flex-direction: row;
    gap: 0.5em;
    flex-wrap: wrap;
    margin-bottom: 1em;
}

.file-list:empty {
    margin-bottom: 0;
}

.file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border: 1px solid var(--bulma-border);
    border-radius: 8px;
    background: var(--bulma-body-background-color);
}

.file-name {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 240px;
}

.upload-button {
    align-self: center;
    border: none !important;
    box-shadow: none !important;
    /* background-color: none !important; */
}

.chat-thread-wrapper.incognito .button.upload-button {
    background-color: var(--bulma-dark);
    color: var(--bulma-light);
}