/* list-page.css (23/10/2026): ListPage, the frame of a list page (list-page.tsx), its own entry imported by it. Polaris Page's
   numbers as the admin draws it, measured at 320 / 390 / 768 / 1280 / 1366 / 1920 (_local/gemboss/list-page-2026-10-23):
   the column is --ui-content-max (900) with 24px each side from 490px up and none below (the shell's 16 is the edge there);
   the header starts 24px down; the title is 20/24/700 on a 28px row, its badge 8px after it, the back arrow 4px before it;
   the line under it 12/16 muted, 2px under that row; actions 28px, 8px apart, 16px from the title; the list 24px below the
   header from 768px up, 16 below that; sections 16px apart (Polaris BlockStack 400).
   Colours: Polaris' own where the page has Polaris (the admin: text, secondary text, the header actions' tertiary fill), the
   kit's tokens elsewhere: the fill is --gemboss-fill-tertiary* (theme-dark.css) in dark, Polaris' light hex as the fallback in light
   (until 04/11/2026 the hex was the only fallback, so in dark the near-white words sat on #e3e3e3).
   Two widths decide two things:
   - the VIEWPORT below 768 (the kit's phone width, where its controls are 44px): the header is two rows, the way back and the
     actions on the first, the title under them; without a way back the title and the actions share a row; the line under
     the title runs across the whole header;
   - the PAGE COLUMN below 560px (the admin at 768 has a rail, and 421px of column): every secondary action goes behind ⋯.
     From 560px, two stand as buttons and the rest are behind ⋯. */
/* `ui-page-column` (08/11/2026): the name PageActions folds by, so a page that is not a ListPage can name its own column (the
   admin's Store, on its Polaris Page). `ui-list-page` stays for the admin's own queries. */
.ui-list-page {
  box-sizing: border-box; max-width: var(--ui-content-max, 900px); margin-inline: auto; padding-inline: 24px;
  display: flex; flex-direction: column; gap: 16px; padding-bottom: 24px;
  container: ui-list-page ui-page-column / inline-size;
  --ui-list-page-muted: var(--p-color-text-secondary, var(--ui-text-muted));
}
/* The actions' words and fill: on the page, and on PageActions where no ListPage is around it (so it reads the same there). Not
   inside a ListPage: there they are inherited, so a page that sets them on `.ui-list-page` still reaches its actions. */
