#tool-ai-assistant {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    max-height: 100%;
    position: relative;
}

.ai-assistant-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    width: 100%;
    background-color: var(--color-third);
    position: relative;

}

#tool-ai-assistant {
    position: relative;
}

.ai-chat-header {
    display: flex;
    align-items: center;
    padding: 0.35rem var(--spacing-sm);
    gap: var(--spacing-sm);
    /* border-top: 1px solid var(--color-border-color);
    border-bottom: 1px solid var(--color-border-color); */
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    width: 100%;
    pointer-events: none;

}

.menu-toggle-btn {
    pointer-events: auto;
    background: transparent;
    border: none;
    color: var(--color-note-text);
    font-size: 1.1rem;
    padding: var(--spacing-xsm);
    cursor: pointer;
    border-radius: var(--border-radius-button);
    transition: background 0.2s;
}

.menu-toggle-btn:hover {
    color: var(--color-text);

}

.ai-assistant-outer-wrapper {
    display: flex;
    flex-direction: row;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    width: 100%;
    background-color: var(--color-third);
    position: relative;
    justify-content: center;
}

.ai-chat-sidebar {
    position: relative;
    top: 40px;
    bottom: 0;
    left: 0;
    width: 20%;
    min-width: 175px;
    max-width: 250px;
    padding: 0 var(--spacing-sm);
    /* padding-left: 0; */
    background: var(--color-third);
    /* border-right: 1px solid var(--color-border-color); */
    overflow-y: auto;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) var(--scroll-background);
    padding-bottom: 100px;
    /* z-index: 10; */
}

.ai-chat-sidebar.hidden {
    display: none;
}

.chat-history-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.chat-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-third);
    border-radius: var(--border-radius-button);

}

.chat-entry button.chat-load-btn {
    flex: 1 1 0;
    /* let the button shrink */
    min-width: 0;
    /* ✱ needed inside flex rows */
    padding: .45rem;
    border: none;
    background: transparent;
    color: var(--color-text);
    text-align: left;

    /*  ellipsis  */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}


.chat-entry:hover {
    background: var(--color-fifth);
    color: var(--color-textHilight);
}

.chat-entry button.chat-del-btn {
    flex: 0 0 auto;
    background: transparent;
    border: none;
    font-size: 1rem;
    color: var(--color-note-text);
    cursor: pointer;
    padding: .3rem;
    opacity: 0;
}

.chat-entry:hover.chat-entry button.chat-del-btn {
    opacity: 1;
}

.chat-entry button.chat-del-btn:hover {
    color: var(--color-error, #cc3633);
}

.clear-all-btn,
.new-chat-btn {
    margin-bottom: var(--spacing-sm);
    padding: 0.5rem;
    background: var(--color-third);
    color: var(--color-text);
    border: 1px solid var(--color-border-color);
    border-radius: var(--border-radius-button);
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-weight: 500;
}

.clear-all-btn:hover,
.new-chat-btn:hover {
    background-color: var(--color-fourth);
    color: var(--color-text);
}

.top-buttons-wrapper {
    display: flex;
    gap: var(--spacing-sm);
}

/* Make both buttons share the space equally */
.top-buttons-wrapper .new-chat-btn,
.top-buttons-wrapper .clear-all-btn {
    flex: 1;
    white-space: nowrap;
}





.ai-chat-scroll-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) var(--scroll-background);
    position: relative;
    width: 100%;

}


.ai-chat-log {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0rem !important;
    max-width: 752px;
    margin: 0 auto;
    position: relative;
    width: 100%
}

.ai-chat-input-wrapper {
    padding: 0.75rem 0.75rem;
    padding-top: 0;
    /* border-top: 1px solid var(--color-border-color); */
    background-color: var(--color-third);
    position: sticky;
    bottom: 0;
    z-index: 2;
    width: 100%;
    max-width: 792px;
    margin: 0 auto;
}

.ai-chat-input-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: var(--color-third);
    border: 1px solid var(--color-border-color);
    border-radius: 24px;
    padding: 0.75rem 0rem;
    padding-bottom: 0.25rem;
    padding-top: 0;
    padding-right: 0;
    overflow: hidden;
    transition: all 0.2s ease;
}

.ai-chat-input-inner:focus-within {
    border-color: var(--color-border-hover);
}

