/* プロジェクト内チャットの描画スタイル（通常チャット同等） */

.cv-message { width: 100%; margin: 0 0 14px; display: flex; gap: 10px; }
.cv-message.user { flex-direction: row-reverse; }
.cv-bubble { line-height: 1.6; font-size: 14px; word-break: break-word; max-width: 100%; }
.cv-message.user .cv-bubble {
  background: #e8e8e8; color: #1a1a1a; border-radius: 16px; padding: 10px 14px; white-space: pre-wrap;
}
.cv-message.assistant .cv-bubble { flex: 1; min-width: 0; }

.cv-bubble h1, .cv-bubble h2, .cv-bubble h3 { margin: 12px 0 6px; }
.cv-bubble h1 { font-size: 1.25em; }
.cv-bubble h2 { font-size: 1.12em; }
.cv-bubble h3 { font-size: 1.04em; }
.cv-bubble p { margin: 6px 0; }
.cv-bubble ul, .cv-bubble ol { margin: 6px 0; padding-left: 20px; }
.cv-bubble hr { border: none; border-top: 1px solid #e0e0e0; margin: 12px 0; }
.cv-bubble a { color: var(--color-primary); text-decoration: none; }
.cv-bubble a:hover { text-decoration: underline; }
.cv-bubble table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: 13px; }
.cv-bubble th, .cv-bubble td { border: 1px solid #ddd; padding: 6px 10px; text-align: left; }
.cv-bubble th { background: #f5f5f5; font-weight: 600; white-space: nowrap; }
.cv-bubble tr:nth-child(even) { background: #fafafa; }

.cv-bubble .sources { margin-top: 12px; border-top: 1px solid #eee; padding-top: 8px; }
.cv-bubble .sources details summary { font-size: 12px; color: #888; font-weight: 600; cursor: pointer; margin-bottom: 6px; user-select: none; }
.cv-bubble .sources details summary:hover { color: #555; }
.cv-bubble .source-item { font-size: 12px; color: #555; padding: 4px 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.cv-bubble .source-item a { color: var(--color-primary); text-decoration: none; font-size: 11px; }
.cv-bubble .usage-info { margin-top: 8px; font-size: 11px; color: #aaa; }

.cv-bubble .property-groups { margin-top: 16px; border-top: 2px solid #e0e0e0; padding-top: 12px; }
.cv-bubble .property-groups > details > summary { font-size: 13px; font-weight: 700; color: #333; margin-bottom: 10px; cursor: pointer; user-select: none; }
.cv-bubble .building-group { margin-bottom: 10px; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; }
.cv-bubble .building-group-header { background: #f5f5f5; padding: 8px 14px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; }
.cv-bubble .building-group-header:hover { background: #ebebeb; }
.cv-bubble .building-group-header h4 { font-size: 13px; margin: 0; color: #333; }
.cv-bubble .building-group-header .group-info { display: flex; align-items: center; gap: 8px; }
.cv-bubble .building-group-header .count { font-size: 12px; color: #888; }
.cv-bubble .building-group-header .toggle { font-size: 11px; color: #aaa; }
.cv-bubble .excel-btn { background: var(--color-primary); color: #fff; border: none; border-radius: 4px; padding: 4px 10px; font-size: 11px; cursor: pointer; white-space: nowrap; }
.cv-bubble .excel-btn:hover { background: var(--color-primary-dark); }
.cv-bubble .excel-btn:disabled { background: #999; cursor: not-allowed; }
.cv-bubble .building-group-body { overflow-x: auto; }
.cv-bubble .building-group-body.collapsed { display: none; }

.cv-bubble .file-view-btn, .cv-bubble .ft-file-btn {
  display: inline-flex; align-items: center; gap: 4px; background: var(--color-primary-light); color: var(--color-primary);
  border: 1px solid #c3e0c3; border-radius: 4px; padding: 2px 8px; font-size: 12px; cursor: pointer; margin-left: 6px;
}
.cv-bubble .file-view-btn:hover, .cv-bubble .ft-file-btn:hover { background: #d8eed8; }

.cv-typing { display: flex; align-items: center; gap: 8px; color: #888; font-size: 13px; padding: 4px 0 12px; }
.cv-typing-dots span { display: inline-block; width: 7px; height: 7px; background: #ccc; border-radius: 50%; margin: 0 2px; animation: cvbounce 1.4s ease-in-out infinite; }
.cv-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.cv-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes cvbounce { 0%, 80%, 100% { transform: scale(0.6); } 40% { transform: scale(1); } }
