/* Interactive elements: always show pointer cursor */
button,
[role="button"],
summary {
  cursor: pointer;
}

/* Status badge */
.status-badge { font-size: 0.75rem; font-weight: 500; }
.status-badge.running { color: #15803d; }
.status-badge.stopped { color: #6b7280; }
.status-badge.building { color: #b45309; }
.status-badge.error { color: #b91c1c; }
.status-badge.unknown { color: #9ca3af; }

/* Prose styling for markdown in chat */
.prose-content { line-height: 1.7; }
.prose-content h1, .prose-content h2, .prose-content h3, .prose-content h4 {
  font-weight: 600;
  margin-top: 1em;
  margin-bottom: 0.5em;
  color: #1a1a1a;
}
.prose-content h1 { font-size: 1.25em; }
.prose-content h2 { font-size: 1.125em; }
.prose-content h3 { font-size: 1em; }
.prose-content p { margin-bottom: 0.75em; }
.prose-content p:last-child { margin-bottom: 0; }
.prose-content ul, .prose-content ol { padding-left: 1.5em; margin-bottom: 0.75em; }
.prose-content li { margin-bottom: 0.25em; }
.prose-content ul > li { list-style-type: disc; }
.prose-content ol > li { list-style-type: decimal; }
.prose-content blockquote {
  border-left: 3px solid #94070A;
  padding-left: 1em;
  color: #6b6b6b;
  margin: 0.75em 0;
}
.prose-content code {
  background: rgba(0,0,0,0.06);
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 0.875em;
  font-family: 'Menlo', 'Consolas', monospace;
}
.prose-content pre {
  background: #1a1a1a;
  color: #e5e5e5;
  padding: 12px 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0.75em 0;
  font-size: 0.8125em;
  line-height: 1.6;
}
.prose-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}
.prose-content a { color: #94070A; text-decoration: underline; }
.prose-content table { border-collapse: collapse; width: 100%; margin: 0.75em 0; }
.prose-content th, .prose-content td { border: 1px solid #e5e7eb; padding: 6px 10px; text-align: left; font-size: 0.875em; }
.prose-content th { background: #f9fafb; font-weight: 600; }
.prose-content hr { border-color: #e5e7eb; margin: 1em 0; }

/* Streaming cursor animation */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.streaming-cursor {
  display: inline-block;
  width: 6px;
  height: 14px;
  background: #94070A;
  border-radius: 1px;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s ease-in-out infinite;
}

/* Copy button in assistant bubble */
.chat-bubble-assistant { position: relative; }
.chat-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  opacity: 0;
  transition: opacity 0.15s ease;
  background: rgba(255,255,255,0.85);
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 4px;
  cursor: pointer;
  line-height: 0;
}
.chat-copy-btn:hover { background: #fff; }
.chat-bubble-assistant:hover .chat-copy-btn { opacity: 1; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Tooltip */
.aihistory-tooltip {
  position: fixed;
  z-index: 9999;
  padding: 4px 10px;
  background: #1f2937;
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  border-radius: 4px;
  pointer-events: none;
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Transitions */
.sidebar-link {
  transition: background-color 0.15s ease, color 0.15s ease;
}

/* Mobile chat view toggle */
@media (max-width: 767px) {
  .mobile-chat-active #conv-panel { display: none; }
  .mobile-chat-active #chat-panel { display: flex !important; }
}