.ai-chat-textarea {
    width: 100%;
    background: transparent;
    border: none;
    resize: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-size: 0.85rem;
    color: var(--color-text);
    line-height: 1.4;
    overflow-y: auto;
    max-height: 160px;
    outline: none;
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) var(--scroll-background);
    padding: 0.75rem 1rem;
    padding-bottom: 0.25rem;
}

.ai-chat-controls-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-top: 8px;
    padding: 0rem 0.5rem;
}

.ai-chat-attach-btn,
.ai-chat-send-btn {
    background: none;
    border: none;
    font-size: 1.0rem !important;
    color: var(--color-note-text);
    cursor: pointer;
    border-radius: 6px;
    padding: 0.2rem;
    transition: background 0.15s ease;
}

.ai-chat-attach-btn {
    /* display: none; */
    margin-right: auto;
    margin-left: 0.5rem;
}






.ai-attach-previews {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: .5rem;
    margin: .5rem 0;
    padding: 0 .5rem;
}

.attach-chip {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    flex-direction: column;
    border: 1px solid var(--color-border-color);
    border-radius: 4px;
    overflow: hidden;
    min-height: 70px;

}

.attach-chip .ti-file-text {
    font-size: 1.3rem;
    color: var(--color-note-text);
}

.attach-chip span {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 50px;
    font-family: var(--font-family);
    color: var(--color-note-text);

}

.attach-chip img {
    width: 100%;
    height: 65px;
    object-fit: cover;

}

.attach-chip .chip-x {
    position: absolute;
    font-size: 13px !important;
    top: 3px;
    right: 3px;
    background: transparent;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    background-color: var(--color-blur);
    backdrop-filter: blur(14px);
    aspect-ratio: 1;
    border-radius: 3px;
    padding: 0px;
    width: 18px;
    height: 18px;
    font-family: var(--font-family);
}

.chip-x:hover {
    color: var(--color-textHilight);
}


.msg-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
    margin-top: -15px
}

.msg-attachments .attach-chip {
    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
    border: none;
    max-width: 180px;
    max-height: 30px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.msg-attachments .attach-chip img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px !important;
}



.ai-chat-attach-btn:hover,
.ai-chat-send-btn:hover {
    background-color: var(--color-hover-bg);
    color: var(--color-textHilight) !important;
}


.ai-chat-send-btn {
    background: none;
    border: none;
    color: var(--color-note-text);
    font-size: 1.5rem !important;
    padding: 0.4rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s ease;
    /* margin-left: auto; */
    /* background-color: var(--color-fifth); */

}

.ai-chat-send-btn:hover {
    background-color: var(--color-hover-bg);
    color: var(--color-text);
}

.ai-chat-model-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    /* margin-left: auto; */
    margin-right: 0.5rem;
    padding-right: 0.5rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius-button);

}

.ai-chat-model-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-note-text);
    display: flex;
    align-items: center;
    user-select: none;
    padding: 0;
    pointer-events: none;
    max-width: 200px;

}

.ai-chat-model-label span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-chat-model-label i {
    font-size: 1rem;
}

.ai-chat-model-wrapper:hover .ai-chat-model-label,
.ai-chat-model-wrapper:hover .ai-chat-model-btn {
    color: var(--color-textHilight);

}

.ai-chat-model-wrapper:hover {
    /* border: 1px solid var(--color-border-color);
    background-color: var(--color-fourth); */
}

.ai-chat-model-btn {
    font-size: 1.2rem !important;
    padding-right: 0.2rem;
    padding-left: 0 !important;
}

.chat-item {
    font-family: var(--font-family);
    font-weight: 400;
    display: flex;
    gap: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--color-text);
    padding: 0.75rem 1rem;
    border-radius: 24px 4px 24px 24px;
    max-width: 80%;

    word-break: break-word;
    position: relative;
    /* add this */
}

.chat-item.user {
    align-self: flex-end;
    background-color: var(--color-fifth);
    color: var(--color-accent1-text);
}

.chat-item.assistant {
    align-self: flex-start;
    border-radius: 4px 24px 24px 24px;
    max-width: 100%;
    min-width: 100%;
}

.chat-item code {
    font-size: 0.85rem !important;
}

.chat-icon {
    font-size: 1.3rem;
    color: #9185ff;
    background-color: transparent;
    border-radius: 8px;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.5rem;
    margin-bottom: auto;
}


