@font-face {
    font-family: 'Roboto';
    src: url('../fonts/roboto/Roboto-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/roboto/Roboto-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/roboto/Roboto-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

/* Add these new CSS variables to your existing :root and body.dark-theme */

:root {
    --bg-color: #f0f0f0;
    --bg-hover: #e9e9e9;
    --text-color: #333;
    --text-light: #999;
    --prompt-bg: white;
    --prompt-placeholder: #bdbdbd;
    --prompt-submit: #e0e0e0;
    --button-bg: #0b6555;
    --button-color: white;
    --button-hover: #044337;
    --user-message-bg: #e1e1e1;
    --message-link: #12a58c;
    --message-bold: #ff5722;
    --system-message-color: #888;
    --disclaimer-color: #9f9f9f;
    --tool-message-bg: #e6e6e6;
    --sidebar-bg: #fff;
    --sidebar-text: #333;
    --sidebar-button: #f2f2f2;
    --logo-image: url('/static/images/picoco-dark.svg');

    /* Table-specific variables */
    --table-border: #ddd;
    --table-header-bg: #f5f5f5;
    --table-row-even: #f9f9f9;
    --table-code-color: #d63384;
    /* Button variables for table expand/minimize */
    --button-expand-bg: #f8f9fa;
    --button-expand-text: #666;
    --button-expand-hover: #e9ecef;
    --container-shadow: rgba(0, 0, 0, 0.08);

    /* Info bubble variables */
    --background-primary: white;
    --background-secondary: #f8f9fa;
    --background-hover: #e9ecef;
    --border-color: #dee2e6;
    --text-primary: #333;
    --text-secondary: #6c757d;

    --text-green: #43a047;
    --scroll-side: #e0e0e0;
    --scroll-main: #bdbdbd;
    --system-link: #11a58c;
}

body.dark-theme {
    --bg-color: #222;
    --bg-hover: #333;
    --text-color: #f0f0f0;
    --text-light: #666;
    --prompt-bg: #333;
    --prompt-placeholder: #616161;
    --prompt-submit: #424242;
    --button-bg: #0b6555;
    --button-color: white;
    --button-hover: #044337;
    --user-message-bg: #343434;
    --message-link: #6ed2ff;
    --message-bold: #ff9800;
    --system-message-color: #888;
    --disclaimer-color: #9f9f9f;
    --tool-message-bg: #161616;
    --sidebar-bg: #1c1c1c;
    --sidebar-text: #ffffff;
    --sidebar-button: #282828;
    --logo-image: url('/static/images/picoco-light.svg');

    /* Dark theme table variables */
    --table-border: #404040;
    --table-header-bg: #2a2a2a;
    --table-row-even: #292929;
    --table-code-color: #ff6b9d;
    /* Dark theme button variables for table expand/minimize */
    --button-expand-bg: #2a2a2a;
    --button-expand-text: #ccc;
    --button-expand-hover: #333;
    --container-shadow: rgba(0, 0, 0, 0.2);

    /* Dark theme info bubble variables */
    --background-primary: #2a2a2a;
    --background-secondary: #333;
    --background-hover: #404040;
    --border-color: #404040;
    --text-primary: #f0f0f0;
    --text-secondary: #999;

    --text-green: #81c784;
    --scroll-side: #333;
    --scroll-main: #424242;
    --system-link: #11a58c;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

ul,
li {
    padding: 0;
    margin: 0;
}

body {
    display: flex;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 16px;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

#sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    height: 140px;
    display: flex;
    padding: 15px 20px;
}

.sidebar-content .logo img {
    content: var(--logo-image);
    margin: 10px 0px 20px 0px;
    pointer-events: none;
}

.sidebar-content {
    flex-grow: 1;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-side) var(--sidebar-bg);
}

.sidebar-content h3 {
    padding: 0px;
    margin: 0px;
    margin-bottom: 10px;
    font-size: 0.8em;
    color: var(--text-light);
    font-weight: normal;
}

.sidebar-content ul {
    margin-bottom: 20px;
}

.sidebar-content .user-info {
  margin-bottom: 15px;
}

.sidebar-content .username {
  padding: 0px 10px 7px 10px;
}

.sidebar-footer {
    padding: 10px 20px 45px 20px;
    display: flex;
}

.close-sidebar {
    color: var(--prompt-placeholder);
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    position: absolute;
    top: 26px;
    right: 20px;
    z-index: 1002;
}

.sidebar-list {
    list-style-type: none;
    padding: 0;
}

.sidebar-list li {
    font-size: 0.85em;
    padding: 7px 10px;
    cursor: pointer;
    border-radius: 2px;
}

.sidebar-list li:hover {
    background-color: var(--sidebar-button);
}

.sidebar-list li a {
    color: var(--text-color);
}
.sidebar-list li.selected {
    background-color: var(--sidebar-button);
}

#projects .project_green {
    color: var(--text-green);
}

#theme-switch {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--sidebar-button);
    color: var(--text-color);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em
}


