/* ConsultationAgendaComponent (app/components/consultation_agenda_component.rb; VIC-3 and VIC-2): an office's case consultation agenda. Its parts are the page's flow's own (41-page-structure.css): "Needs you"
   (a section of entries, each count a link), the meeting's two days (a toolbar on one card, the requests queue's: 60-intake.css) and the agenda (a section of entry cards: 43-entry-list.css), so what is here
   is only what those do not draw: the toolbar's help under its fields so the labels and the controls line up, the reasons a case is on the agenda as badges that wrap, and the focus a case takes when a
   review recorded for it brings the page back. Nothing is colored by a level: there is none here.

   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). */

/* The meeting's toolbar. A field's help is under its control in a pair (36-form-fields.css) so a sentence on one side does not push its control below the other's; the same here, and from a tablet's
   width the two days and the button share three rows (label, control, help) by subgrid, so the labels line up, the controls line up, and the button sits on the controls' row and not at the foot of the help. */
.consultation-agenda__meeting .field > .field-help {
  order: 3;
}

@media (min-width: 40rem) {
  .consultation-agenda__meeting {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 16rem)) auto;
    grid-template-rows: auto auto auto;
    justify-content: start;
    align-items: start;
    gap: 0.3rem var(--space-4);
  }

  .consultation-agenda__meeting > .field {
    grid-row: 1 / span 3;
    grid-template-rows: subgrid;
    gap: normal;
  }

  .consultation-agenda__meeting > .btn {
    grid-row: 2;
    align-self: end;
  }
}

/* Why a case is on the agenda: a list of badges after the person's name, wrapping, each badge allowed to break (a reason may say a day and a sentence). */
.consultation-agenda__reasons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.consultation-agenda__reasons .pill {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* A review recorded for a case brings the page back to its entry, and the entry takes the focus there: a ring on keyboard focus only. */
.consultation-agenda .entry:focus {
  outline: none;
}

.consultation-agenda .entry:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Four short facts: two to a row from the width of a phone (the entry's own grid gives each 9.5rem, which is one to a row there), one at 320 CSS px. */
.consultation-agenda .entry__facts {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
}
