/* The assistant panel's layout; its type, fields, links and bubbles are the shared rules. */
#akashic-health-records-patient-portal-root .ahr-assistant-body {
  gap: 12px;
}

/* One flex column at every width: an empty panel centres its guidance, and a conversation sits on
   the floor with the newest turn last. The first turn's auto margin anchors it without clipping the
   top once the transcript overflows, which justify-content: flex-end would do. */
#akashic-health-records-patient-portal-root .ahr-assistant-scroll--empty {
  justify-content: center;
}

#akashic-health-records-patient-portal-root .ahr-assistant-scroll > .ahr-assistant-thread:first-child {
  margin-top: auto;
}

#akashic-health-records-patient-portal-root .ahr-assistant-scroll {
  gap: 12px;
}

.ahr-assistant-thinking {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#akashic-health-records-patient-portal-root .ahr-assistant-scroll .ahr-assistant-nudge {
  margin: 0;
}

#akashic-health-records-patient-portal-root .ahr-assistant-ask {
  display: grid;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

#akashic-health-records-patient-portal-root .ahr-assistant-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* One bordered block per exchange on the paper ground, "You asked:" then "Assistant:", as the deck draws it. */
#akashic-health-records-patient-portal-root .ahr-assistant-answer {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--ak-font-12);
  overflow-wrap: anywhere;
}

/* The mount sizes every p, so the question restates the block's size to match the answer. */
#akashic-health-records-patient-portal-root .ahr-assistant-answer p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

#akashic-health-records-patient-portal-root .ahr-assistant-contact {
  justify-self: center;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-style: italic;
  text-align: center;
  cursor: pointer;
}

#akashic-health-records-patient-portal-root .ahr-assistant-links {
  margin-top: 6px;
  display: grid;
  gap: 2px;
  justify-items: start;
}

/* The mount sizes every li, so the bubble's size has to be restated for the link to inherit it. */
#akashic-health-records-patient-portal-root .ahr-assistant-links li {
  font-size: inherit;
  line-height: inherit;
}

#akashic-health-records-patient-portal-root .ahr-assistant-links button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: inherit;
  line-height: inherit;
}