#mainbar {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    transition: margin-left 0.3s ease-in-out;
}

.header {
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 20px 0 80px;
    width: 100%;
    box-sizing: border-box;
    transition: padding 0.3s;
    position: relative;
}

.header .header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header h1 {
    padding: 0;
    margin: 0;
    font-size: 1.4em;
    font-weight: normal;
}

.header .anotation {
    font-size: 0.6em;
}

.content-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    width: 100%;
    overflow-y: auto;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-main) var(--bg-color);
}

.prepared-wrapper {
    margin-top: 20px;
    margin-bottom: 40px;
    width: 100%;
}

.prepared-title {
    text-align: center;
    font-weight: bold;
    font-size: 1em;
    margin-bottom: 40px;
}

.prepared-title strong {
    display: block;
    font-weight: normal;
    font-size: 1.4em;
    margin-bottom: 7px;
}

/* Progress loading bar for title */
.prepared-title strong.loading {
    position: relative;
    color: transparent;
    /* Hide the text during loading */
    min-height: 1.4em;
    /* Maintain height while loading */
}

.prepared-title strong.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 8px;
    background-color: white;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.prepared-title strong.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 6px;
    background: linear-gradient(90deg, #4caf50, #66bb6a);
    border-radius: 3px;
    left: calc(50% - 99px);
    /* Start from left edge of the frame */
    transform: translateY(-50%);
    /* Only center vertically */
    animation: progress-fill 1s ease-out forwards;
}

/* Dark theme support */
body.dark-theme .prepared-title strong.loading::before {
    background-color: var(--prompt-bg);
    border-color: var(--border-color, #404040);
}

@keyframes progress-fill {
    0% {
        width: 0;
    }

    100% {
        width: 198px;
        /* Full width minus 2px for borders */
    }
}

.prepared-prompts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 20px;
    width: 100%;
}

.prepared-title em {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
    font-weight: normal;
    font-size: 0.85em;
    font-style: normal;
    color: var(--system-message-color);
}

.info-label {
    color: var(--text-light);
    font-weight: normal;
    font-size: 0.9em;
}

.info-box {
    display: inline-block;
    background-color: var(--prompt-bg);
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--text-color);
    border: 1px solid var(--prompt-submit);
    transition: background-color 0.3s, color 0.3s;
}

.info-box.error {
    background-color: rgba(211, 47, 47, 0.1);
    color: #d32f2f;
    border-color: rgba(211, 47, 47, 0.2);
}

body.dark-theme .info-box.error {
    background-color: rgba(255, 82, 82, 0.15);
    color: #ff5252;
    border-color: rgba(255, 82, 82, 0.2);
}

/* Info Bubble Styles */
.info-bubble {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1000;
    /* Higher z-index for the model display and button */
}

.model-info-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-model-display {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
    white-space: nowrap;
}

