/* The Schedule section of the person page (SchedulePanelComponent in app/components; docs/ems/00-integration-plan.md section 7, docs/phase0_core/06-app-layer.md section 7b), built from the table, the badge,
   the callout and the empty state, so what is here is only how they sit together: a heading, a sentence that says what a booking is and is not, how old the data is, a warning when it is older than it should
   be, and the lines as a table, each with the system that said so and when.

   Linked after the device rules (40-native.css), like 46-sources.css, which is why it is numbered 51 and not among the components' 35 to 39: nothing here needs to come before them, because every rule is
   more specific than the one it adjusts. Tokens only and logical properties only, both enforced (test/styles/tokens_test.rb, test/styles/components_test.rb), so all of it reads on the light shell and on the
   console, in light and in dark, and mirrors in a right-to-left language. It decides no mode and no surface. Nothing is pinned to an edge and nothing sets a height in vh.

   Everything that holds words may shrink (`min-inline-size: 0`) and breaks a word that has no room (`overflow-wrap`), so a long team name, a long title, a long room or a language 40% longer never widens the
   page (WCAG 1.4.10). A status is its words, in a badge whose tone is a second signal and never the only one. The table scrolls inside its own named region, which is focusable, and is the one place on the page
   that may be wider than a phone. */

.schedule-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--density-gap);
  max-inline-size: 64rem;
  min-inline-size: 0;
}

/* What a booking is, and how old it is: lines of the muted small text the facts' provenance is in. */
.schedule-note,
.schedule-freshness {
  min-inline-size: 0;
  margin: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.schedule-stale {
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

/* A cell that says several things says them on lines of its own, so a column of events reads down. A word that has no room breaks (as every cell of the table does: `break-word`, which keeps a column as wide as
   its longest word and so never cuts "October" in two on a phone, where the table scrolls inside its own region instead). */
.schedule-line {
  display: block;
  min-inline-size: 0;
  overflow-wrap: break-word;
}
/* The words of the line itself keep a measure that is readable, and the system and the moment that said it are the muted small text beneath the facts everywhere else: the cell that holds them gives way,
   so a table at the page's width gives What the room it needs, and at a phone's width the table scrolls inside its own region. */
.schedule-what {
  min-inline-size: 10rem;
}
.schedule-provenance {
  display: block;
  min-inline-size: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
  overflow-wrap: break-word;
}
.schedule-panel .pill {
  max-inline-size: 100%;
}
.schedule-panel .pill + .pill {
  margin-block-start: 0.15rem;
}
