/* ConductLettersComponent (packs/conduct/app/components/conduct_letters_component.rb) and the letter sheets (packs/conduct/app/views/conduct_letters). The panel reuses the case page's own
   `case-work` list, line, meta and badge; this adds what is the letters': the groups inside the panel, the list of letters that can be drafted, the row of actions under a sent letter, and the
   draft's text field on the sheet.

   Tokens only and logical properties only, both enforced (test/styles/tokens_test.rb, test/styles/components_test.rb), so it reads on the light shell
   and the console, in light and in dark, and mirrors in a right-to-left language. Nothing pinned to an edge, no height in vh, and everything that holds
   words may shrink and wrap, so a language 40% longer never widens the page (WCAG 1.4.10). */

.conduct-letters {
  display: grid;
  gap: var(--density-gap);
  min-inline-size: 0;
}

.conduct-letters__group {
  display: grid;
  gap: var(--space-2);
  min-inline-size: 0;
}

.conduct-letters__subheading {
  margin-block: 0;
  font-size: var(--text-md);
}

.conduct-letters__drafts {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.conduct-letters__draft {
  display: grid;
  gap: var(--space-1);
  min-inline-size: 0;
}

/* The letters that do not fit the step, folded under "Other letters", and each letter's "About this letter": both summaries are 63-conduct.css's `.conduct-history`. */
.conduct-letters__others > .conduct-letters__drafts {
  margin-block-start: var(--space-2);
}

.conduct-letters__about > .case-work-meta {
  margin-block: var(--space-1) 0;
}

.conduct-letters__draft-link,
.conduct-letters__receipt {
  display: inline-block;
  min-block-size: var(--target-min);
  padding-block: var(--space-2);
  overflow-wrap: anywhere;
}

.conduct-letters__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-block: 0;
}

/* The drafted letter on its sheet: the whole text in one field a person can edit, at the reading measure, in the page's own type (never a fixed width). */
.conduct-letter-text {
  inline-size: 100%;
  min-block-size: 20rem;
  resize: vertical;
}

/* The Initial Meeting invite (conduct_initial_meetings/new): when and where beside the letter it fills in, side by side where there is room for both, one above the other where there is not. */
.initial-meeting__halves {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: var(--density-gap);
  align-items: start;
  min-inline-size: 0;
}

.initial-meeting__letter {
  display: grid;
  gap: var(--space-3);
  min-inline-size: 0;
}

.initial-meeting__more > summary {
  min-block-size: var(--target-min);
  padding-block: var(--space-2);
  cursor: pointer;
}

.initial-meeting__more[open] > summary {
  margin-block-end: var(--space-2);
}

/* The College's closed days the invite skipped, said under what the times were checked against. */
.initial-meeting__closed {
  margin: 0;
  padding-inline-start: var(--space-4);
  color: var(--fg2);
  overflow-wrap: anywhere;
}

/* The sheet's quieter ways out (write the letter yourself, your settings): a whole target, clear of the buttons beside them. */
.initial-meeting__link {
  display: inline-block;
  min-block-size: var(--target-min);
  padding-block: var(--space-2);
  overflow-wrap: anywhere;
}