.info-bubble-button {
    background: var(--background-secondary);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.info-bubble-button:hover {
    background: var(--background-hover);
    color: var(--text-primary);
}

/* Info Sticker - now a sibling element */
.info-sticker {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 40px 12px 12px 12px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999;
    /* Lower z-index to appear underneath the model display */
    transition: opacity 0.2s ease;
}

.info-sticker.hidden {
    display: none;
}

.info-sticker-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right:26px;
    text-align:right;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-label {
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.prompt-block {
    border: 1px solid var(--prompt-submit);
    color: var(--system-message-color);
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 0.85em;
    line-height: 1.4em;
}

.prompt-block svg {
    display: block;
    margin-bottom: 10px;
}

.prompt-block:hover {
    background-color: var(--bg-hover);
}

.message-content a {
    color: var(--message-link);
}

.user-message {
    text-align: right;
    padding: 10px 0px 10px 70px;
}

.user-message .message-content {
    font-size: 0.95em;
    line-height: 1.8em;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    background-color: var(--user-message-bg);
    max-width: 440px;
    text-align: left;
}

.assistant-message {
    text-align: left;
    padding: 10px 0px 20px 0px;
    position: relative;
}

.assistant-message .message-content {
    font-size: 0.95em;
    line-height: 1.5em;
    display: inline-block;
    padding: 10px 0px 10px 40px;
    white-space: pre-line;
}

.assistant-message svg {
    position: absolute;
    top: 17px;
    left: 10px;
    font-size: 16px;
    color: var(--system-message-color);
}

.assistant-message .message-content strong {
    color: var(--message-bold);
    font-weight: normal;
}

/* CSS-only conditional table expansion - HEIGHT-BASED */
.assistant-message .reference-table-wrapper {
    position: relative;
    border-radius: 6px;
    margin: 15px 0 25px 0;
    border: 1px solid var(--table-border);
    box-shadow: 0 2px 8px var(--container-shadow);
    background-color: var(--prompt-bg);
    overflow: hidden;
}

.assistant-message .reference-table-wrapper:empty {
    height: 40px;
    background-color: var(--table-row-even);
}

/* Container that measures the table height */
.assistant-message .table-height-detector {
    position: relative;
    max-height: 110px;
    /* Constraint height - shows about 3-4 rows */
    overflow: hidden;
}

/* Invisible checkbox for expand/collapse state */
.assistant-message .table-toggle {
    display: none;
}

/* The actual table */
.assistant-message .reference-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
    background-color: var(--prompt-bg);
    color: var(--text-color);
    border: none;
}

.assistant-message .reference-table th {
    background-color: var(--table-header-bg);
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--table-border);
    color: var(--text-color);
}

.assistant-message .reference-table td {
    padding: 10px 8px;
    vertical-align: top;
    border-bottom: 1px solid var(--table-border);
    line-height: 1.4;
}

.assistant-message .reference-table tr:nth-child(even) {
    background-color: var(--table-row-even);
}

.assistant-message .reference-table tr:last-child td {
    border-bottom: none;
}

.assistant-message .reference-table td:first-child {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

.assistant-message .reference-table td:first-child strong {
    color: var(--table-code-color);
    font-weight: 600;
}

/* Expand button - controlled by JavaScript based on actual height */
.assistant-message .table-expand-button {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--button-expand-bg);
    color: var(--button-expand-text);
    border: none;
    border-top: 1px solid var(--table-border);
    border-radius: 0 0 6px 6px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    user-select: none;
    display: none;
    /* Hidden by default, shown by JavaScript */
}

.assistant-message .table-expand-button:hover {
    background-color: var(--button-expand-hover);
}

.assistant-message .table-expand-button::after {
    content: "Click to expand";
}

/* Expanded state */
.assistant-message .table-toggle:checked~.table-height-detector {
    max-height: none !important;
    overflow: visible;
}

.assistant-message .table-toggle:checked~.table-expand-button::after {
    content: "Click to minimize";
}

.assistant-message .table-toggle:checked~.table-expand-button {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    background-color: var(--button-expand-bg);
}

.assistant-message .table-toggle:checked~.table-expand-button:hover {
    background-color: var(--button-expand-hover);
}

/* When expanded, also remove overflow constraint from the wrapper */
.assistant-message .reference-table-wrapper:has(.table-toggle:checked) {
    overflow: visible;
}

/* Fallback for browsers without :has() support */
.assistant-message .reference-table-wrapper.expanded {
    overflow: visible;
}

.assistant-message .reference-table-wrapper.expanded .table-height-detector {
    max-height: none !important;
    overflow: visible;
}

/* Classes added by JavaScript based on actual height measurement */
.assistant-message .reference-table-wrapper.needs-expansion .table-expand-button {
    display: block;
}

.assistant-message .reference-table-wrapper.needs-expansion .table-height-detector {
    max-height: 110px;
    /* Ensure constraint is applied */
}

.assistant-message .reference-table-wrapper:not(.needs-expansion) .table-height-detector {
    max-height: none;
}

/* Text reference styles - matching table structure exactly */
.assistant-message .reference-text-wrapper {
    position: relative;
    border-radius: 6px;
    margin: 15px 0 25px 0;
    border: 1px solid var(--table-border);
    box-shadow: 0 2px 8px var(--container-shadow);
    background-color: var(--prompt-bg);
    overflow: hidden;
}

.assistant-message .reference-text-wrapper:empty {
    height: 40px;
    background-color: var(--table-row-even);
}

