/* payments.html — page layer on nett.css (v4). Mirrors the reference "Payments":
   totals header card, then Recent payments (2/3) | Top recipients (1/3). */

/* Totals header card: a faint 30-day line runs behind the two figures. */
.pm-totals { position: relative; overflow: hidden; isolation: isolate; padding-bottom: 50px; }
.pm-totals > .nt-total { position: relative; z-index: 1; }
.pm-totals .nt-total__value { margin-top: 14px; }   /* the reference: the figure sits a little lower under its label */
.pm-totals__spark {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 0;
  height: 30%;
  color: #5A5A5A;
  opacity: 0.6;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%, #000 78%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 34%, #000 78%, transparent 100%);
}
.pm-totals__spark .nt-spark { height: 100%; }
.pm-totals__spark .nt-spark__base { display: none; }

/* Recent payments | Top recipients (the reference: ~696 | ~378 at 1440, 40 apart).
   Each column is a 4-row grid: 1 title · pills · pager | 2 pills (narrow) | 3 search chip | 4 rows.
   From 1024 the two columns share those rows (subgrid), so their first cards always line up.
   The split is the size container (a subgrid can't be one: containment would cut it loose). */
.pm-split { margin-top: 54px; container: pmsplit / inline-size; }
.pm-sec {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto auto;
  align-items: center;
  row-gap: 0;
  column-gap: 16px;
  min-width: 0;
}
.pm-sec__title { grid-area: 1 / 1 / 2 / 2; min-height: 36px; display: flex; align-items: center; white-space: nowrap; }
.pm-sec__pager { grid-area: 1 / 3 / 2 / 4; justify-self: end; margin-right: -6px; }
.pm-sec__list, .pm-sec > noscript { grid-area: 4 / 1 / 5 / -1; align-self: start; margin-top: 16px; }
/* Until payments.js fills them, both lists hold the height of their six rows, so the footer
   never shows on the first paint only to jump away. */
#pm-rows:empty, #pm-trows:empty { min-height: 560px; }
@media (min-width: 1024px) {
  .pm-split { grid-template-columns: minmax(0, 11fr) minmax(0, 6fr); grid-template-rows: auto auto auto auto; row-gap: 0; }
  .pm-sec { grid-row: 1 / span 4; grid-template-rows: subgrid; }
  /* Side by side, the page ends right under these lists: Recent payments keeps the room of its
     six rows even when fewer come back (the network's first days), so the footer stays put. */
  #pm-rows, #pm-rows:empty, #pm-trows:empty { min-height: 565px; }
}

/* Funding pills sit beside the title ("Off-ramp  All Deposits Swaps ACH");
   in a narrow column they take their own line under it. */
.pm-filters { grid-area: 1 / 2 / 2 / 3; justify-self: start; min-width: 0; max-width: 100%; }
.pm-filters .nt-pilltab > svg { width: 16px; height: 16px; }
.pm-filters .nt-pilltab .nt-lg { --s: 18px; }
.pm-filters .nt-pilltab:focus-visible { outline-offset: -2px; }
@container pmsplit (max-width: 660px) {
  .pm-filters { grid-area: 2 / 1 / 3 / -1; margin: 12px 0 0 -2px; padding-right: 24px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
}
/* 1024–1180: the left column is too narrow for title + pills + pager on one line. */
@media (min-width: 1024px) {
  @container pmsplit (max-width: 1000px) {
    .pm-filters { grid-area: 2 / 1 / 3 / -1; margin: 12px 0 0 -2px; }
  }
}
.pm-filters { overflow-x: auto; scrollbar-width: none; scroll-padding-inline: 16px; }
.pm-filters::-webkit-scrollbar { display: none; }
/* "via X Money": names the badge on each Top recipients avatar (logos README). */
.pm-via { grid-area: 1 / 2 / 2 / 3; justify-self: start; font-size: var(--nt-fs-small); color: var(--nt-muted); white-space: nowrap; }
@media (min-width: 1024px) { @container pmsplit (max-width: 1080px) { .pm-via { display: none; } } }
@container pmsplit (max-width: 340px) {
  .pm-filters { gap: 2px; }
  .pm-filters .nt-pilltab { padding-inline: 9px; font-size: 13px; }
}

/* Search chip ("@wren_studio ×"), from the top-bar search or a Top recipients row. */
.pm-query { grid-area: 3 / 1 / 4 / -1; margin-top: 14px; }
.pm-qchip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  height: 32px;
  padding: 0 10px 0 5px;
  border-radius: var(--nt-r-pill);
  background: var(--nt-surface-2);
  font-size: var(--nt-fs-ui);
  font-weight: var(--nt-w-medium);
  color: var(--nt-text-strong);
  text-decoration: none;
  transition: background-color var(--nt-d-hover) var(--nt-ease);
}
.pm-qchip > span:not(.nt-avatar) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-qchip > svg { color: var(--nt-muted); }
.pm-qchip > svg:first-child { margin-left: 5px; }
.pm-qchip:hover { background: var(--nt-surface-3); }
.pm-qchip:hover > svg:last-child { color: var(--nt-text-strong); }

