/* v0.35.0 (owner 2026-10-12 22:30): the conversation as one readable column and the history as a compact list —
   a bold one-line question, a muted one/two-line preview, the short time and a small recipient badge on the right,
   thin dividers between rows. A row opens in place (conversation-compact-v0350.js). Colours come from the shared
   tokens (styles.css) and the role colours of conversation-v014.css, so the dark theme follows. No inline styles. */

/* ---------------------------------------------------------------- the row (personal, pregnancy and child lists) */
.cc-row { position: relative; min-width: 0; }
.cc-row > .cc-h { margin: 0; padding: 0; font: inherit; letter-spacing: normal; }
.cc-row > .cc-h > .cc-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title when" "preview to";
  column-gap: 16px; row-gap: 3px; align-items: baseline;
  width: 100%; height: auto; min-height: 48px; margin: 0; padding: 13px 18px 13px;
  border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--ink);
  font: inherit; font-weight: 400; text-align: left; white-space: normal; cursor: pointer; letter-spacing: normal;
}
.cc-row > .cc-h > .cc-head:hover { background: color-mix(in srgb, var(--canvas-alt) 85%, var(--line)); }
.cc-row > .cc-h > .cc-head:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; }
.cc-title {
  grid-area: title; min-width: 0; font-size: 15px; line-height: 1.45; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cc-followup { font-weight: 500; color: var(--ink-2); }
.cc-when {
  grid-area: when; justify-self: end; display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; line-height: 1.45; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums;
}
/* the disclosure chevron (points down when closed, up when open) */
.cc-when::after {
  content: ""; width: 6px; height: 6px; margin: -3px 1px 0 0; border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor; transform: rotate(45deg); transition: transform .15s ease;
}
.cc-open > .cc-h .cc-when::after { transform: rotate(-135deg); margin-top: 3px; }
.cc-preview {
  grid-area: preview; min-width: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  overflow-wrap: anywhere;
}
.cc-preview[data-state="writing"], .cc-preview[data-state="waiting"] { font-style: italic; }
.cc-preview[data-state="limit"], .cc-preview[data-state="failed"] { color: color-mix(in srgb, var(--suspected) 55%, var(--ink)); }
.cc-alert { font-style: normal; font-weight: 650; color: var(--safety-ink, #8c1425); }
.cc-to {
  grid-area: to; justify-self: end; align-self: start; margin-top: 2px; padding: 1px 8px; border-radius: 999px;
  font-size: 11.5px; line-height: 1.5; font-weight: 600; white-space: nowrap;
  color: var(--chat-ai, #59356e); background: var(--chat-ai-bg, #eee8f4);
}
.cc-to[data-to="doctor"] { color: var(--chat-doctor, #315744); background: var(--chat-doctor-bg, #e7eee8); }
.cc-to[data-to="consultant"] { color: var(--chat-consultant, #755020); background: var(--chat-consultant-bg, #faeddc); }
/* open: the whole question, no preview (the answer is right below) */
.cc-open > .cc-h .cc-title { white-space: pre-line; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.cc-open > .cc-h .cc-preview { display: none; }
.cc-open > .cc-h > .cc-head { padding-bottom: 8px; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "title to when"; column-gap: 10px; }
.cc-open > .cc-h .cc-to { margin-top: 0; align-self: baseline; }
.cc-open { background: color-mix(in srgb, var(--canvas-alt) 55%, var(--surface)); }
.cc-body { padding: 0 18px 16px; min-width: 0; overflow-wrap: anywhere; }
.cc-body[hidden] { display: none !important; }

/* ---------------------------------------------------------------- personal conversation (#/mana-saruna) */
.personal-chat-v022 { max-width: 780px; margin-inline: auto; }
.personal-chat-v022 > header { margin: 0 0 14px; }
.personal-chat-v022 > header h1 { font-size: clamp(1.4rem, 3vw, 1.75rem); margin: 2px 0 4px; }
.personal-chat-v022 > header p { margin: 0; }
.personal-chat-v022 .pc-v022-eyebrow { margin: 0; }
.pc-v022-compose, .pc-v022-history { border-radius: 12px; margin-bottom: 14px; }
.pc-v022-compose { padding: 14px 18px 16px; }
.pc-v022-compose > h2 { font-size: 14px; margin: 0; }
.pc-v022-compose .pc-v022-choices { margin: 10px 0 4px; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.pc-v022-compose .pc-v022-choices button { min-height: 48px; padding: 6px 12px; height: auto; font-size: 14px; }
.pc-v022-compose .pc-v022-choices small { margin-top: 2px; font-size: 12px; color: var(--ink-2); }
.pc-v022-compose .pc-v022-choices small:empty { display: none; }
.personal-chat-v022 .pc-v022-compose label { margin: 10px 0 8px; font-size: 13.5px; }
.personal-chat-v022 .pc-v022-compose textarea { min-height: 96px; font-size: 15px; font-weight: 400; line-height: 1.5; padding: 9px 11px; margin-top: 6px; }
.pc-v022-compose .pc-v022-note { margin: 0 0 8px; font-size: 12.5px; line-height: 1.45; }
.pc-v022-compose [data-pc-error]:empty, .pc-v022-compose [data-pc-progress]:empty, .pc-v022-compose [data-pc-parent]:empty { display: none; }
.pc-v022-compose [data-pc-send] { min-height: 40px; height: auto; padding: 0 16px; font-size: 14px; }
.pc-v022-history { padding: 0; overflow: hidden; }
.pc-v022-history > header { padding: 10px 12px 10px 18px; }
.pc-v022-history > header h2 { font-size: 14px; margin: 0; }
.personal-chat-v022 .pc-v022-history > header button { min-height: 36px; height: auto; padding: 0 12px; font-size: 13px; }
.pc-v022-history > [data-pc-load] { margin: 0; padding: 12px 18px; color: var(--ink-2); }
.pc-v022-history > [data-pc-load]:empty { display: none; }
.personal-chat-v022 .pc-v022-history > [data-pc-older] { margin: 10px 18px 14px; min-height: 38px; height: auto; font-size: 13.5px; }
.pc-v022-history [data-pc-list] > .pc-v022-item {
  display: block; padding: 0; gap: 0; border: 0; border-top: 1px solid var(--line); align-items: stretch;
}
.pc-v022-history [data-pc-list] > .pc-v022-item:first-child { border-top: 0; }
.pc-v022-history > [data-pc-older]:not([hidden]) + [data-pc-list] > .pc-v022-item:first-child { border-top: 1px solid var(--line); }
/* the open row's body: answer, notes, safety, earlier answers, actions, the doctor's reply form */
.pc-v022-body > * + * { margin-top: 8px; }
.personal-chat-v022 .pc-v022-body .pc-v022-note:not(.ai-review-note) { margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.pc-v022-body > .pc-v022-safety { padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.pc-v022-body > .pc-v022-safety p { margin: 4px 0 0; }
.personal-chat-v022 .pc-v022-body > .pc-v022-answer {
  --cc-role: var(--chat-ai, #59356e); --cc-role-bg: var(--chat-ai-bg, #eee8f4);
  display: block; width: 100%; max-width: none; margin-top: 0; padding: 10px 14px 12px;
  border: 0; border-left: 3px solid var(--cc-role); border-radius: 0 10px 10px 0;
  background: color-mix(in srgb, var(--cc-role-bg) 70%, var(--surface));
}
.personal-chat-v022 .pc-v022-body > .pc-v022-answer[data-role="doctor"] { --cc-role: var(--chat-doctor, #315744); --cc-role-bg: var(--chat-doctor-bg, #e7eee8); }
.personal-chat-v022 .pc-v022-body > .pc-v022-answer[data-role="consultant"] { --cc-role: var(--chat-consultant, #755020); --cc-role-bg: var(--chat-consultant-bg, #faeddc); }
.pc-v022-body .pc-v022-answer > .pc-v022-meta { gap: 6px; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.pc-v022-body .pc-v022-answer > .pc-v022-meta time { font-size: 12.5px; }
.pc-v022-body .pc-v022-answer > .pc-v022-meta time::before { content: "·"; margin-right: 6px; }
.pc-v022-body .pc-v022-who { font-weight: 600; color: var(--ink); }
.pc-v022-body .pc-v022-avatar { flex: 0 0 20px; width: 20px; height: 20px; font-size: 11px; }
.personal-chat-v022 .pc-v022-body .pc-v022-answer > p:not(.ai-review-note):not(.pc-v022-note) { margin: 6px 0 0; font-size: 15px; line-height: 1.55; color: var(--ink); }
.pc-v022-body details > summary { cursor: pointer; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.pc-v022-body .pc-v022-old { margin-top: 8px; padding-top: 8px; }
.pc-v022-body .pc-v022-old p { margin: 2px 0 0; font-size: 14px; }
.pc-v022-item .pc-v022-body .ai-limit-note { margin: 0; max-width: 100%; border-radius: 4px 10px 10px 10px; padding: 10px 14px; }
.pc-v022-body > .pc-v022-actions { margin-top: 10px; gap: 8px; }
.personal-chat-v022 .pc-v022-body > .pc-v022-actions button { min-height: 38px; height: auto; padding: 0 14px; font-size: 13.5px; }
.pc-v022-body .pc-v022-doctor-reply form { margin-top: 6px; }
.personal-chat-v022 .pc-v022-body .pc-v022-doctor-reply label { margin: 8px 0; font-size: 13.5px; }
.personal-chat-v022 .pc-v022-body .pc-v022-doctor-reply textarea { font-size: 15px; font-weight: 400; line-height: 1.5; min-height: 110px; }
.pc-v022-body .pc-v022-doctor-reply form button { margin: 0 8px 0 0; }
.pc-v022-body [data-pc-answer-error]:empty { display: none; }

/* ---------------------------------------------------------------- pregnancy (#/jautajumi) and child conversations */
section > .sheet:has(> ul.cc-list) { padding: 0; }
section.sheet > ul.cc-list { margin: 0; }
ul.cc-list { list-style: none; margin: 0; padding: 0; }
ul.cc-list > li.cc-row { margin: 0; padding: 0; border: 0; }
ul.cc-list > li:not(.cc-row) { padding: 12px; border: 0; }
/* these lists sit under a section header with 12px side padding: the rows line up with it */
ul.cc-list > li.cc-row > .cc-h > .cc-head { padding-inline: 12px; }
ul.cc-list > li.cc-row > .cc-body { padding-inline: 12px; }
ul.cc-list > li.cc-row + li.cc-row { border-top: 1px solid var(--line); }
ul.cc-list > li.cc-row.unread { margin: 0; padding: 0; box-shadow: inset 3px 0 0 var(--blue); background: color-mix(in srgb, var(--blue-light) 70%, var(--surface)); }
ul.cc-list > li.cc-row > .cc-body > .chat-question {
  margin: 0 0 8px; padding: 0; width: auto; max-width: none; background: none; border: 0; border-radius: 0;
}
ul.cc-list > li.cc-row > .cc-body > .chat-question blockquote,
ul.cc-list > li.cc-row > .cc-body > .chat-question .chat-followup-label { display: none; }
ul.cc-list > li.cc-row > .cc-body > .chat-question .msg-meta { text-align: left; font-size: 12px; line-height: 1.5; color: var(--ink-2); }
/* in her own list every question is hers: the sender circle repeats nothing the row does not already say */
ul.cc-list > li.cc-row > .cc-body > .chat-question .chat-sender { display: none; }
ul.cc-list > li.cc-row > .cc-body > .answer.chat-answer {
  margin: 0; width: auto; max-width: none; padding: 10px 14px 12px; border: 0; border-left: 3px solid var(--role-ink);
  border-radius: 0 10px 10px 0; background: color-mix(in srgb, var(--role-bg) 70%, var(--surface));
}
ul.cc-list > li.cc-row > .cc-body > .answer.chat-answer .answer-meta { font-size: 12px; }
ul.cc-list > li.cc-row > .cc-body > .answer.chat-answer > p:not(.ai-review-note):not(.memline) { margin: 6px 0 0; font-size: 15px; line-height: 1.55; color: var(--ink); }
ul.cc-list > li.cc-row > .cc-body > .chat-safety-alert { margin: 0 0 10px; padding: 12px 14px; }
ul.cc-list > li.cc-row > .cc-body > .brief-note { margin: 6px 0 0; text-align: left; }
ul.cc-list > li.cc-row > .cc-body > .thread-actions { margin: 10px 0 0; }
ul.cc-list > li.cc-row > .cc-body > .actions { margin-top: 10px; }
ul.cc-list > li.cc-row > .cc-body > p { margin: 6px 0 0; }

/* the child conversation tab (her view): one readable column, like the conversation pages */
.cc-column { max-width: 820px; }

/* ---------------------------------------------------------------- phones */
@media (max-width: 600px) {
  .cc-row > .cc-h > .cc-head { padding: 12px 14px; column-gap: 12px; }
  /* a phone keeps the full width for the open question: the badge sits under the time, beside the title */
  .cc-open > .cc-h > .cc-head { padding-bottom: 8px; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr; grid-template-areas: "title when" "title to"; column-gap: 12px; }
  .cc-open > .cc-h .cc-to { align-self: start; margin-top: 1px; }
  .cc-body { padding: 0 14px 14px; }
  .cc-to { padding: 1px 7px; font-size: 11px; }
  .pc-v022-compose { padding: 12px 14px 14px; }
  .pc-v022-history > header { padding: 8px 10px 8px 14px; }
  .pc-v022-history > [data-pc-load] { padding: 12px 14px; }
  .personal-chat-v022 .pc-v022-history > [data-pc-older] { margin: 10px 14px 14px; }
  .personal-chat-v022 .pc-v022-body > .pc-v022-actions button,
  .personal-chat-v022 .pc-v022-compose [data-pc-send] { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .cc-when::after { transition: none; } }
