/* ════════════════════════════════════════════════════════════════════════
   Partner portal — the LIST family (MAR-2675, RFC-022 T20).

   The common list pattern every partner list page adopts (the CoPs list
   first, then the flag CoPs and training-centre lists): search, status
   chips with counts, ONE live filter row, a table, a pager, and a per-row
   action menu. Markup lives in pages/partner/_list.html.

   Most of the pattern is already in the shared layer and is REUSED, not
   restated here: the toolbar and icon search, the status tabs and their
   count badge, and the table (all in portal.data.css), the pills and the
   glass button (portal.primitives.css), the field input (portal.forms.css).
   This sheet owns only what was missing — the filter row's layout, the
   pager, the row menu and the row detail.

   Its OWN sheet, in the shared layer, per the convention portal.css states:
   a new collection family gets its own portal.family.css, linked from
   partner/_head.html and listed in tests.unit.partner_css SHARED_SHEETS.
   Shared rather than per-screen because three list pages will load it.

   Every selector stands on its own class (no class defined in another
   partner sheet appears here, not even as an ancestor — the duplicate
   definition test reads every token). The row menu is therefore NOT the
   team screen's screen-local menu class; it is a sibling with its own
   name. Tokens only, no hard-coded colour.
   ══════════════════════════════════════════════════════════════════════ */

.pp-list { display:flex; flex-direction:column; gap:12px; margin-bottom:16px; }
.pp-list__chips { margin:0; }

/* the filter row — one row of labelled controls, wrapping on narrow screens */
.pp-list__filters { display:flex; flex-wrap:wrap; gap:10px; align-items:flex-end; }
.pp-list__filter { display:flex; flex-direction:column; gap:4px; flex:1 1 160px; min-width:0; }

/* the pager — a summary line, then Previous, the numbered window, Next */
.pp-list__pager { display:flex; flex-wrap:wrap; gap:10px; align-items:center;
  justify-content:space-between; margin-top:14px; }
.pp-list__pages { display:flex; flex-wrap:wrap; gap:6px; }

/* the per-row action menu — a native disclosure, in flow (no float) */
.pp-list__menu > summary { list-style:none; cursor:pointer; min-height:24px; }
.pp-list__menu > summary::-webkit-details-marker { display:none; }
.pp-list__menubody { margin-top:8px; min-width:260px; padding:12px;
  display:flex; flex-direction:column; gap:10px; text-align:left;
  border:1px solid var(--rule); border-radius:var(--r-sm);
  background:var(--bg-surface); }

/* the expandable row detail under the seafarer's name */
.pp-list__detail { margin-top:6px; }
.pp-list__detail > summary { cursor:pointer; }

/* MAR-2750: secondary filters folded behind a native "More filters" */
.pp-list__more { flex:1 1 100%; }
.pp-list__more > summary { cursor:pointer; }
.pp-list__more[open] > summary { margin-bottom:8px; }

/* MAR-2750: a row's actions (View PDF, Details) on one line */
.pp-list__acts { display:flex; flex-wrap:wrap; gap:8px; align-items:center;
  justify-content:flex-end; }

/* MAR-3028 (RFC-023 page patterns): the v2 toolbar — one row of labelled
   fields, search first, then the filled status chips below it */
.pp-list__row { display:flex; flex-wrap:wrap; gap:12px; align-items:flex-end; }
/* grid, not a flex column: inside a column the search pill's own
   flex-basis would become its HEIGHT */
.pp-list__q { display:grid; gap:4px; flex:2 1 320px; min-width:0; }
.pp-list__status { display:flex; flex-wrap:wrap; gap:8px; }
.pp-list__chip { display:inline-flex; align-items:center; min-height:24px; box-sizing:border-box;
  font-size:12.5px; padding:7px 14px; border-radius:var(--r-pill); text-decoration:none;
  border:1px solid var(--mp-card-border); background:var(--bg-surface); color:var(--mp-ink); }
.pp-list__chip--on { background:var(--mp-navy); color:var(--text-inverse); border-color:var(--mp-navy); }
.pp-list__chip:focus-visible { outline:none; box-shadow:var(--shadow-focus); }

@media (max-width:600px) {
  .pp-list__menubody { min-width:0; }
  .pp-list__filter { flex-basis:100%; }
  .pp-list__row > * { flex-basis:100%; }
}

/* MAR-2785 (UC-001 PP-A11Y-011): a disabled pager end — Previous on the
   first page, Next on the last — shown, not omitted, and inert */
.pp-tab--off { opacity:.45; cursor:default; pointer-events:none; }

/* MAR-2785 (PP-A11Y-012): the empty state as a row inside the table body */
.pp-list__empty > td { padding:22px 16px; text-align:center; }
.pp-list__empty p { margin:0; }

/* MAR-2785 (PP-A11Y-010): 24px minimum tap targets for the pager and the
   status chips (the row-menu toggle's is on its rule above) */
.pp-list__pages > a, .pp-list__pages > span,
.pp-list__chips > a { min-width:24px; min-height:24px; box-sizing:border-box;
  display:inline-flex; align-items:center; justify-content:center; }

/* MAR-3075 — the Inbox's actions cell: the quick action beside its row ⋯
   menu, and the visually hidden "Actions" column header. */
.pp-inbox__acts { display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.pp-inbox__vh { position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; border:0; }

/* MAR-3081 — the CoPs list (RFC-023 P2): a visually hidden column header,
   and "More filters" reading "Fewer filters" while its disclosure is open. */
.pp-list__vh { position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; border:0; }
.pp-list__more[open] .pp-list__more-off,
.pp-list__more:not([open]) .pp-list__more-on { display:none; }
