/* Start here on a new simple CARE case (Care::Simple::StartHereComponent; the module care_simple), and the sheet that tells the CARE lead about a safety worry (Care::Simple::SafetySheetComponent). The card
   sits in a panel (the person page's) with a strong border, so it is the first thing the eye lands on under "Why (first name) is here": two rows, each with a mark that is a number until it is done and
   a tick after, the first-contact steps as cards side by side, and a band at the top for a worry that does not wait for a level. Numbered 64s to follow 64k in the link order.

   A row's state is said in words as well as drawn (a badge says Done or Waiting, and the list is an ordered list), never color alone. The band sits on the warn tone's pair so it reads as set apart in
   light and in dark. Tokens only and logical properties only, so all of it reads on the console in both modes and mirrors in a right-to-left language. Nothing is pinned to an edge and nothing sets a height;
   everything that holds words may shrink and breaks a long word, so a language 40% longer never widens the page (WCAG 1.4.10), and the cards wrap onto their own lines on a phone. */

.care-simple-start {
  border: 2px solid var(--accent);
}

.care-simple-start .person-panel-body {
  display: grid;
  gap: var(--space-4);
  min-inline-size: 0;
}

.care-simple-start__rows {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  min-inline-size: 0;
}

.care-simple-start__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
  min-inline-size: 0;
}

/* The mark is a number in a ring until its row is done, and a tick in a filled one after; a waiting row's ring is dashed, so the three states differ in shape as well as in color. */
.care-simple-start__mark {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  inline-size: 1.75rem;
  block-size: 1.75rem;
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--accent-text);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
}

.care-simple-start__mark[data-state="waiting"] {
  border-style: dashed;
  border-color: var(--rule-strong);
  color: var(--fg2);
}

.care-simple-start__mark[data-state="done"] {
  border-color: var(--tone-good-line);
  background: var(--tone-good-bg);
  color: var(--tone-good-fg);
}

.care-simple-start__mark svg {
  inline-size: 1rem;
  block-size: 1rem;
}

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

.care-simple-start__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  min-inline-size: 0;
}

.care-simple-start__title {
  margin-block: 0;
  font-size: var(--text-base);
  font-weight: 600;
  overflow-wrap: anywhere;
  min-inline-size: 0;
}

.care-simple-start__help,
.care-simple-start__own {
  margin-block: 0;
  overflow-wrap: anywhere;
  min-inline-size: 0;
}

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

/* Once the case has a next step, the other ways wait behind one line (a details), in the same style as the page's other folds. */
.care-simple-start__another {
  min-inline-size: 0;
}

.care-simple-start__summary {
  display: list-item;
  min-block-size: var(--density-chip);
  padding-block: var(--space-1);
  color: var(--accent-text);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}

@media (pointer: coarse) {
  .care-simple-start__summary {
    min-block-size: var(--target-min);
  }
}

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

.care-simple-start__ways {
  display: grid;
  gap: var(--space-3);
  margin-block-start: var(--space-2);
  min-inline-size: 0;
}

/* Where a contact already made is written up: one quiet line under the ways to make a first one. */
.care-simple-start__already {
  margin-block: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
  min-inline-size: 0;
}

/* The ways to make first contact sit side by side while there is room for each, and one under another when there is not. */
.care-simple-start__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  min-inline-size: 0;
}

.care-simple-start__card {
  display: grid;
  align-content: start;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  min-inline-size: 0;
}

.care-simple-start__card[data-first="true"] {
  border-color: var(--accent);
}

.care-simple-start__how,
.care-simple-start__words,
.care-simple-start__with,
.care-simple-start__by,
.care-simple-start__why {
  margin-block: 0;
  overflow-wrap: anywhere;
  min-inline-size: 0;
}

/* Where a card came from, when the assistant's and the practice's sit side by side: the assistant's has its mark, the practice's has words alone. */
.care-simple-start__by {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--accent-text);
  font-size: var(--text-sm);
  font-weight: 650;
  letter-spacing: 0.02em;
}

.care-simple-start__by svg {
  flex: none;
  inline-size: 1rem;
  block-size: 1rem;
}

.care-simple-start__card[data-source="practice"] .care-simple-start__by {
  color: var(--fg2);
}

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

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

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

/* A card's buttons: the one that uses it, and for the assistant's "Not now", side by side while there is room. */
.care-simple-start__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin-block-start: var(--space-1);
  min-inline-size: 0;
}

.care-simple-start__form {
  display: flex;
  flex-wrap: wrap;
  min-inline-size: 0;
}

/* The band for a safety worry (Care::Simple::SafetyBandComponent): set apart on the warn tone, with a word to say so, and the one button that goes to the sheet. It is the first thing in Start here,
   and the same band, smaller, closes the next-step card once Start here has left. */
.care-simple-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  padding-block: var(--space-3);
  padding-inline: var(--space-4);
  border-inline-start: 3px solid var(--tone-warn-line);
  border-radius: var(--radius-sm);
  background: var(--tone-warn-bg);
  color: var(--tone-warn-fg);
  min-inline-size: 0;
}

.care-simple-band__words {
  margin-block: 0;
  overflow-wrap: anywhere;
  min-inline-size: 0;
}

.care-simple-band[data-size="small"] {
  gap: var(--space-1) var(--space-3);
  padding-block: var(--space-2);
  padding-inline: var(--space-3);
  font-size: var(--text-sm);
}

/* The safety sheet is one field and one button in the sheet's reading column; nothing is added to the form's own look. */
.care-simple-safety {
  min-inline-size: 0;
}