/* Container that measures the text height - higher constraint than tables */
.assistant-message .text-height-detector {
    position: relative;
    max-height: 200px;
    /* Higher constraint for text content */
    overflow: hidden;
}

/* Invisible checkbox for expand/collapse state */
.assistant-message .text-toggle {
    display: none;
}

/* The actual text content */
.assistant-message .reference-text {
    width: 100%;
    margin: 0;
    font-size: 0.85em;
    font-family: monospace;
    line-height: 1.8em;
    background-color: var(--prompt-bg);
    color: var(--text-color);
    border: none;
    border-collapse: collapse;
    /* Even though it's not a table, this helps with spacing */
}
.assistant-message .reference-text p {
    margin: 0
}
.assistant-message .text-item {
    padding: 20px;
    vertical-align: top;
    border-bottom: 1px solid var(--table-border);
}

.assistant-message .text-item:nth-child(even) {
    background-color: var(--table-row-even);
}

.assistant-message .text-item:last-child {
    border-bottom: none;
}

/* Expand button - hidden by default, only shown when needed */
.assistant-message .text-expand-button {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--button-expand-bg);
    color: var(--button-expand-text);
    border: none;
    border-top: 1px solid var(--table-border);
    border-radius: 0 0 6px 6px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    user-select: none;
    display: none;
}

.assistant-message .text-expand-button:hover {
    background-color: var(--button-expand-hover);
}

.assistant-message .text-expand-button::after {
    content: "Click to expand";
}

/* Expanded state - EXACTLY matching table implementation */
.assistant-message .text-toggle:checked~.text-height-detector {
    max-height: none !important;
    overflow: visible;
}

.assistant-message .text-toggle:checked~.text-expand-button::after {
    content: "Click to minimize";
}

.assistant-message .text-toggle:checked~.text-expand-button {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    background-color: var(--button-expand-bg);
}

.assistant-message .text-toggle:checked~.text-expand-button:hover {
    background-color: var(--button-expand-hover);
}

/* When expanded, remove overflow constraint from the wrapper */
.assistant-message .reference-text-wrapper:has(.text-toggle:checked) {
    overflow: visible;
}

/* Fallback for browsers without :has() support */
.assistant-message .reference-text-wrapper.expanded {
    overflow: visible;
}

.assistant-message .reference-text-wrapper.expanded .text-height-detector {
    max-height: none !important;
    overflow: visible;
}

/* JavaScript-controlled classes - updated constraint for text */
.assistant-message .reference-text-wrapper.needs-expansion .text-expand-button {
    display: block;
}

.assistant-message .reference-text-wrapper.needs-expansion .text-height-detector {
    max-height: 200px;
    /* Ensure constraint is applied - higher for text */
}

.assistant-message .reference-text-wrapper:not(.needs-expansion) .text-height-detector {
    max-height: none;
}

.system-message {
    text-align: center;
    color: var(--system-message-color);
    font-size: 0.8em;
    padding-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.system-message .message-content {
    display: flex;
    align-items: center;
}

.system-message .message-content svg {
    width: 14px;
    height: 14px;
    margin-right: 8px;
    flex-shrink: 0;
    color: var(--prompt-submit);
}

#scroll-to-bottom {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--prompt-submit);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 1em;
    cursor: pointer;
    z-index: 1003;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    display:none;
}

#scroll-to-bottom svg {
    margin-top: 3px;
}

#content {
    max-width: 640px;
    width: 100%;
    padding: 0px 20px;
    box-sizing: border-box;
}

.footer {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-content {
    max-width: 680px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 15px 25px 15px;
    box-sizing: border-box;
    position: relative;
}

#prompt-form {
    background-color: var(--prompt-bg);
    margin-top: auto;
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    width: 100%;
    max-width: 650px;
    box-sizing: border-box;
}

#prompt-input {
    background-color: transparent;
    color: var(--text-color);
    border: none;
    flex-grow: 1;
    font-size: 16px;
    outline: none;
}

#prompt-input::placeholder {
    color: var(--prompt-placeholder);
}

.submit-button {
    background-color: var(--prompt-submit);
    color: var(--prompt-bg);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1em;
    height: 30px;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, color 0.3s;
}

.submit-button.active {
    background-color: var(--text-color);
}

.disclaimer {
    color: var(--disclaimer-color);
    font-size: 0.8em;
    text-align: center;
    margin-top: 7px;
}

