/* ============================================================
   REHYRD Phase 2 — Feature 7: AI Coach + Simulator styles.
   References the app :root vars (--paper, --card, --ink, --accent,
   --accent-soft, --teal, --radius); no new theme values here.
   ============================================================ */

/* ---------- chat ---------- */
.p2-chat h3, .p2-sim h3 { margin: 0 0 6px; }

.p2-msgs {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 340px; overflow-y: auto;
  padding: 12px; margin: 12px 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.p2-msgs-tall { max-height: 420px; }

.p2-bub { max-width: 88%; }
.p2-bub-user { align-self: flex-end; }
.p2-bub-coach { align-self: flex-start; }

.p2-bub-text {
  padding: 10px 14px;
  border-radius: var(--radius);
  line-height: 1.5;
  font-size: 0.95rem;
  overflow-wrap: break-word;
}
.p2-bub-text p { margin: 0 0 8px; }
.p2-bub-text p:last-child { margin-bottom: 0; }

.p2-bub-user .p2-bub-text {
  background: var(--accent-soft);
  border: 1px solid #fed7aa;
  color: var(--ink);
  border-bottom-right-radius: 4px;
}
.p2-bub-coach .p2-bub-text {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.p2-thinking .p2-bub-text { font-style: italic; color: var(--muted); }

.p2-input-row { display: flex; gap: 8px; margin: 10px 0; }
.p2-input-row input {
  flex: 1; min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font: inherit;
}
.p2-input-row input:disabled { opacity: 0.6; }

.p2-status .p2-err, .p2-err { color: var(--ink-soft); font-size: 0.9rem; margin: 8px 0; }

/* ---------- not-configured panel ---------- */
.p2-soon { text-align: center; padding: 28px 20px; }
.p2-soon h3 { margin-top: 0; }
.p2-soon p { color: var(--ink-soft); max-width: 34rem; margin: 8px auto 0; }

/* ---------- simulator ---------- */
.p2-mode-cards {
  display: grid; gap: 14px; margin: 14px 0;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.p2-mode-card { display: flex; flex-direction: column; gap: 8px; }
.p2-mode-card h4 { margin: 0; }
.p2-mode-card p { margin: 0 0 6px; color: var(--ink-soft); font-size: 0.93rem; flex: 1; }
.p2-mode-card .btn { align-self: flex-start; }

.p2-details { margin: 10px 0 14px; }
.p2-details summary { cursor: pointer; font-weight: 600; color: var(--accent-deep); }
.p2-details ol { margin: 8px 0 0; padding-left: 22px; color: var(--ink-soft); }
.p2-details li { margin-bottom: 6px; }

.p2-label {
  display: block; font-weight: 600; font-size: 0.9rem;
  margin: 12px 0 6px; color: var(--ink);
}
.p2-input, .p2-textarea, select.p2-input {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font: inherit;
}
.p2-textarea { resize: vertical; min-height: 110px; }
.p2-form { max-width: 36rem; }

/* ---------- rubric checklist ---------- */
.p2-rubric {
  margin: 16px 0; padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
}
.p2-rubric h4 { margin: 0 0 8px; font-size: 0.95rem; }
.p2-rubric ul { margin: 0; padding-left: 20px; }
.p2-rubric li { margin-bottom: 4px; font-size: 0.92rem; color: var(--ink-soft); }
