/* A declared emergency (D-180; docs/data_model/06-permissions.md section 4, "A declared emergency"; packs/emergency): the banner that makes a declaration in force unmistakable on every console page
   (EmergencyBannerComponent), and the little the declaration's own page adds to the shared components (PageSectionComponent, EntryListComponent, Forms::*): the heading over a reason, and the walls a
   declaration reaches. Every page is drawn by the shared components and has no rules of its own beyond these.

   The banner is the break-glass banner's sibling: a tone with a thick edge at the start, the sentence first and the button after, wrapping under it on a narrow screen. A declaration is the bad tone and a drill
   the info tone, and the title and the sentences say which, so the tone is never the only signal (WCAG 1.4.1).

   Tokens only and logical properties only (test/styles/tokens_test.rb, test/styles/components_test.rb), so it reads on both shells, in light and in dark, and mirrors in a right-to-left language. Nothing pinned,
   no height in vh, and every box that holds words may shrink and wrap (WCAG 1.4.10). */

/* ── The banner ──────────────────────────────────────────────────────────── */
.emergency-banner {
  display: grid;
  gap: 0.35rem;
  justify-items: start;
  min-inline-size: 0;
  margin-block-end: var(--density-gap);
  padding: 0.8rem 1rem;
  border: 1px solid var(--tone-bad-line);
  border-inline-start-width: 4px;
  border-radius: var(--radius-md);
  background: var(--tone-bad-bg);
  color: var(--tone-bad-fg);
  overflow-wrap: anywhere;
}

.emergency-banner[data-tone="info"] {
  border-color: var(--tone-info-line);
  background: var(--tone-info-bg);
  color: var(--tone-info-fg);
}

/* The title looks the same whether it is a heading or (above the page's h1, in the console) the paragraph that names the section. */
.emergency-banner__title {
  margin-block: 0;
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
  color: var(--fg1);
}

.emergency-banner__reading,
.emergency-banner__part {
  margin-block: 0;
  max-inline-size: 72ch;
}

.emergency-banner__part {
  font-size: var(--text-sm);
}

.emergency-banner__remaining {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ── The declaration's page ─────────────────────────────────────────────── */
.emergency__label {
  margin-block: var(--space-3) var(--space-1);
  font-size: var(--text-sm);
  font-weight: 600;
}

.emergency__walls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-inline-size: 0;
  margin-block: var(--space-2);
  padding-inline-start: 0;
  list-style: none;
}

.emergency__walls li {
  min-inline-size: 0;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  overflow-wrap: anywhere;
}