.chat-message {
    white-space: pre-wrap;
    position: relative;
    /* add this */
    width: 100%;
}

.chat-item pre {
    min-width: 0;
    background-color: var(--color-fourth) !important;
    padding: 0;
    position: relative;
    border-radius: var(--border-radius);
}

.code-block-container code {
    display: block;
    white-space: pre-wrap;
    word-break: break-word;
    height: 100%;
    padding: 20px;
    padding-top: 0px;
    background-color: var(--color-fourth);
    position: relative;
    border-radius: var(--border-radius);
}


.code-block-container {
    margin: 0.25rem 0;
    border: 1px solid var(--color-border-color);
    border-radius: var(--border-radius);
    background-color: var(--color-fourth);
    padding: 5px;
    position: relative;
}

.code-block-header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.15rem 0.15rem;
    border-radius: var(--border-radius);

}


.code-block-lang {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--color-note-text);
    border-radius: var(--border-radius-button);
    background-color: var(--color-blur);
    backdrop-filter: blur(14px);
    padding: 0.5rem 0.75rem;
}

.code-block-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    padding: 0.5rem;
    background-color: var(--color-blur);
    backdrop-filter: blur(14px);
    border-radius: var(--border-radius-button);
    top: 0.75rem;
    z-index: 10;
}


.code-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--color-note-text);
}

.code-btn:hover {
    color: var(--color-text);
}

.insert-btn,
.copy-btn {}


.code-block-container pre {
    margin: 0;
    overflow-x: auto;
    background: transparent;
}

.code-btn i {
    pointer-events: none;
    font-size: 1.1em;
}




/* Modern Chat Loading Animation */
.chat-item.assistant.loading .chat-icon {
    position: relative;
    display: inline-block;
    width: 1.4rem;
    height: 1.4rem;
}

/* Primary loader effect - pulse wave */
.chat-item.assistant.loading .chat-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #6c5ce7;
    opacity: 0.2;
    animation: pulse-wave 1.5s ease-out infinite;
}

