#thinking-log-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#thinking-log-container {
    background-color: var(--background-color-base, white);
    color: var(--text-color-base, black);
    border: 1px solid var(--border-color-base, #ccc);
    border-radius: 10px;
    padding: 20px;
    max-width: 80vw;
    max-height: 80vh;
    min-width: 50vw;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

#thinking-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color-base, #ccc);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

#thinking-log-title {
    font-weight: bold;
}

#thinking-log-close-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
}

#thinking-log-entries {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 10px; /* for scrollbar */
}

.thinking-log-entry {
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 5px;
    background-color: var(--agent-background-color, #e0f7fa);
    display: flex;
    align-items: flex-start; /* align to top to handle multi-line messages */
    gap: 10px;
}

.thinking-log-entry.error {
    background-color: var(--unknown-background-color, #ffAAAA);
    color: var(--unknown-text-color, #333);
}

.thinking-log-spinner {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 3px; /* align with first line of text */
}

.thinking-log-messages p {
    margin: 0;
    padding: 0;
    text-indent: -1em;
    padding-left: 1em;
}

.thinking-log-messages p:first-child {
    font-weight: bold;
    text-indent: 0;
    padding-left: 0;
}


/* PARAMEECIUM LOADER */
.paramecium-loader {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.paramecium-body {
    width: 20px;
    height: 12px;
    background-color: var(--very-light-background-color);
    border: 1px solid var(--border-color-base);
    border-radius: 50% / 45%;
    position: relative;
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1), 0 0 5px rgba(160, 232, 160, 0.5);
    animation: wobble-spin 5.5s linear infinite;
}
.paramecium-nucleus {
    position: absolute;
    width: 3px;
    height: 3px;
    background-color: #407040;
    border-radius: 50%;
    top: 20%;
    left: 40%;
    transform: translate(-75%, -75%);
    box-shadow: inset 0 0 1px var(--primary-border-color-dark);
}
@keyframes wobble-spin {
    0% { transform: rotate(0deg) translateX(0px) scale(1); }
    25% { transform: rotate(90deg) translateX(1px) scale(1.25) skewX(-5deg); }
    50% { transform: rotate(180deg) translateX(0px) scale(1); }
    75% { transform: rotate(270deg) translateX(-1px) scale(0.75) skewX(5deg); }
    100% { transform: rotate(360deg) translateX(0px) scale(1); }
}

.hidden {
    display: none !important;
}
.collapsed {
    display: none !important;
}
