/**
 * PREXFORGE — G9: Journey Execution CSS
 * Styles for journey view, step classroom, and AI instructor panel.
 *
 * PREX Color Law: Black=Authority, Gold=Excellence, Green=PRESENCE health.
 */

/* Journey Resume Banner */
.journey-resume-banner {
  background: linear-gradient(135deg, #1a332b 0%, #0f1f1a 100%);
  border-radius: 16px;
  padding: 32px;
  margin: 24px 0;
  color: #f7f5f0;
}

.resume-badge {
  display: inline-block;
  background: rgba(255, 215, 0, 0.15);
  color: #d4a843;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(212, 168, 67, 0.3);
  margin-bottom: 16px;
}

.resume-title {
  font-family: 'Georgia', serif;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 20px 0;
  line-height: 1.2;
}

.resume-progress {
  margin-bottom: 20px;
}

.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4a9b6e, #5cb88a);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.progress-bar-large {
  height: 12px;
  background: #e8e6e0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.resume-next {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 15px;
}

.resume-next-label {
  color: rgba(255, 255, 255, 0.6);
}

.resume-next-title {
  color: #5cb88a;
  font-weight: 600;
}

.resume-actions {
  display: flex;
  gap: 12px;
}

.journey-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.resume-btn {
  background: #5cb88a;
  color: #1a332b;
}

.resume-btn:hover {
  background: #4a9b6e;
  transform: translateY(-1px);
}

.restart-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.restart-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Journey Steps */
.journey-progress-section {
  margin: 24px 0;
}

.journey-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.journey-step {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s;
}

.journey-step-completed {
  border-color: #c6e8d5;
  background: #f0faf4;
}

.journey-step-current {
  border-color: #5cb88a;
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(92, 184, 138, 0.1);
}

.journey-step-locked {
  opacity: 0.55;
}

.journey-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.journey-step-num {
  font-size: 12px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.step-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.step-status.completed {
  background: #d4edda;
  color: #155724;
}

.step-status.current {
  background: #cce8d8;
  color: #1a6b3f;
}

.step-status.locked {
  background: #f0f0f0;
  color: #999;
}

.journey-step-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #1a332b;
  margin-bottom: 6px;
}

.journey-step-desc {
  display: block;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 12px;
}

.step-begin-btn {
  background: #1a332b;
  color: #f7f5f0;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s;
}

.step-begin-btn:hover {
  background: #2a4d3f;
  transform: translateY(-1px);
}

.step-external-note {
  display: block;
  font-size: 13px;
  color: #a05c3c;
  padding: 8px 12px;
  background: #fef5f0;
  border-radius: 8px;
  margin-top: 8px;
}

/* Classroom */
.classroom-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.classroom-context {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.classroom-pathway {
  font-size: 13px;
  color: #999;
  font-weight: 500;
}

.classroom-step {
  font-size: 18px;
  font-weight: 600;
  color: #1a332b;
}

.classroom-back-btn {
  background: transparent;
  border: 1px solid #ddd;
  color: #666;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.classroom-back-btn:hover {
  background: #f5f5f0;
}

.classroom-step-info {
  margin-bottom: 24px;
}

.classroom-step-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

/* AI Instructor Panel */
.ai-instructor-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.ai-chat-messages {
  max-height: 400px;
  overflow-y: auto;
  padding: 20px;
  background: #fafaf8;
}

.ai-message {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  max-width: 85%;
}

.ai-message.welcome,
.ai-message.response,
.ai-message.practice {
  background: #fff;
  border: 1px solid #e0e0d8;
}

.ai-message.learner {
  background: #1a332b;
  color: #f7f5f0;
  margin-left: auto;
}

.ai-message.escalation {
  background: #fff5f0;
  border: 1px solid #e8c5c0;
}

.ai-message.error {
  background: #fff0f0;
  border: 1px solid #ffc0c0;
}

.ai-message-role {
  font-size: 11px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.ai-message.learner .ai-message-role {
  color: rgba(255, 255, 255, 0.6);
}

.ai-message-content {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  white-space: pre-wrap;
}

.ai-message.learner .ai-message-content {
  color: #f7f5f0;
}

.ai-provenance {
  font-size: 11px;
  color: #aaa;
  margin-top: 8px;
  font-style: italic;
}

.typing-dots {
  color: #999;
  font-size: 20px;
  letter-spacing: 4px;
}

.ai-chat-input {
  border-top: 1px solid #e5e7eb;
  padding: 16px;
  background: #fff;
}

.ai-chat-input textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}

.ai-chat-input textarea:focus {
  border-color: #5cb88a;
}

.ai-chat-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.ai-chat-send,
.ai-chat-practice {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.ai-chat-send {
  background: #1a332b;
  color: #f7f5f0;
}

.ai-chat-send:hover {
  background: #2a4d3f;
}

.ai-chat-practice {
  background: #f0f0e8;
  color: #666;
  border: 1px solid #ddd;
}

.ai-chat-practice:hover {
  background: #e8e8e0;
}

/* Step Completion */
.step-complete-section {
  background: #f9f9f5;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
}

.step-complete-note {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.5;
}

.step-complete-section textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 12px;
  outline: none;
}

.step-complete-section textarea:focus {
  border-color: #5cb88a;
}

.step-complete-btn {
  background: #5cb88a;
  color: #1a332b;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.step-complete-btn:hover {
  background: #4a9b6e;
  transform: translateY(-1px);
}

/* Journey Complete */
.journey-complete {
  text-align: center;
  padding: 48px 24px;
}

.complete-title {
  font-family: 'Georgia', serif;
  font-size: 32px;
  color: #1a332b;
  margin-bottom: 16px;
}

.complete-message {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 12px;
}

.complete-note {
  font-size: 13px;
  color: #999;
  margin-bottom: 24px;
}

/* Evidence Summary */
.evidence-summary {
  background: #f9f9f5;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
}

.evidence-count {
  font-size: 13px;
  color: #666;
}

/* Interactive Starting Position */
.starting-point-interactive {
  position: relative;
}

.starting-point-input {
  width: 100%;
  border: 1px solid #ddd;
  border-left: 3px solid #1a332b;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  min-height: 60px;
  transition: border-color 0.2s;
}

.starting-point-input:focus {
  border-color: #5cb88a;
}

.starting-point-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.starting-point-update-btn {
  background: #1a332b;
  color: #f7f5f0;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.starting-point-update-btn:hover {
  background: #2a4d3f;
}

.starting-point-hint {
  font-size: 12px;
  color: #999;
  align-self: center;
}

/* Error state */
.error-state {
  text-align: center;
  padding: 48px 24px;
}

.error-state p {
  font-size: 15px;
  color: #c0392b;
  margin-bottom: 16px;
}


/* ═════ G9: Starting Position Input ═════ */
.starting-position-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  margin-top: 12px;
  resize: vertical;
  min-height: 60px;
  background: #fafafa;
  transition: border-color 0.2s;
}
.starting-position-input:focus {
  outline: none;
  border-color: #0a3d36;
  background: #fff;
}
.adjust-pathway-btn {
  margin-top: 10px;
  padding: 8px 20px;
  background: transparent;
  border: 1px solid #0a3d36;
  color: #0a3d36;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.adjust-pathway-btn:hover {
  background: #0a3d36;
  color: #fff;
}