/* Empty filter / search result: one quiet card in the row style. */
.pm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 168px;
  padding: 28px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--nt-r-row);
  background: var(--nt-surface);
  font-size: var(--nt-fs-ui);
  color: var(--nt-muted);
  text-align: center;
}
.pm-empty b { color: var(--nt-text-strong); font-weight: var(--nt-w-bold); }
.pm-empty .nt-link { font-size: var(--nt-fs-small); }

/* Top recipients in a narrow right column (1024–1360): a tighter pair keeps "61 payouts" whole. */
@media (min-width: 1024px) {
  @container pmsplit (max-width: 1000px) {
    .pm-top .nt-trow { gap: 10px; }
    .pm-top .nt-trow__pair { gap: 6px; }
    .pm-top .nt-trow__pair .nt-avatar { --nt-av-size: 36px; }
  }
}

@media (max-width: 767px) {
  .pm-split { margin-top: 44px; }
  .pm-totals { padding-bottom: 32px; }
  .pm-totals .nt-total__value { margin-top: 8px; }
  .pm-totals__spark { height: 18%; }
}

/* ---- Real mode (payments.js) ------------------------------------------------------------ */
/* "Demo data" chip, top right of the totals card (demo mode only; nett.data fills it). */
.pm-demochip { position: absolute; top: 16px; right: 16px; z-index: 2; }
/* USDC on Solana is not live yet: a quiet pill with its "Soon" tag, no filter behind it. */
.pm-soon { cursor: default; color: var(--nt-muted); }
.pm-soon:hover { color: var(--nt-muted); }
.pm-soon .nt-lg { opacity: 0.55; }
.pm-soon .nt-tag { height: 18px; margin-left: 2px; padding: 0 6px; font-size: 9px; }
/* Empty and error states inside the row card: the kit's bare empty state. */
.pm-empty .nt-empty--bare { padding: 0; gap: 12px; }
/* No payouts at all: the card keeps the height of the six rows it stands in for, so the page
   does not jump when the (empty) answer arrives. */
@media (min-width: 768px) { .pm-empty:has(.nt-empty) { min-height: 560px; } }
/* The network upgrade: the calm notice, centred in the card (no card in a card). */
.pm-empty--notice .nt-notice { padding: 0; border: 0; background: none; }
@media (min-width: 768px) { .pm-empty--notice { min-height: 560px; } }
.pm-tempty { list-style: none; }
/* Top recipients beside an empty, upgrade or error state: the same quiet card, as tall as the
   one on the left where the two columns sit side by side. */
.pm-tempty > .nt-empty { min-height: 168px; border-radius: var(--nt-r-row); }
@media (min-width: 1024px) { .pm-tempty > .nt-empty { min-height: 560px; } }
