/* v31.789 Plavidian Mail Expert card. Navy/blue primary, orange accent only, to match
   the POMS dashboard. Inherits the base .card look; only assistant specifics
   live here. */
.pc-ai-card {
  --pc-navy: #1c2b46;
  --pc-blue: #2f5597;
  --pc-accent: #e8791f; /* orange, accent only */
  --pc-line: #e2e6ee;
  --pc-soft: #f4f6fa;
  /* Make the assistant the visual anchor of the dashboard: a navy top rule,
     a soft tint, and a lifted shadow so it reads as a primary feature rather
     than one more card in the stack. */
  /* v31.844: warm tint so the assistant reads as the anchor of the dashboard
     rather than one more card in a stack of blue-grey ones. The top rule moves
     from blue to the accent to match; a blue rule over a warm wash looked like
     two unrelated decisions. Orange is still accent only: a wash and a rule,
     never a fill behind white text. Matches .rd-guide-cta on the public side so
     the same component reads the same in both places. */
  border-top: 3px solid var(--pc-accent);
  background: linear-gradient(180deg, #fce9d5 0%, #ffffff 62%);
  box-shadow: 0 2px 10px rgba(70, 43, 28, 0.10);
}
.pc-ai-heading {
  margin: 0 0 4px;
  color: var(--pc-navy);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.pc-ai-heading::after {
  /* v31.844: was the card's only orange accent. Now that the top rule is orange
     too, this repeats it 40px lower, so it drops to navy and the accent stays
     used once. */
  content: '';
  display: block;
  width: 38px;
  height: 3px;
  margin-top: 6px;
  background: var(--pc-navy);
  border-radius: 2px;
}
.pc-ai-intro { margin: 0 0 12px; }

.pc-ai-form {
  display: flex;
  gap: 8px;
  /* v31.846: was flex-start, which pinned the button to the top of a textarea
     that grows (min-height 44px, resize:vertical). Once the field was dragged
     taller the button floated at the top edge, detached from the field it
     submits. flex-end keeps it on the baseline of the input at any height. */
  align-items: flex-end;
}
.pc-ai-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--pc-line);
  border-radius: 6px;
  font: inherit;
  resize: vertical;
  min-height: 44px;
}
.pc-ai-input:focus {
  outline: none;
  border-color: var(--pc-blue);
  box-shadow: 0 0 0 2px rgba(47, 85, 151, 0.15);
}
.pc-ai-send {
  background: var(--pc-blue);
  border-color: var(--pc-blue);
  color: #fff;
  white-space: nowrap;
  min-height: 44px;
}
.pc-ai-send:disabled { opacity: 0.55; cursor: default; }

/* Rendered answer structure: bold section headers, bullet lists, blank-line gaps. */

.pc-ai-sources {
  margin-top: 8px;
  font-size: 12px;
  color: var(--pc-blue);
}
.pc-ai-footlink { margin: 10px 0 0; }
.pc-ai-footlink a { color: var(--pc-blue); }

/* ---- Threaded conversation ---------------------------------------------- */
.pc-ai-thread {
  margin: 12px 0 10px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 4px;
}
.pc-ai-turn { display: flex; margin: 8px 0; }
.pc-ai-user { justify-content: flex-end; }
.pc-ai-assistant { justify-content: flex-start; }
.pc-ai-bubble {
  max-width: 88%;
  padding: 12px 15px;
  border-radius: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15.5px;
  line-height: 1.65;
  letter-spacing: 0.1px;
  overflow-wrap: anywhere;
}
/* v31.846: the card now fills its band on the public page, so a percentage
   measure alone would run answers to 130+ characters per line. 78ch caps the
   line length while the card itself stays full width. */
.pc-ai-assistant .pc-ai-bubble { max-width: min(88%, 78ch); }
.pc-ai-user .pc-ai-bubble {
  background: var(--pc-blue);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.pc-ai-assistant .pc-ai-bubble {
  background: var(--pc-soft);
  color: #1a2230;
  border: 1px solid var(--pc-line);
  border-bottom-left-radius: 4px;
}
.pc-ai-thinking .pc-ai-bubble { color:#334155; font-style: italic; }
.pc-ai-error .pc-ai-bubble {
  background: #fdf3ee;
  border-color: #f0c9ac;
  color: #8a4516;
}

/* Rendered answer structure inside a bubble. */
.pc-ai-h { font-weight: 700; color: var(--pc-navy); margin: 14px 0 4px; }
.pc-ai-bubble > .pc-ai-h:first-child { margin-top: 0; }
.pc-ai-bubble strong { font-weight: 700; color: var(--pc-navy); }
.pc-ai-user .pc-ai-bubble strong { color: #fff; }
.pc-ai-list { margin: 2px 0 6px; padding-left: 20px; }
.pc-ai-list li { margin: 2px 0; }
.pc-ai-gap { height: 8px; }

/* Starter questions */
.pc-ai-starters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.pc-ai-chip {
  border: 1px solid var(--pc-line);
  background: #fff;
  color: var(--pc-blue);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
}
.pc-ai-chip:hover { border-color: var(--pc-blue); background: var(--pc-soft); }

/* New-conversation control */
.pc-ai-reset {
  border: 0;
  background: none;
  color: var(--pc-blue);
  cursor: pointer;
  padding: 0;
  margin-right: 10px;
  font-size: inherit;
  text-decoration: underline;
}

/* ---- Public Mail Expert (marketing pages) -------------------------------- */
/* v31.846: the public /mail-expert page.
   The warm tint moves OUT to the section band (.rd-section-warm) so the whole
   Ask the Mail Expert block, card plus the two buttons under it, reads as one
   area. The card goes white so it lifts off that field instead of disappearing
   into it. On the portal dashboard there is no band, so .pc-ai-card keeps the
   warm fill from v31.844 and still stands out against the white page.
   max-width is dropped so the card spans the band it sits in. */
.pc-ai-card.pc-ai-public {
  max-width: none;
  margin: 0;
  background: #fff;
}
.pc-ai-email-form { margin: 6px 0 10px; }
.pc-ai-email-note {
  margin: 0 0 8px;
  color: var(--pc-navy);
  font-weight: 600;
  font-size: 14.5px;
}
.pc-ai-note .pc-ai-bubble {
  background: #fff7ef;
  border: 1px solid #f3d6b8;
  color: #8a4516;
  font-size: 14.5px;
}

/* v31.794: the authenticated shell is full-width, so on wide monitors the public
   Mail Expert page stretched its text and cards edge to edge. Keep the reading
   column and the widget to a comfortable measure. */
