/* Styling for the new redesigned UI panels (Phase 4-6 merged slice). Reuses shared.css/sim.css
   tokens and the existing .msim-num-box monitor-tile look so this reads as a clinical
   simulator, not a form. */

.psp-header { margin-bottom: 14px; }
.psp-title { font-family: 'Fraunces', serif; font-size: 19px; color: var(--navy); }
.psp-complaint { font-size: 13px; color: var(--text-mid); margin-top: 2px; }

.psp-narrative {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-mid);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0;
}
.psp-narrative .psp-hl { font-weight: 700; }
.psp-narrative .psp-hl-critical { color: var(--red); }
.psp-narrative .psp-hl-warn { color: var(--amber); }

/* Action sections accordion */
.asp-section { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.asp-section-header {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer;
  background: var(--white); font-weight: 600; font-size: 13.5px; color: var(--text);
  transition: background 0.15s;
}
.asp-section-header:hover { background: var(--teal-pale); }
.asp-section.open .asp-section-header { background: var(--navy); color: #fff; }
.asp-section-chevron { margin-left: auto; transition: transform 0.15s; font-size: 11px; opacity: 0.6; }
.asp-section.open .asp-section-chevron { transform: rotate(90deg); }
.asp-section-body { display: none; padding: 12px 14px; background: var(--surface); }
.asp-section.open .asp-section-body { display: block; }
.asp-section-note { font-size: 11.5px; color: var(--text-muted); margin-bottom: 8px; }

.asp-option { margin-bottom: 8px; }
.asp-option-btn {
  width: 100%; text-align: left; background: var(--white); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 12px; font-size: 13px; font-weight: 600; color: var(--text);
  cursor: pointer; transition: all 0.15s;
}
.asp-option-btn:hover:not(:disabled) { border-color: var(--teal); background: var(--teal-pale); }
.asp-option-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.asp-option-btn .asp-coming-soon { font-size: 10px; color: var(--text-muted); font-weight: 500; margin-left: 6px; }

.asp-option-inputs { margin-top: 8px; padding: 10px; background: var(--white); border-radius: 8px; border: 1px solid var(--border); display: none; }
.asp-option.expanded .asp-option-inputs { display: block; }
.asp-input-row { margin-bottom: 8px; }
.asp-input-row label { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-mid); margin-bottom: 3px; }
.asp-input-row select, .asp-input-row input { width: 100%; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.asp-submit-btn { background: var(--navy); color: #fff; border: none; padding: 8px 16px; border-radius: 7px; font-weight: 600; font-size: 12.5px; cursor: pointer; margin-top: 4px; }
.asp-submit-btn:hover { background: var(--teal-dim); }

/* History panel's note-log scroll region (the History card otherwise grows naturally) */
.hp-history-scroll { max-height: 280px; overflow-y: auto; margin-top: 8px; }

/* Clinical note history */
.cnh-entry { border-radius: 8px; padding: 10px 12px; font-size: 13px; border-left: 4px solid var(--border); margin-bottom: 8px; }
.cnh-entry.good { border-left-color: var(--teal); background: var(--teal-pale); }
.cnh-entry.neutral { border-left-color: var(--text-muted); background: var(--surface); }
.cnh-entry.bad { border-left-color: var(--red); background: var(--red-pale); }
.cnh-meta { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 3px; }

/* ABG panel (extracted, same look as before) */
.abgp-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* End-of-case debrief (formative, non-punitive -- no grade/score number, see scoring.js) */
.dbp-counts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.dbp-count { font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 6px; background: var(--surface); color: var(--text-mid); border: 1px solid var(--border); }
.dbp-count.dbp-good { background: var(--teal-pale); color: var(--teal-dim); border-color: transparent; }
.dbp-count.dbp-neutral { color: var(--text-muted); }
.dbp-count.dbp-bad { background: var(--red-pale); color: var(--red); border-color: transparent; }
.dbp-section { margin-top: 12px; }
.dbp-section-title { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; font-weight: 600; }
.dbp-list { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text); display: flex; flex-direction: column; gap: 4px; }
.dbp-empty { font-size: 13px; color: var(--text-muted); margin: 0; }

/* AI settings panel */
.stp-warning { font-size: 12px; color: var(--text-muted); background: var(--amber-pale); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.stp-label { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-mid); margin-top: 10px; margin-bottom: 3px; }
.stp-input { width: 100%; padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.stp-toggle-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--text); cursor: pointer; }
.stp-actions { display: flex; gap: 8px; margin-top: 14px; }
.stp-actions .asp-submit-btn { margin-top: 0; }
.stp-status { margin-top: 8px; font-size: 12.5px; color: var(--text-muted); }
.stp-status.stp-ok { color: var(--teal-dim); }
.stp-status.stp-bad { color: var(--red); }

/* AI Consultant's Note */
.cns-text { font-size: 13.5px; color: var(--text); line-height: 1.5; }
.cns-muted { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.cns-error { font-size: 13px; color: var(--red); margin-bottom: 8px; }
.cns-disclaimer { font-size: 11px; color: var(--text-muted); margin-top: 8px; font-style: italic; }
