/* --- Thinking Bubble --- */
.thinking-bubble {
    max-width: 80%;
    align-self: flex-start;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: rgba(100, 100, 100, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.thinking-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.thinking-header:hover {
    background: rgba(255, 255, 255, 0.08);
}

.thinking-icon {
    font-size: 1.2em;
}

.thinking-label {
    flex: 1;
    color: #aaa;
    font-size: 0.9em;
    font-style: italic;
}

.thinking-toggle {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 0.9em;
    padding: 0;
    transition: color 0.2s;
}

.thinking-toggle:hover {
    color: #fff;
}

.thinking-body {
    padding: 15px;
    color: #aaa;
    font-size: 0.9em;
    font-style: italic;
    line-height: 1.8;
    max-height: 400px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

/* Collapsed State */
.thinking-bubble.collapsed .thinking-body {
    max-height: 0;
    padding: 0 15px;
    opacity: 0;
    overflow: hidden;
}

.thinking-bubble.collapsed {
    background: rgba(100, 100, 100, 0.05);
    margin-bottom: 0.5rem;
}

.thinking-bubble.collapsed .thinking-header {
    opacity: 0.7;
}

.thinking-bubble.collapsed:hover .thinking-header {
    opacity: 1;
}

/* Thinking Line Animation */
.thinking-line {
    margin-bottom: 6px;
    animation: fadeInThink 0.3s ease;
}

@keyframes fadeInThink {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar for thinking body */
.thinking-body::-webkit-scrollbar {
    width: 6px;
}

.thinking-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.thinking-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.thinking-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
