/**
 * 100x Roadmap Module - Specific Styles
 * Chat interface, statement editors, guided questions, synthesis
 */

/* ===== CHAT INTERFACE ===== */
.chat-container {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.chat-messages {
  height: 400px;
  overflow-y: auto;
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-secondary);
}

.message {
  max-width: 85%;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  line-height: 1.5;
}

.message.ai {
  background: var(--bg-primary);
  color: var(--text-dark);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-light);
}

.message.user {
  background: var(--navy-primary);
  color: var(--text-light);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.message.loading {
  color: var(--text-muted);
}

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

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-4px);
  }
}

/* Chat Input */
.chat-input-container {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 0.75rem;
  background: var(--bg-primary);
}

.chat-input {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: none;
}

.chat-input:focus {
  outline: none;
  border-color: var(--teal-accent);
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.send-btn {
  background: var(--teal-accent);
  border: none;
  border-radius: var(--radius-md);
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.send-btn:hover {
  background: var(--navy-primary);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.send-btn svg,
.send-btn i {
  width: 20px;
  height: 20px;
  color: var(--text-light);
}

/* ===== STATEMENT EDITOR ===== */
.statement-editor {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}

.statement-editor.has-content {
  border-color: var(--teal-accent);
  border-left: 4px solid var(--teal-accent);
}

.statement-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.statement-editor-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--navy-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.statement-editor-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.statement-editor textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1rem;
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  min-height: 100px;
  resize: vertical;
}

.statement-editor textarea:focus {
  outline: none;
  border-color: var(--teal-accent);
}

.statement-editor textarea::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.statement-editor-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  justify-content: flex-end;
}

.statement-editor-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* ===== ACTION STATEMENT EDITOR ===== */
.action-statement-editor {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: var(--spacing-lg);
}

.action-statement-editor.has-content {
  border-color: var(--teal-accent);
}

.action-statement-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.action-statement-editor-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--navy-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.action-statement-editor-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.action-statement-editor textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  min-height: 80px;
  resize: vertical;
}

.action-statement-editor textarea:focus {
  outline: none;
  border-color: var(--teal-accent);
}

.action-statement-editor textarea::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.action-statement-editor-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  justify-content: space-between;
  align-items: center;
}

.action-statement-editor-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.action-statement-editor-buttons {
  display: flex;
  gap: 0.75rem;
}

/* ===== GUIDED QUESTIONS ===== */
.guided-questions-container {
  display: none;
}

.guided-questions-container.active {
  display: block;
}

.guided-question {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.guided-question.completed {
  border-color: var(--teal-accent);
  border-left: 4px solid var(--teal-accent);
}

.guided-question-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.guided-question-number {
  font-size: 0.75rem;
  color: var(--navy-primary);
  font-weight: 600;
}

.guided-question-status {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.guided-question-status.answered {
  color: var(--teal-accent);
}

.guided-question-text {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.guided-question textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.5;
  min-height: 80px;
  resize: vertical;
}

.guided-question textarea:focus {
  outline: none;
  border-color: var(--teal-accent);
}

.guided-question textarea::placeholder {
  color: var(--text-muted);
}

.guided-progress-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.guided-progress {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.guided-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.guided-nav-buttons {
  display: flex;
  gap: 0.5rem;
}

/* ===== SYNTHESIS PREVIEW ===== */
.synthesis-preview {
  display: none;
  background: var(--bg-primary);
  border: 1px solid var(--teal-accent);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.synthesis-preview.active {
  display: block;
}

.synthesis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.synthesis-header h3 {
  color: var(--teal-accent);
}

.synthesis-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
  white-space: pre-wrap;
  line-height: 1.6;
}

.synthesis-content textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 150px;
}

.synthesis-content textarea:focus {
  outline: none;
}

.synthesis-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* ===== PRINT PREVIEW STYLES ===== */
.export-content.print-preview h1 {
  font-family: var(--font-heading);
  color: var(--navy-primary);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid var(--teal-accent);
  padding-bottom: 0.5rem;
}

.export-content.print-preview h2 {
  font-family: var(--font-heading);
  color: #0a1628;
  font-size: 1.1rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.export-content.print-preview h3 {
  font-family: var(--font-heading);
  color: #152238;
  font-size: 0.95rem;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

.export-content.print-preview p {
  margin: 0.25rem 0;
  line-height: 1.5;
}

.export-content.print-preview .section {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e5e5;
}

.export-content.print-preview .empty {
  color: #999;
  font-style: italic;
}

/* ===== CLOUD SIGN IN ===== */
.cloud-signin-section {
  margin-top: 1rem;
  text-align: center;
}

.google-signin-btn {
  width: 100%;
  justify-content: center;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

.cloud-signin-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Signed In State */
.cloud-signedin-section {
  margin-top: 1rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.user-details {
  flex: 1;
}

.user-name {
  font-weight: 600;
  color: var(--navy-primary);
}

.user-email {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--teal-accent);
}

/* ===== RESPONSIVE - MOBILE ===== */
@media (max-width: 768px) {
  /* Statement editor */
  .statement-editor {
    padding: 1rem;
  }

  .statement-editor textarea {
    min-height: 80px;
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .statement-editor-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .statement-editor-actions .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  /* Action statement editor */
  .action-statement-editor {
    padding: 1rem;
  }

  .action-statement-editor textarea {
    min-height: 80px;
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .action-statement-editor-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .action-statement-editor-hint {
    font-size: 0.75rem;
  }

  .action-statement-editor-buttons {
    width: 100%;
    gap: 0.5rem;
  }

  .action-statement-editor-buttons .btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    justify-content: center;
  }
}