/* Secondary loader - rotating dots */
.chat-item.assistant.loading .chat-icon::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 70% 30%, #6c5ce7 0, #6c5ce7 3px, transparent 3px),
        radial-gradient(circle at 30% 70%, #8c7ae6 0, #8c7ae6 3px, transparent 3px),
        radial-gradient(circle at 70% 70%, #a29bfe 0, #a29bfe 3px, transparent 3px),
        radial-gradient(circle at 30% 30%, #5352ed 0, #5352ed 3px, transparent 3px);
    border-radius: 50%;
    animation: rotate-dots 3s linear infinite;
}

/* Expanding wave animation */
@keyframes pulse-wave {
    0% {
        transform: scale(0.5);
        opacity: 0.6;
    }

    50% {
        opacity: 0;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Rotating dots animation */
@keyframes rotate-dots {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Alternative version with a fading trail effect */
/* Uncomment this and comment out the above version if you prefer this style */
/*
  .chat-item.assistant.loading .chat-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
      from 0deg,
      rgba(108, 92, 231, 0) 0%,
      rgba(108, 92, 231, 0.2) 20%,
      rgba(108, 92, 231, 0.5) 40%,
      rgba(108, 92, 231, 0.8) 60%,
      rgba(108, 92, 231, 1) 80%,
      rgba(108, 92, 231, 1) 100%
    );
    animation: rotating-trail 1.2s linear infinite;
  }
  
  @keyframes rotating-trail {
    to {
      transform: rotate(360deg);
    }
  }
  */

.scroll-down-btn {
    position: absolute;
    bottom: 4.0rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-fourth);
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    border: 1px solid var(--color-border-hover);
    cursor: pointer;
    box-shadow: var(--color-box-shadow);
    transition: opacity 0.2s;
    z-index: 5;
    transition: background 0.2s ease;
}

.scroll-down-btn:hover {
    background: var(--color-fifth);
    color: var(--color-textHilight);
}

/* Fade-in for new messages */
.chat-item {
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.chat-item.visible {
    opacity: 1;
    transform: translateY(0);
}





/* when AI is “typing”, grey‑out and disable all controls */
#tool-ai-assistant.typing .message-controls .ctrl-btn {
    opacity: 0.5;
    pointer-events: none;
}

/* 1) Make room under each bubble for the controls */
.chat-item.has-controls {
    position: relative;
    /* to scope absolutely‑positioned children */
    padding-bottom: 2.5rem;
    /* room for the controls */
}

/* 2) Position the controls container bottom‑right */
.message-controls {
    position: absolute;
    bottom: 0rem;
    /* 0.5rem above bubble bottom */
    left: 2.5rem;
    /* align to the right */
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: all 0.2s ease-in-out;
    padding-bottom: 1rem;
}

.chat-item.has-controls:hover .message-controls {
    opacity: 1;
}

.chat-item.has-controls:last-child .message-controls {
    opacity: 1;
}

/* 3) Style the control buttons to match your input/send icons */
.message-controls .ctrl-btn {
    background: none;
    border: none;
    color: var(--color-note-text);
    padding: 0.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    /* same as .ai-chat-send-btn */
    transition: background 0.15s ease,
        color 0.15s ease;
}

.message-controls .ctrl-btn:hover:not(:disabled) {
    background-color: var(--color-hover-bg);
    color: var(--color-text);
}

.message-controls .ctrl-btn:disabled {
    opacity: 0.4;
    cursor: default;
}


/* ──────────────────────────────────────────────
     Input‑row controls (attach / send)
     ────────────────────────────────────────────── */
.ai-chat-controls-row button {
    background: transparent;
    border: none;
    /* padding: 6px; */
    /* margin-left: 4px; */
    cursor: pointer;
    font-size: 1.2rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.ai-chat-controls-row button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* ──────────────────────────────────────────────
     Optionally tweak individual controls…
     ────────────────────────────────────────────── */
/* e.g. slightly different hover for retry */
.message-controls .retry-msg-btn:hover {
    background-color: rgba(220, 220, 220, 0.3);
}





/* Don’t grow the bubble; reserve space *outside* it */
.chat-item.user.has-controls {
    position: relative;
    /* anchor for absolute controls */
    padding-bottom: 1rem;
    /* was adding height; remove */
    margin-bottom: 1.5rem;
    /* space under the bubble for controls */
}

/* Put controls visually *below* the bubble */
.user .message-controls {
    position: absolute;
    top: calc(100% - 0rem);
    /* just below the bubble */
    display: flex;
    gap: .5rem;
    opacity: 0;
    transition: opacity .2s ease;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    /* background: red; */
    height: 28px;
}


.chat-item.user .message-controls {
    right: .75rem;
    /* hugs the user bubble’s inner edge */
    left: auto;
    padding: 0.25rem 0;
}

/* Reveal rules (same behavior you had) */
.chat-item.has-controls:hover .message-controls,
.chat-item.has-controls:last-child .message-controls {
    opacity: 1;
}


/* ──────────────────────────────────────────────
   Markdown Styling for AI Assistant (.chat-item.assistant)
   ────────────────────────────────────────────── */

.chat-item.assistant h1,
.chat-item.assistant h2,
.chat-item.assistant h3,
.chat-item.assistant h4,
.chat-item.assistant h5,
.chat-item.assistant h6 {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    margin: 0.5rem 0 0.5rem;
    color: var(--color-textHilight);
}

.chat-item.assistant h1 {
    font-size: 1rem;
}

.chat-item.assistant h2 {
    font-size: 0.9rem;
}

.chat-item.assistant h3 {
    font-size: 0.9rem;
}

.chat-item.assistant p {
    margin: 0.5rem 0;
}

.chat-item.assistant a {
    color: var(--color-href);
    text-decoration: underline;
}

.chat-item.assistant a:hover {
    text-decoration: none;
}

/* Lists */
.chat-item.assistant ul,
.chat-item.assistant ol {
    margin: 0.5rem 0 0.5rem 1.5rem;
    padding: 0;
}

.chat-item.assistant li {
    margin-bottom: 0.25rem;
    list-style-position: outside;
    max-width: 100%;
    word-wrap: break-word;
}

/* Fix: Prevent <li> from stretching full width */
.chat-item.assistant li::marker {
    color: var(--color-note-text);
}

.chat-item.assistant ul {
    list-style-type: disc;
}

.chat-item.assistant ol {
    list-style-type: decimal;
}

/* Blockquotes */
.chat-item.assistant blockquote {
    border-left: 4px solid var(--color-border-hover);
    padding: 0.2rem 0.4rem;
    padding-left: 1rem;
    margin: 0.75rem 0;
    color: var(--color-note-text);
    font-style: italic;
    background-color: var(--color-fifth);
    border-radius: 0 6px 6px 0;
}

/* Inline code */
.chat-item code:not(.code-block-container code),
.chat-item.assistant p code:not(.code-block-container code),
.chat-item.assistant li code:not(.code-block-container code),
.chat-item.assistant blockquote code:not(.code-block-container code) {
    display: inline-block;
    background-color: var(--color-fifth);
    border-radius: 4px;
    padding: 0.051rem 0.4rem !important;
    font-size: 0.85em;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
    max-width: 100%;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.chat-item.assistant td code:not(.code-block-container code),
.chat-item.assistant th code:not(.code-block-container code) {
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
    background-color: var(--color-fifth);
    border-radius: 4px;
    padding: 0.051rem 0.4rem !important;
    font-size: 0.8em;
}

/* Horizontal Rule */
.chat-item.assistant hr {
    border: none;
    border-top: 1px solid var(--color-border-color);
    margin: 1rem 0;
}

.chat-item.assistant table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.9rem;
    border-collapse: collapse;
    border-spacing: 0;
}

.chat-item.assistant th,
.chat-item.assistant td {
    border: 1px solid var(--color-border-color);
    padding: 0.5rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.chat-item.assistant th {
    background-color: var(--color-fourth);
    color: var(--color-textHilight);
    font-weight: 500;
}

.chat-item.assistant tr:nth-child(even) td {
    background-color: var(--color-third);
}

.chat-item.assistant img {
    max-width: 100%;
    height: auto;
    margin: 0.5rem 0;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.chat-item.assistant strong {
    font-weight: 500;
    color: var(--color-textHilight);
}

.chat-item.assistant em {
    font-style: italic;
    color: var(--color-note-text);
}

.chat-item.assistant del {
    text-decoration: line-through;
    opacity: 0.7;
}

.chat-item.assistant input[type="checkbox"] {
    margin-right: 0.5rem;
    transform: scale(1.1);
    accent-color: var(--color-accent1-text);
}

.chat-item.assistant p,
.chat-item.assistant ul,
.chat-item.assistant ol,
.chat-item.assistant blockquote,
.chat-item.assistant pre,
.chat-item.assistant table {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.chat-item.assistant>*:last-child {
    margin-bottom: 0;
}

.ai-chat-log {
    height: 100%;
    /* padding-bottom: ; */
}

.chat-intro-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem;
    max-width: 500px;
    margin: 2rem auto;
    color: var(--color-note-text);
    height: 100%;
}

.chat-intro-text {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--color-textHilight);
}

.chat-intro-text i {
    font-size: 1.3rem;
    color: #9185ff;
    margin-right: 0.4rem;
}

.chat-intro-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
}

.suggestion-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    /* space between icon and text */
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: none;
    background-color: var(--color-third);
    border: 1px solid var(--color-border-color);
    border-radius: var(--border-radius-button);
    cursor: pointer;
    color: var(--color-note-text);
    transition: all 0.1s ease;
    flex: 1 1 140px;
    font-weight: 500;
    text-align: center;
}


.suggestion-btn:active {
    transform: translateY(1px);
}

.suggestion-btn:hover {
    background-color: var(--color-fourth);
    color: var(--color-text);
}
.ai-error{
       white-space: nowrap; 
       margin-top: 8px;
}
/* Give the inline button the same styling language as other chat buttons */
.ai-error-settings-btn {
    flex: 1 1 0;
    display: inline-flex;
    min-width: 0;
    padding: .45rem;
    padding-right: 1rem;
    border: none;
    border: 1px solid rgba(37, 85, 149, 0.3);
    border-radius: 0.4rem;
    background-color: rgba(37, 85, 149, 0.1);
    color: var(--color-info);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.ai-error-settings-btn:hover {
    border: 1px solid rgba(37, 85, 149, 0.4);
    background-color: rgba(37, 85, 149, 0.25);
}

.ai-error-settings-btn i {
    margin-right: 0.4rem;
    margin-top: 3px;
}

.ai-error-settings-btn span {}

.ai-warning {
    margin-right: 0.5rem;
    color: var(--color-warn)
}