/* ═══ PREXFORGE CONVERSATIONAL UI (Package B) ═══ */

.conversation-container {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 70vh;
}

.conversation-thread {
  flex: 1;
  overflow-y: auto;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 65vh;
}

.conv-msg {
  display: flex;
  animation: convFadeIn 0.3s ease;
}

@keyframes convFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.conv-msg-user {
  justify-content: flex-end;
}

.conv-msg-assistant {
  justify-content: flex-start;
}

.conv-bubble {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.6;
}

.conv-bubble-user {
  background: #0B3629;
  color: white;
  border-bottom-right-radius: 4px;
}

.conv-bubble-assistant {
  background: #f0ede8;
  color: #1a1a1a;
  border-bottom-left-radius: 4px;
}

.conv-bubble-pathway {
  background: transparent;
  padding: 0;
  max-width: 100%;
}

/* Pathway inside conversation */
.conv-pathway {
  background: #fefdfb;
  border: 1px solid #e5e2de;
  border-radius: 16px;
  padding: 24px;
}

.conv-pathway-header {
  margin-bottom: 20px;
}

.conv-verified-badge {
  display: inline-block;
  background: #1a1a1a;
  color: #d4a843;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.conv-pathway-title {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  margin: 8px 0 4px;
  font-family: 'Source Serif 4', Georgia, serif;
}

.conv-pathway-domain {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.conv-section {
  margin-bottom: 20px;
}

.conv-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #9ca3af;
  margin-bottom: 8px;
}

.conv-position-text {
  font-size: 14px;
  color: #4b5563;
  margin-bottom: 10px;
}

.conv-position-adjust {
  display: flex;
  gap: 8px;
}

.conv-position-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}

.conv-adjust-btn {
  padding: 10px 16px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  color: #374151;
}

.conv-adjust-btn:hover {
  background: #e5e7eb;
}

.conv-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.conv-step {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: #f9f8f6;
  border: 1px solid #e5e2de;
  border-radius: 12px;
}

.conv-step-num {
  font-size: 12px;
  font-weight: 700;
  color: #0B3629;
  min-width: 50px;
  padding-top: 2px;
}

.conv-step-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.conv-step-desc {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

.conv-step-tags {
  display: flex;
  gap: 6px;
}

.conv-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.conv-tag-ai { background: #eff6ff; color: #2563eb; }
.conv-tag-self { background: #f0fdf4; color: #16a34a; }
.conv-tag-ext { background: #fff7ed; color: #ea580c; }

.conv-resource {
  padding: 10px 14px;
  background: #f9f8f6;
  border: 1px solid #e5e2de;
  border-radius: 10px;
  margin-bottom: 6px;
  cursor: pointer;
}

.conv-resource:hover { border-color: #0B3629; }

.conv-resource-ai { border-left: 3px solid #2563eb; }

.conv-resource-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.conv-resource-type {
  font-size: 12px;
  color: #6b7280;
}

.conv-boundary {
  font-size: 12px;
  color: #6b7280;
  padding: 12px;
  background: #f9f8f6;
  border-left: 3px solid #d4a843;
  border-radius: 6px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.conv-cta-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.conv-cta {
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.conv-cta-primary {
  background: #0B3629;
  color: white;
}

.conv-cta-primary:hover { background: #0a2b22; }

.conv-cta-save {
  background: transparent;
  color: #0B3629;
  border: 1px solid #0B3629;
}

.conv-cta-save:hover { background: #f0ede8; }

.conv-laws {
  border-top: 1px solid #e5e2de;
  padding-top: 12px;
}

.conv-law {
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 4px;
}

/* Typing indicator */
.typing-dots {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca3af;
  animation: typingBounce 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Conversation input bar */
.conversation-input-bar {
  display: flex;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid #e5e2de;
  position: sticky;
  bottom: 0;
  background: #fafaf8;
}

.conversation-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 24px;
  font-size: 15px;
  outline: none;
}

.conversation-input:focus {
  border-color: #0B3629;
}

.conversation-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0B3629;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.conversation-send:hover { background: #0a2b22; }
