/* The Admins page (packs/testing; docs/reset_plan.md, "Admins page (20 Oct 2026)"): the little Testing::AdminsListComponent, Testing::AdminFormComponent and
   Testing::AdminRemovalComponent add to the shared components they are arranged from (PageSectionComponent, CardComponent, BadgeComponent, ButtonComponent,
   CalloutComponent, EmptyStateComponent and the form system, Forms::*, which bring their own look). These rules only lay out what is between them.

   * The list: one card per admin in a grid, as many columns as fit and one at 320 CSS px (cards at every width, never a wide table). A card's heading is the
     person's name, with "You" beside it for the person looking; under it the address, how they got there, why, and whether they have signed in, one line each;
     its footer the one Remove link, which wraps a long name onto more lines instead of widening the card. The person looking has the accent edge as well as the
     word, so the edge is never the only signal (WCAG 1.4.1).
   * The form and the confirmation: one reading column, as every form is; the confirmation's lines about the admin sit together above what removing does.

   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 or sticky (WCAG 2.4.11), no height in vh, and everything that
   holds words may shrink and wrap (an address has no spaces to break at, so it breaks anywhere), so a language 40% longer never widens the page (WCAG 1.4.10). */

/* ── The list ────────────────────────────────────────────────────────────── */
.admins-list__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: var(--space-3);
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admins-list__card {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

/* The footer sits at the foot of the card whatever is above it, so the links of a row line up. */
.admins-list__card > .card-body {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: var(--space-1);
}

.admins-list__card[data-self] {
  border-color: var(--tone-accent-line);
  border-inline-start-width: 4px;
}

.admins-list__card .card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  min-inline-size: 0;
}

.admins-list__email,
.admins-list__source,
.admins-list__reason,
.admins-list__sign-in {
  margin-block: 0;
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

.admins-list__email {
  color: var(--fg2);
  font-size: var(--text-sm);
}

.admins-list__reason {
  color: var(--fg2);
  font-size: var(--text-sm);
}

/* A lapsed invitation is said in words; the heavier weight only draws the eye to it. */
.admins-list__sign-in[data-invitation="lapsed"] {
  font-weight: 600;
}

/* A name, an address or a reason is a span with dir="auto": an isolate in its own direction, said here as well as by the browser's own rule for [dir]. */
.admins-list__name,
.admins-list__address,
.admins-list__reason-text,
.admin-removal__name,
.admin-removal__address,
.admin-removal__reason-text {
  unicode-bidi: isolate;
}

.admins-list__remove {
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

/* ── The confirmation ────────────────────────────────────────────────────── */
.admin-removal__who {
  display: grid;
  gap: var(--space-1);
  min-inline-size: 0;
  max-inline-size: 72ch;
}

.admin-removal__email,
.admin-removal__source,
.admin-removal__reason,
.admin-removal__what {
  margin-block: 0;
  overflow-wrap: anywhere;
}

.admin-removal__email,
.admin-removal__reason {
  color: var(--fg2);
  font-size: var(--text-sm);
}

.admin-removal__what {
  max-inline-size: 72ch;
  margin-block: var(--space-3);
}

.admin-removal__back {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin-block-start: var(--space-3);
}

.admin-removal .form-actions .btn {
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}