#sidebar-toggle {
    display: none;
}

.sidebar-toggle-label {
    position: fixed;
    top: 16px;
    left: 15px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--prompt-bg);
    color: var(--text-color);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em
}

#sidebar-toggle:checked~#sidebar {
    transform: translateX(0);
}

/* Desktop styles */
@media screen and (min-width: 768px) {
    #sidebar-toggle:checked~#mainbar .header {
        padding: 0 20px 0 20px;
        /* Keep same padding as default */
        transition: padding 0.3s;
    }

    #sidebar-toggle:checked~#mainbar {
        margin-left: 250px;
    }
}

/* Mobile styles */
@media screen and (max-width: 767px) {

    .header .header-wrapper {
        margin: 0 auto;
    }

    #sidebar {
        width: 100%;
        max-width: 300px;
    }

    .prepared-title em {
        gap: 8px;
    }

    .info-box {
        font-size: 0.85em;
        padding: 2px 8px;
    }

    /* Adjust info bubble positioning on mobile */
    .info-bubble {
        right: 20px;
    }

    .info-sticker {
        right: 20px;
        min-width: 180px;
    }

    .selected-model-display {
        font-size: 0.8rem;
    }
}

@media screen and (max-width: 620px) {
    .prepared-prompts {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media screen and (max-width: 419px) {
    .prepared-prompts {
        max-width: 100%;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#thinking-indicator.hidden {
    display: none;
}

@keyframes thinking {
    0% {
        content: '.';
    }

    25% {
        content: '.';
    }

    50% {
        content: '..';
    }

    75% {
        content: '...';
    }

    100% {
        content: '....';
    }
}

.thinking-dots::after {
    content: '...';
    display: inline-block;
    animation: thinking 1.5s infinite;
    width: 1em;
    text-align: left;
}

.highlight {
    font-weight: normal;
    color: #8bc34a
}

.picoco-sources {
    padding: 10px 0px 10px 40px;
}

.picoco-sources h4 {
    margin: 0;
    padding: 0;
    font-weight: normal;
    color: #999;
}

.picoco-sources ul {
    padding-left: 15px;
}

.picoco-sources ul li {
    padding: 10px 5px 0px 5px;
}

.picoco-sources ul li::marker {
    color: #999
}

.picoco-sources a {
    display: inline-block;
    text-decoration: none;
    color: var(--message-link);
}

.picoco-sources a:hover {
    text-decoration: underline
}

.picoco-sources-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.picoco-sources-header h4 {
    margin: 0;
    margin-right: 8px;
    /* Space between title and icon */
}

.sources-toggle-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--prompt-submit);
    color: var(--prompt-bg);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    transition: background-color 0.3s;
}

.sources-toggle-icon svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    /* Initial rotation: point right */
    fill: currentColor;
    transition: transform 0.3s ease;
}

.sources-toggle-icon.expanded {
    background-color: var(--prompt-bg);
}

.sources-toggle-icon.expanded svg {
    transform: translate(-50%, -50%) rotate(180deg);
    /* Expanded rotation: point down */
}

.picoco-sources-content {
    padding-left: 8px;
    margin-top: 8px;
}

.picoco-sources-content ul {
    margin-top: 8px;
}

.picoco-sources .source-no-link {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.95em;
}

/* Basic modal styling */
.in_tool_modal {
    position: relative;
    padding-bottom: 40px;
}

.in_tool_modal.hidden {
    display: none;
}

.intool-exit {
    text-align: left;
    padding-bottom: 20px;
}

.intool-exit-message {
    display: inline-block;
    padding: 7px 20px;
    background-color: #56b273;
    border-left: 5px solid #56b273;
    color: var(--prompt-bg);
    font-size: 0.8em;
    border-radius: 0 4px 4px 0;
}

.message.intool {
    border-left: 5px solid #56b273;
}

.modal-content {
    background-color: var(--tool-message-bg);
    color: var(--disclaimer-color);
    border-left: 5px solid #56b273;
    padding: 17px 25px;
    max-width: 300px;
    width: auto;
    pointer-events: auto;
    position: relative;
    font-size: 0.8em;
    line-height: 1.4em;
    border-radius: 0 4px 4px 0;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: red;
    cursor: pointer;
}

.logout-option {
    font-size: 0.85em;
    padding: 7px 10px;
    cursor: pointer;
    border-radius: 2px;
}

.logout-option:hover {
    background-color: var(--sidebar-button);
}
