/* Simple CARE's list page (Care::Simple::ListComponent, Care::Simple::ReferralsComponent; the module care_simple): the new referrals as cards under the tabs. The table is the shared data table, which
   scrolls in its own box on a phone; this is the tabs, the referral cards and the "no value" words. The morning's own rows (Today, Waiting on the student) are 64v.

   The page the reader is on is marked by a line and a heavier word as well as aria-current, never color alone. Numbered 64f to follow 64e in the link order. Tokens only and logical
   properties only, so it reads in light and in dark and mirrors in a right-to-left language. Nothing is pinned and nothing sets a height; every word may wrap (WCAG 1.4.10). */

.care-simple-list-page {
  display: grid;
  gap: var(--space-6);
  min-inline-size: 0;
}

.care-simple-list {
  display: grid;
  gap: var(--space-5);
  min-inline-size: 0;
}

.care-simple-list__tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  border-block-end: 1px solid var(--rule);
}

.care-simple-list__tab {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target-min);
  padding-inline: var(--space-1);
  border-block-end: 3px solid transparent;
  margin-block-end: -1px;
  color: var(--fg2);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.care-simple-list__tab:hover {
  color: var(--fg1);
}

.care-simple-list__tab[aria-current="page"] {
  border-block-end-color: var(--accent);
  color: var(--fg1);
  font-weight: 700;
}

.care-simple-list__tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.care-simple-list__none {
  color: var(--fg2);
}

.care-simple-referrals__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.care-simple-referrals__item {
  display: grid;
  min-inline-size: 0;
}

/* A card is the person, who sent it and how long it has waited, what it is about, and the one thing to press. A referral asked for today carries a bar on its start edge as well as its badge, so
   it is not told by color alone. */
.care-simple-referral {
  display: grid;
  gap: var(--space-3);
  align-content: start;
  min-inline-size: 0;
}

.care-simple-referral[data-today="true"] {
  border-inline-start: 4px solid var(--tone-bad-fg);
}

.care-simple-referral .card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-1) var(--space-3);
}

/* The name and "Asked for today" share the first row, the badge dropping under a long name (or a longer language) instead of squeezing it; the class is the line under them. */
.care-simple-referral__name {
  flex: 1 1 9rem;
  order: 1;
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

.care-simple-referral__today {
  flex: none;
  order: 2;
}

.care-simple-referral__class {
  flex-basis: 100%;
  order: 3;
  color: var(--fg2);
  font-size: var(--text-sm);
  font-weight: 400;
}

.care-simple-referral__meta,
.care-simple-referral__late,
.care-simple-referral__concern,
.care-simple-referral__words,
.care-simple-referral__assistant {
  margin-block: 0;
  overflow-wrap: anywhere;
  min-inline-size: 0;
}

.care-simple-referral__meta {
  color: var(--fg2);
  font-size: var(--text-sm);
}

/* Past the practice's time for a first contact: a warning band with its own mark, so it is not told by color alone. */
.care-simple-referral__late {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding-block: var(--space-2);
  padding-inline: var(--space-3);
  border-inline-start: 3px solid var(--tone-warn-line);
  border-radius: var(--radius-sm);
  background: var(--tone-warn-bg);
  color: var(--tone-warn-fg);
  font-size: var(--text-sm);
  font-weight: 600;
}

.care-simple-referral__late svg {
  flex: none;
  inline-size: 1rem;
  block-size: 1rem;
  margin-block-start: 0.15em;
}

.care-simple-referral__concern {
  color: var(--fg1);
  font-weight: 600;
}

.care-simple-referral__words {
  color: var(--fg2);
}

/* What the assistant read, set off by a hairline and its mark, quiet as its status line on the case page is: it suggests and nothing waits on it. */
.care-simple-referral__assistant {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding-block-start: var(--space-3);
  border-block-start: 1px solid var(--rule);
  color: var(--fg2);
  font-size: var(--text-sm);
}

.care-simple-referral__icon {
  flex: none;
  inline-size: 1.125em;
  block-size: 1.125em;
  margin-block-start: 0.1em;
  color: var(--accent-text);
}

.care-simple-referral__assistant-words {
  min-inline-size: 0;
}

.care-simple-referral__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin-block-start: var(--space-2);
  min-inline-size: 0;
}

.care-simple-referral__take {
  display: flex;
  margin: 0;
  min-inline-size: 0;
}

/* Give to a teammate is a disclosure that stands among the buttons as one of them; open, it takes the line, with the teammate and the one button under it. The summary wears a button's look, so the
   marker goes (Safari draws its own unless it is told not to). */
.care-simple-referral__give {
  min-inline-size: 0;
}

.care-simple-referral__give > summary {
  list-style: none;
}

.care-simple-referral__give > summary::-webkit-details-marker {
  display: none;
}

.care-simple-referral__give[open] {
  flex-basis: 100%;
}

.care-simple-referral__give-form {
  display: grid;
  gap: var(--space-3);
  justify-items: start;
  margin: 0;
  margin-block-start: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  min-inline-size: 0;
}

.care-simple-referrals__more {
  margin-block: var(--space-3) 0;
}
