diff --git a/frontend/src/features/chat/components/ChatWindow.css b/frontend/src/features/chat/components/ChatWindow.css index fd514d6..d9d1154 100644 --- a/frontend/src/features/chat/components/ChatWindow.css +++ b/frontend/src/features/chat/components/ChatWindow.css @@ -73,6 +73,35 @@ color: #f3f4f6 !important; /* gray-100 */ } +.markdown-preview { + white-space: normal; /* Override pre-wrap to prevent ReactMarkdown's structural HTML newlines from stacking with CSS margins */ + line-height: 1.5; +} + +.markdown-preview > *:last-child { + margin-bottom: 0 !important; +} + +.markdown-preview p { + margin-bottom: 0.6em; +} + +.markdown-preview ul, .markdown-preview ol { + margin-bottom: 0.6em; + margin-top: 0.2em; + padding-left: 1.25em; +} + +.markdown-preview li { + margin-bottom: 0.2em; +} + +.markdown-preview h1, .markdown-preview h2, .markdown-preview h3, .markdown-preview h4 { + margin-top: 1em; + margin-bottom: 0.5em; + line-height: 1.25; +} + /* Force light text color on all nested elements in dark mode */ .dark .assistant-message *, .dark .assistant-message p, @@ -192,14 +221,18 @@ .thought-panel blockquote { border-left: 2px solid rgba(99, 102, 241, 0.4) !important; background: rgba(99, 102, 241, 0.05) !important; - margin: 0.75rem 0 0.75rem 1rem !important; - padding: 0.6rem 0.8rem !important; + margin: 0.5rem 0 0.5rem 0.5rem !important; + padding: 0.4rem 0.6rem !important; border-radius: 0.5rem !important; - font-size: 0.7rem !important; + font-size: 0.75rem !important; line-height: 1.4 !important; color: #4f46e5 !important; } +.thought-panel .markdown-preview p { + margin-bottom: 0.4em !important; +} + .dark .thought-panel blockquote { color: #818cf8 !important; background: rgba(129, 140, 248, 0.05) !important;