/* My record activity: the heading, lede and filters over one rule, then the stream in one card, stacked
   by the shared .ak-page-body. */
#akashic-health-records-patient-portal-root .my-history-head {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

#akashic-health-records-patient-portal-root .my-history-head .ahr-view-title {
  margin: 0;
}


/* The filters span the width as one segmented control; Refresh sits under its right end. */
#akashic-health-records-patient-portal-root .my-history-tabrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

#akashic-health-records-patient-portal-root .my-history-tabrow [data-slot="tabs"] {
  flex: 1 1 100%;
  min-width: 0;
}

#akashic-health-records-patient-portal-root .my-history-tabrow [data-slot="tabs-list"] {
  display: flex;
  width: 100%;
  height: auto;
  overflow-x: auto;
}

/* A track, not a card: the shell's lift for rounded boxes does not apply to it. */

#akashic-health-records-patient-portal-root .my-history-tabrow [data-slot="tabs-trigger"] {
  flex: 1;
  height: auto;
}

#akashic-health-records-patient-portal-root button.my-history-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 11px;
  font-weight: var(--ak-body-weight);
  color: var(--ink-muted);
  text-decoration: underline;
  cursor: pointer;
}

#akashic-health-records-patient-portal-root button.my-history-link:disabled {
  opacity: 0.5;
}

#akashic-health-records-patient-portal-root .my-history-lag {
  margin: 6px 0 0;
}


#akashic-health-records-patient-portal-root .my-history-range {
  display: block;
  margin: 0 0 2px;
  padding: 8px 2px 7px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
  font-weight: var(--ak-body-weight);
  color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root .my-history-row {
  align-items: flex-start;
  flex-wrap: nowrap;
  min-height: 0;
}

#akashic-health-records-patient-portal-root .my-history-icon {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root .my-history-text {
  flex: 1;
  min-width: 0;
}

#akashic-health-records-patient-portal-root .my-history-say {
  margin: 0;
  font-size: 13px;
  font-weight: var(--ak-body-weight);
  line-height: 1.4;
  color: var(--ink-strong);
}

#akashic-health-records-patient-portal-root .my-history-say b {
  font-weight: var(--ak-heading-weight);
}

#akashic-health-records-patient-portal-root .my-history-when {
  color: var(--ink-muted);
}

/* The chevron points down to open and up once open; the glyph stays 15px, the tap target 44px.
   Mount-scoped so the shared icon-only 44px floor cannot size the row or wrap the chevron. */
#akashic-health-records-patient-portal-root[data-akashic-mount="frontend"] .my-history-row button.my-history-open.my-history-open {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 15px;
  width: 15px;
  min-width: 0;
  height: 15px;
  min-height: 0;
  margin: 2px 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
}

#akashic-health-records-patient-portal-root .my-history-row button.my-history-open::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}

#akashic-health-records-patient-portal-root button.my-history-open svg {
  width: 15px;
  height: 15px;
  transform: rotate(90deg);
  transition: transform 0.15s ease;
}

#akashic-health-records-patient-portal-root .my-history-row button.my-history-open[aria-expanded="true"] {
  color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root button.my-history-open[aria-expanded="true"] svg {
  transform: rotate(-90deg);
}

/* What an access opened: each thing once, with how many times and over what span. */
#akashic-health-records-patient-portal-root .my-history-opened {
  margin: 6px 0 0;
  padding: 0 0 0 8px;
  border-left: 2px solid var(--line);
  list-style: none;
}

#akashic-health-records-patient-portal-root .my-history-oline {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 2px 0;
  font-size: 13px;
}

#akashic-health-records-patient-portal-root .my-history-oline b {
  font-weight: var(--ak-heading-weight);
  color: var(--ink-strong);
}

#akashic-health-records-patient-portal-root .my-history-oline b::first-letter {
  text-transform: uppercase;
}

#akashic-health-records-patient-portal-root .my-history-times {
  font-size: 11px;
  font-weight: var(--ak-heading-weight);
  color: var(--warning);
}

/* --ink-muted rather than the drawing's --faint, which fails AA at 11px. */
#akashic-health-records-patient-portal-root .my-history-stamp {
  margin-left: auto;
  font-size: 11px;
  white-space: nowrap;
  color: var(--ink-muted);
}

/* What a change did, in the patient's words, on the paper ground. */
#akashic-health-records-patient-portal-root .my-history-exp {
  margin: 6px 0 0;
  padding: 8px;
  border-radius: var(--ak-card-radius);
  background: var(--paper);
  list-style: none;
}

#akashic-health-records-patient-portal-root .my-history-exp li {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root .my-history-exp li + li {
  margin-top: 2px;
}

#akashic-health-records-patient-portal-root .my-history-na {
  margin: 0;
  font-size: 13px;
  font-style: italic;
  color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root button.my-history-older {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 12px 0 8px;
}

#akashic-health-records-patient-portal-root .my-history-older-error {
  justify-content: center;
  margin: 0 0 8px;
}

#akashic-health-records-patient-portal-root .my-history-empty {
  padding: 24px 16px;
}

#akashic-health-records-patient-portal-root .my-history-empty > p:first-of-type {
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: var(--ak-heading-weight);
  color: var(--ink-strong);
}

#akashic-health-records-patient-portal-root .my-history-empty > p + p {
  font-size: 13px;
}
