/* WFSheetPicker (public/js/wf-sheet-picker.js) — native selects on the host screens become rows / fields that open a sheet.
   The sheet itself reuses the .wfap-* shell from address-picker.css. Theme tokens only. Shipping ON only (the JS never runs otherwise). */
select.wfsp-src, input.wfsp-src { display: none !important; }

/* row mode: bold uppercase label left, value right, chevron */
.wfsp-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 0 16px 0 18px; box-sizing: border-box; text-align: left; cursor: pointer; font: inherit;
  color: var(--white); background: var(--bg-raised); border: 1px solid var(--border); border-radius: 12px; transition: border-color .15s, background .15s; }
.wfsp-row:hover:not(:disabled) { border-color: var(--blue); }
.wfsp-row:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.wfsp-row:disabled { opacity: .55; cursor: not-allowed; }
.wfsp-lab { flex: none; font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--off-white); }
.wfsp-val { flex: 1; min-width: 0; text-align: right; font-size: 15px; font-weight: 600; color: var(--white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wfsp-val.is-ph { color: var(--muted); font-weight: 500; }
.wfsp-row .wfsp-chev { flex: none; color: var(--muted); }
/* the form label would repeat what the row already says */
.form-group.wfsp-has-row > label { display: none !important; }
.form-group.wfsp-has-row { margin: 0; container-type: inline-size; min-width: 0; }
/* a narrow cell (two rows side by side): the label sits over the value, the chevron stays on the right */
@container (max-width: 330px) {
  .wfsp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px; align-content: center; padding: 8px 14px 8px 16px; }
  .wfsp-row .wfsp-lab { grid-column: 1; grid-row: 1; font-size: 10.5px; }
  .wfsp-row .wfsp-val { grid-column: 1; grid-row: 2; text-align: left; font-size: 14.5px; }
  .wfsp-row .wfsp-chev { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}
#page-inv-add-2 .wfsp-row { min-height: 52px; }

/* the field mode is the .wfap-field of the place picker */
.wfsp-fld { min-height: 48px; min-width: 0; max-width: 100%; }
.wf-lr-who .wfsp-fld { min-height: 46px; padding: 0 10px 0 12px; font-size: 14px; border-radius: 10px; }
.lm-asg-add .wfsp-fld { flex: 1 1 160px; min-width: 0; min-height: 44px; }

/* spec lists: rows are full-width lines in the card, two to a line when the card is wide */
.simple-parsed-preview > .form-group.wfsp-has-row { grid-column: 1 / -1; }
#page-inv-add-2 .input-group > .form-group.wfsp-has-row { align-self: end; }

/* the sheet: a compact wide modal for a short list, the full width for a long one */
.wfsp-ov .wfap-sheet { width: min(760px, 100%); }
.wfsp-ov.wfsp-long .wfap-sheet { width: min(1040px, 100%); }
.wfsp-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.wfsp-card { align-items: center; min-height: 58px; padding: 12px 16px; }
.wfsp-card .wfap-main { gap: 2px; }
.wfsp-card.is-extra .wfap-ico { margin: 0 0 0 -4px; }
.wfsp-other { margin-top: 14px; }
.wfsp-ov .wfap-grid--lead { margin-bottom: 14px; }
.wfsp-ov .wfap-head, .wfsp-ov .wfap-search, .wfsp-inline .wfap-head, .wfsp-inline .wfap-search { flex: none; }
.wfsp-ov .wfap-grid--lead:empty { margin: 0; }
.wfsp-inline { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.wfsp-inline .wfap-sheet { width: auto; max-height: none; padding: 0 4px; border: 0; box-shadow: none; background: transparent; transform: none; border-radius: 0; flex: 1; min-height: 0; }
.wfsp-inline .wfap-head { align-items: center; justify-content: flex-start; gap: 14px; }
.wfsp-inline .wfap-head-t { flex: 1; min-width: 0; }
.wfsp-inline .wfap-body { max-height: none; flex: 1; min-height: 0; }
.wfsp-inline .wfap-grab { display: none; }
.modal.wfsp-picking > :not(.wfsp-inline) { display: none !important; }
.modal.wfsp-picking { display: flex; flex-direction: column; padding: 24px 28px; }
.wfsp-type { display: flex; flex-direction: column; gap: 12px; padding: 8px 0 4px; max-width: 520px; }
.wfsp-type-l { font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--off-white); }
.wfsp-type input { min-height: 52px; border-radius: 12px; font-size: 16px; padding: 0 16px; background: var(--bg-raised); border: 1px solid var(--border); color: var(--white); }
.wfsp-type-go { display: flex; gap: 10px; }
.wfsp-type-go .btn { min-height: 48px; }
@media (max-width: 720px) {
  .wfsp-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .wfsp-card { min-height: 54px; padding: 10px 14px; }
  .wfsp-card .wfap-name { font-size: 14.5px; }
  .modal.wfsp-picking { padding: 18px 16px; }
}

/* round 3c: Method in the Money rows (runner review + Money & Pricing) is a tap row: label over value, chevron right.
   Its grid cell (area) is set where the ledger rows are styled: css/shipping-host.css (runner review + Money & Pricing). */
.wf-ledger--edit .wfsp-method { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px; align-content: center; width: 100%; min-width: 0; min-height: 56px; padding: 8px 14px 8px 16px; box-sizing: border-box; align-self: stretch; }
.wf-ledger--edit .wfsp-method .wfsp-lab { grid-column: 1; grid-row: 1; font-size: 10.5px; }
.wf-ledger--edit .wfsp-method .wfsp-val { grid-column: 1; grid-row: 2; text-align: left; font-size: 14.5px; }
.wf-ledger--edit .wfsp-method .wfsp-chev { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
/* the Method sheet: a card label is long ("Amex Gold ••1234"), so on a phone it is one card per line */
@media (max-width: 720px) { .wfsp-methodsheet .wfsp-grid { grid-template-columns: minmax(0, 1fr); } }

/* a runner's Method sheet: two named groups */
.wfsp-group-h { margin: 10px 2px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.wfsp-group-h:first-child { margin-top: 2px; }
.wfsp-group-empty { margin: 0 0 8px; padding: 10px 2px; text-align: left; }

/* Card groups (cardsVsBills): a heading plus one plain line saying what the group means. */
/* every group heading is two lines: the name, then one plain sentence under it (same at every width) */
.wfsp-grouped .wfsp-group-h { display: block; margin: 18px 2px 10px; }
.wfsp-grouped .wfsp-group-h:first-child { margin-top: 2px; }
.wfsp-grouped .wfsp-group-sub { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
/* tiles in a row are one height, text centred the same way in each (a wrapped name no longer makes its neighbours uneven) */
.wfsp-grouped .wfsp-grid { align-items: stretch; grid-auto-rows: 1fr; }
.wfsp-grouped .wfsp-card { align-items: center; box-sizing: border-box; height: 100%; }
.wfsp-grouped .wfsp-card .wfap-main { justify-content: center; }
