/* QueBot Thinking Stream v1.0 — TASK-48-FE */
/* Displays Claude's extended thinking as a collapsible, streaming panel */

.thinking-stream {
    background: var(--bg-secondary, #f5f5f5);
    border-left: 3px solid #6366f1;
    padding: 8px 12px;
    margin: 4px 16px 4px 52px;
    border-radius: 8px;
    font-size: 0.85em;
    color: var(--text-secondary, #666);
    max-height: 200px;
    overflow-y: auto;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.thinking-stream.collapsed {
    max-height: 32px;
    overflow: hidden;
    cursor: pointer;
    padding: 6px 12px;
}

.thinking-stream.collapsed .thinking-content {
    display: none;
}

.thinking-stream .thinking-header {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    font-size: 0.9em;
}

.thinking-stream .thinking-icon {
    animation: thinking-pulse 1.5s ease-in-out infinite;
}

.thinking-stream .thinking-icon.done {
    animation: none;
}

.thinking-stream .thinking-toggle {
    margin-left: auto;
    font-size: 0.7em;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.thinking-stream .thinking-title {
    flex: 1;
}

.thinking-stream .thinking-content {
    white-space: pre-wrap;
    line-height: 1.4;
    margin-top: 6px;
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.92em;
    opacity: 0.85;
    word-break: break-word;
}

@keyframes thinking-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Dark mode */
[data-theme="dark"] .thinking-stream {
    background: rgba(99, 102, 241, 0.08);
    border-left-color: #818cf8;
    color: rgba(255, 255, 255, 0.65);
}

[data-theme="dark"] .thinking-stream.collapsed {
    background: rgba(99, 102, 241, 0.05);
}

[data-theme="dark"] .thinking-stream .thinking-content {
    color: rgba(255, 255, 255, 0.55);
}

[data-theme="dark"] .thinking-stream .thinking-header {
    color: rgba(255, 255, 255, 0.75);
}

/* Scrollbar styling */
.thinking-stream::-webkit-scrollbar {
    width: 4px;
}

.thinking-stream::-webkit-scrollbar-track {
    background: transparent;
}

.thinking-stream::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 2px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .thinking-stream {
        max-height: 150px;
        font-size: 0.8em;
        margin-left: 40px;
        margin-right: 8px;
    }
}