.ui-list-page {
  --ui-list-page-text: var(--p-color-text, var(--ui-text-strong));
  --ui-list-page-fill: var(--p-color-bg-fill-tertiary, var(--gemboss-fill-tertiary, #e3e3e3));
  --ui-list-page-fill-hover: var(--p-color-bg-fill-tertiary-hover, var(--gemboss-fill-tertiary-hover, #d4d4d4));
  --ui-list-page-fill-active: var(--p-color-bg-fill-tertiary-active, var(--gemboss-fill-tertiary-active, #cccccc));
}
/* Its own rule, not in the list above: a browser that cannot read the `:not()` drops only this one (review of #6961). */
.ui-list-page__actions:not(.ui-list-page *) {
  --ui-list-page-text: var(--p-color-text, var(--ui-text-strong));
  --ui-list-page-fill: var(--p-color-bg-fill-tertiary, var(--gemboss-fill-tertiary, #e3e3e3));
  --ui-list-page-fill-hover: var(--p-color-bg-fill-tertiary-hover, var(--gemboss-fill-tertiary-hover, #d4d4d4));
  --ui-list-page-fill-active: var(--p-color-bg-fill-tertiary-active, var(--gemboss-fill-tertiary-active, #cccccc));
}
@media (max-width: 30.6225em) { .ui-list-page { padding-inline: 0; } }

.ui-list-page__head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title actions" "sub .";
  align-items: start; column-gap: 16px; padding-top: 24px; margin-bottom: 8px;
}
.ui-list-page__head--back { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "back title actions" ". sub ."; }
/* The arrow sits 4px before the title, not the 16 between the title and the actions. */
.ui-list-page__head--back > :is(.ui-list-page__title-row, .ui-list-page__subtitle) { margin-left: -12px; }
.ui-list-page__back { grid-area: back; color: var(--ui-list-page-text); border-color: transparent; }
@media (hover: hover) { .ui-list-page__back:hover { background: var(--ui-list-page-fill-hover); } }
.ui-list-page__back svg { width: 20px; height: 20px; }
.ui-list-page__title-row { grid-area: title; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; min-height: 28px; }
.ui-list-page__title {
  margin: 0; color: var(--ui-list-page-text); font-size: 20px; line-height: 24px; font-weight: 700; letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.ui-list-page__subtitle {
  grid-area: sub; min-width: 0; margin: 2px 0 0; color: var(--ui-list-page-muted); font-size: 12px; line-height: 16px;
  overflow-wrap: anywhere;
}
.ui-list-page__actions { grid-area: actions; display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
/* Polaris' header actions: the tertiary fill, no border. */
.ui-list-page__action { background: var(--ui-list-page-fill); border-color: transparent; color: var(--ui-list-page-text); }
@media (hover: hover) { .ui-list-page__action:not([aria-disabled="true"]):hover { background: var(--ui-list-page-fill-hover); } }
.ui-list-page__action:not([aria-disabled="true"]):active { background: var(--ui-list-page-fill-active); }
.ui-list-page__action--danger { color: var(--gemboss-danger-strong, #8e0b21); }
/* Its ⋯ wears the same fill, beside them (a row's ⋯ in the list keeps the kit's bordered square). */
.ui-list-page__more > summary { background: var(--ui-list-page-fill); border-color: transparent; color: var(--ui-list-page-text); }
@media (hover: hover) { .ui-list-page__more > summary:hover { background: var(--ui-list-page-fill-hover); } }
.ui-list-page__narrow { display: none; }
/* Notices or a toolbar that draw nothing (a strip that renders null until it loads, wrapped in a stack) take no gap. */
.ui-list-page__notices:empty, .ui-list-page__toolbar:empty,
.ui-list-page__notices:has(> :only-child:empty), .ui-list-page__toolbar:has(> :only-child:empty) { display: none; }
@container ui-page-column (max-width: 559.98px) {
  .ui-list-page__wide { display: none; }
  .ui-list-page__narrow { display: inline-flex; }
}

@media (max-width: 47.9975em) {
  .ui-list-page__head { padding-top: 16px; margin-bottom: 0; grid-template-areas: "title actions" "sub sub"; }
  .ui-list-page__head--back { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "back . actions" "title title title" "sub sub sub"; }
  .ui-list-page__head--back > :is(.ui-list-page__title-row, .ui-list-page__subtitle) { margin-left: 0; }
  .ui-list-page__head--back > .ui-list-page__title-row { margin-top: 12px; }
  .ui-list-page__head:not(.ui-list-page__head--back):has(> .ui-list-page__actions) > .ui-list-page__title-row { min-height: 44px; } /* level with the 44px actions */
  .ui-list-page__wide { display: none; }
  .ui-list-page__narrow { display: inline-flex; }
}

/* The card: the list, or its state, flush (rows draw their own padding), clipped to its corners. Square below 490px, as a
   Polaris Card is there, so it matches the cards around it. */
.ui-list-page__card { padding: 0; overflow: hidden; }
@media (max-width: 30.6225em) { .ui-list-page__card { border-radius: 0; } }
.ui-list-page__card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 16px; border-bottom: 1px solid var(--ui-border); }
.ui-list-page__card-title { margin: 0; color: var(--ui-list-page-text); font-size: 14px; line-height: 20px; font-weight: 650; }
.ui-list-page__skeleton { display: grid; gap: 8px; padding: 16px; }
.ui-list-page__skeleton + .ui-list-page__skeleton { border-top: 1px solid var(--ui-border); }
.ui-list-page__skeleton .ui-skeleton__line:last-child { width: 60%; }
.ui-list-page__error { padding: 16px; }
.ui-list-page__error .ui-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.ui-list-page__no-match { padding: 32px 16px; }
.ui-list-page__section-title { margin-bottom: -8px; } /* a heading over a grid of cards: 8px above it, as a card's head */
