.typing-indicator { display: flex; gap: 6px; padding: 0.5rem; align-items: center; } .typing-indicator .dot { width: 8px; height: 8px; background-color: #ccc; border-radius: 50%; animation: blink 1.4s infinite both; } .typing-indicator .dot:nth-child(2) { animation-delay: 0.2s; } .typing-indicator .dot:nth-child(3) { animation-delay: 0.4s; } @keyframes blink { 0%, 80%, 100% { opacity: 0; } 40% { opacity: 1; } } .message { display: block; /* ensures full-width layout */ width: fit-content; max-width: 85%; margin-bottom: 12px; padding: 10px 14px; border-radius: 16px; line-height: 1.5; word-wrap: break-word; } .message.user { align-self: flex-end; margin-left: auto; background: #333c4d; color: #e3f2fd; border-bottom-right-radius: 0; } .message.assistant { align-self: flex-start; margin-right: auto; background: #383838; border-bottom-left-radius: 0; } .chat-box { flex-grow: 1; overflow-y: auto; padding: 12px; border: 1px solid #2d2d2d; border-radius: 8px; background: #2a2a2a; margin-bottom: 16px; display: flex; flex-direction: column; } .chat-box p { margin: 0.5em 0; line-height: 1.6; } .chat-box li { margin: 0.3em 0; } .chat-box ul, .chat-box ol { margin: 0.5em 0 0.5em 1.2em; padding: 0; } .code-block-wrapper pre { background: #2d2d2d; /* override if needed */ padding: 1em; font-size: 0.9em; line-height: 1.5; } .code-block-wrapper { margin: 12px 0; background-color: #2d2d2d; border-radius: 8px; overflow: auto; }