/* pay.html — "Send payout" (mirrors the reference /launch). Kit: nett.css. Page-only styles here. */

/* the reference's launch card is a touch lighter than the base surfaces: form #1A1A1A,
   preview column #222, fields and boxes #232323, fields inside a box #2C2C2C. */
.pay {
  --pay-card: #1A1A1A;
  --pay-aside: #222222;
  --pay-field: #232323;
  --pay-field-in: #2C2C2C;
  --pay-raised: #2A2A2A;
  --pay-line: rgba(255, 255, 255, 0.1);
}

.pay-head .nt-headcard__end { align-self: flex-start; padding-top: 6px; }

/* ---- the big two-column card ------------------------------------------------ */
.pay-card { border-color: rgba(255, 255, 255, 0.09); border-radius: 30px; background: var(--pay-card); }
.pay-card .nt-formcard__main { gap: 22px; padding: 36px 36px 40px; }
.pay-card .nt-formcard__aside { gap: 36px; padding: 40px; background: var(--pay-aside); }
.pay-card .nt-formcard__head { min-height: 36px; margin-bottom: 2px; }

.pay-card .nt-input,
.pay-card .nt-select select { background-color: var(--pay-field); border-color: rgba(255, 255, 255, 0.08); }
.pay-card .nt-input:hover,
.pay-card .nt-select select:hover { border-color: var(--nt-border-strong); }
.pay-card .nt-select option { background: var(--pay-field); }
.pay-card .nt-field__help { font-size: 12px; line-height: 1.5; }

.pay-title { display: flex; align-items: center; gap: 12px; min-width: 0; }

/* Mode pills: Single is this form; Batch carries "Soon" and does nothing; API opens the Developers console
   (the API takes up to 50 payouts per call). */
.pay-tabs { gap: 2px; }
.pay-tabs .nt-pilltab { height: 36px; gap: 6px; padding: 0 14px; font-size: 14px; color: var(--nt-muted); cursor: default; }
.pay-tabs .nt-pilltab.is-active { background: var(--nt-inverse-bg); color: var(--nt-inverse-fg); font-weight: var(--nt-w-medium); }
.pay-tabs__soon { opacity: 0.75; }
.pay-tabs__soon:hover { color: var(--nt-muted); }
.pay-tabs__soon .nt-tag { height: 18px; padding: 0 6px; font-size: 9px; }
.pay-tabs .pay-tabs__link { gap: 4px; color: var(--nt-text-2); text-decoration: none; cursor: pointer; }
.pay-tabs .pay-tabs__link:hover { background: rgba(255, 255, 255, 0.05); color: var(--nt-text-strong); }
.pay-tabs__link > .nt-arrow { font-size: 13px; line-height: 1; transition: transform var(--nt-d-hover) var(--nt-ease); }
.pay-tabs__link:hover > .nt-arrow { transform: translateX(2px); }
@media (prefers-reduced-motion: reduce) { .pay-tabs__link > .nt-arrow { transition: none; } }

/* A hairline box with its label inside ("Launch currency" / "Deployer reward"). The fieldset's
   legend is floated so it sits inside the box like the Amount label, not on the border. */
.pay-box { padding: 12px 16px 16px; border: 1px solid var(--pay-line); border-radius: 16px; background: var(--pay-field); }
.pay-box--field { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; }
.pay-box .nt-input { background-color: var(--pay-field-in); }
.pay-box > .nt-field__help { margin-top: 0; }
fieldset.pay-box { padding-top: 16px; }
fieldset.pay-box > legend { float: left; width: 100%; margin: 0 0 12px; padding: 0; line-height: 1.35; }
fieldset.pay-box > legend + * { clear: both; margin-top: 0; }

/* Funding: block logo pills, the checked one is white. USDC on Solana is bridged to USDG by Relay first. */
.pay-fund { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.pay-fund .nt-lpill__in { gap: 10px; padding: 0 12px; font-size: 14px; --nt-coin-ring: var(--pay-field); cursor: pointer; }
.pay-fund .nt-lpill > input:checked + .nt-lpill__in { --nt-coin-ring: #FFFFFF; }
.pay-fund .nt-lpill:hover .nt-lpill__in { background: rgba(255, 255, 255, 0.03); }
.pay-fund .nt-lpill > input:checked + .nt-lpill__in:hover { background: var(--nt-inverse-bg); }
.pay-fund .nt-lpill > input:disabled + .nt-lpill__in { opacity: 1; cursor: default; }
.pay-fund .pay-fund__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Wallet strip (real, inside the funding box): address + balances, then what is missing.
   Reserved height so the signed-out, loading and ready states swap in place. */
.pay-wallet { display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: center; column-gap: 10px; min-height: 58px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.pay-wallet__ico { display: inline-grid; place-items: center; align-self: start; height: 20px; color: var(--nt-muted); }
.pay-wallet__ico > svg { width: 16px; height: 16px; }
.pay-wallet__body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; min-width: 0; }
.pay-wallet[data-state="out"] .pay-wallet__ico,
.pay-wallet[data-state="nowallet"] .pay-wallet__ico,
.pay-wallet[data-state="error"] .pay-wallet__ico { align-self: center; }
.pay-wallet__out { margin: 0; font-size: 13px; line-height: 1.45; color: var(--nt-text-2); }
.pay-wallet__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; width: 100%; min-height: 20px; }
.pay-wallet__addr { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.pay-wallet__code { font-family: var(--nt-font-mono); font-size: 12px; color: var(--nt-text-strong); white-space: nowrap; }
.pay-wallet__addr .nt-copy { --nt-copy-h: 22px; height: 22px; min-width: 0; padding: 0 8px; font-size: 11px; }
.pay-wallet__pick select { height: 26px; padding: 0 28px 0 10px; border-radius: 8px; font-family: var(--nt-font-mono); font-size: 12px; }
.pay-wallet__link { padding: 0; border: 0; background: none; font: inherit; font-size: 12px; color: var(--nt-muted); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.25); text-underline-offset: 3px; cursor: pointer; }
.pay-wallet__link:hover { color: var(--nt-text-strong); text-decoration-color: currentColor; }
.pay-wallet__bal { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--nt-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pay-wallet__bal b { font-weight: var(--nt-w-medium); color: var(--nt-text-strong); }
.pay-wallet__need { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 18px; margin: 0; font-size: 12px; line-height: 1.5; color: var(--nt-muted); }
.pay-wallet__need > svg { flex: none; width: 14px; height: 14px; color: var(--nt-text-2); }
.pay-wallet__need.is-short { color: var(--nt-text-strong); }
.pay-need__x { flex: none; font-weight: var(--nt-w-medium); }
.pay-wallet__acts { display: inline-flex; align-items: center; gap: 14px; }
.pay-skel { height: 12px; }
.pay-skel--addr { width: 132px; }
.pay-skel--bal { width: 150px; }
.pay-skel--need { width: 170px; height: 10px; }

/* ---- X Money sent to: the handle, its lookup, and the X id when nett does not know it -- */
.pay-combo { position: relative; }
.pay-combo__lead { position: absolute; left: 14px; top: 50%; z-index: 1; display: inline-grid; place-items: center; width: 24px; height: 24px; margin-top: -12px; color: var(--nt-muted); pointer-events: none; }
.pay-combo__lead > svg { width: 16px; height: 16px; }
.pay-combo__lead .nt-avatar { --nt-av-size: 24px; position: relative; overflow: hidden; }
.pay-combo__lead .nt-avatar > img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.pay-combo__input { padding-left: 46px; padding-right: 44px; }
.pay-combo__end { position: absolute; right: 14px; top: 50%; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-top: -9px; color: var(--nt-text-strong); pointer-events: none; }
.pay-combo__end > svg { width: 16px; height: 16px; }
.pay-combo__end.is-looking::after { content: ""; width: 14px; height: 14px; border: 1.5px solid rgba(255, 255, 255, 0.14); border-top-color: var(--nt-signal); border-radius: 50%; animation: nt-spin 900ms linear infinite; }
.pay-combo__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 312px;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--pay-line);
  border-radius: 14px;
  background: var(--pay-raised);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.pay-combo__opt { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 10px; border-radius: 10px; font-size: 14px; color: var(--nt-text); cursor: pointer; }
.pay-combo__opt .nt-avatar { --nt-av-size: 30px; }
.pay-combo__opt b { font-weight: var(--nt-w-bold); color: var(--nt-text-strong); }
.pay-combo__opt span:last-child { margin-left: auto; font-size: 12px; color: var(--nt-muted); }
.pay-combo__opt:hover, .pay-combo__opt[aria-selected="true"] { background: rgba(255, 255, 255, 0.07); }
.pay-to__note { min-height: 18px; overflow-wrap: anywhere; }
.pay-to__note.is-found { color: var(--nt-text-2); }
.pay-to__note.is-error { font-weight: var(--nt-w-medium); color: var(--nt-text-strong); }
.pay-to__note.is-error::before { content: "\00D7\00A0"; }
.pay-to__retry { padding: 0; border: 0; background: none; font: inherit; color: var(--nt-text-strong); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.35); text-underline-offset: 3px; cursor: pointer; }
.pay-xid { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; padding: 14px 16px 16px; border: 1px solid var(--pay-line); border-radius: 16px; background: var(--pay-field); }
.pay-xid .nt-input { background-color: var(--pay-field-in); font-family: var(--nt-font-mono); font-size: 14px; font-variant-numeric: tabular-nums; }
.pay-xid .nt-field__help { margin-top: -2px; }

/* Amount: "$ 25.00 USDG" */
.pay-amt .nt-input { padding-left: 32px; font-variant-numeric: tabular-nums; }
.pay-amt__cur { position: absolute; left: 16px; top: 0; bottom: 0; display: flex; align-items: center; font-size: var(--nt-fs-body); color: var(--nt-muted); pointer-events: none; }

/* ---- the rest: deadline + max fee, submit, result -------------------------------- */
.pay-rest { display: flex; flex-direction: column; gap: 20px; }
.pay-rule { height: 1px; margin: 2px 0; background: rgba(255, 255, 255, 0.08); }
.pay-cover { min-height: 18px; margin-top: -8px; }
.pay-cover b { font-weight: var(--nt-w-medium); color: var(--nt-text-strong); }
.pay-submit { height: 48px; margin-top: 4px; }
.pay-submit[aria-busy="true"] { cursor: progress; }
.pay-upgrade { margin-top: 4px; }
.pay-upgrade .nt-notice { min-height: 48px; }

/* While a send runs (or once it is done), the form is frozen but keeps its look. */
.pay-form.is-running :is(.nt-input, .nt-select select):disabled { opacity: 1; color: var(--nt-text-2); cursor: default; }

/* The payout exists: receipt, explorer links, send another. */
.pay-done { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; padding: 18px; border: 1px solid var(--pay-line); border-radius: 18px; background: var(--pay-field); }
.pay-done:focus { outline: none; }
.pay-done__head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pay-done__seal { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--nt-text-strong); color: var(--nt-inverse-fg); }
.pay-done__seal > svg { width: 18px; height: 18px; }
.pay-done__title { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin: 0; font-size: 13px; line-height: 1.4; color: var(--nt-muted); }
.pay-done__title b { font-size: 16px; font-weight: var(--nt-w-medium); color: var(--nt-text-strong); overflow-wrap: anywhere; }
.pay-done__links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.pay-done__links[hidden] { display: none; }
.pay-done__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pay-done__actions > * { flex: 1 1 180px; }

/* A bridge from Solana that was refunded, failed or is still running: what happened, with its links. */
.pay-bridge { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; padding: 16px 18px; border: 1px solid var(--pay-line); border-radius: 18px; background: var(--pay-field); }
.pay-bridge[hidden] { display: none; }
.pay-bridge__title { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin: 0; font-size: 13px; line-height: 1.45; color: var(--nt-muted); }
.pay-bridge__title b { font-size: 15px; font-weight: var(--nt-w-medium); color: var(--nt-text-strong); }

/* Demo: the simulated run. */
.pay-run { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.pay-run[hidden] { display: none; }
.pay-run__bar { position: relative; height: 3px; overflow: hidden; border-radius: 9999px; background: rgba(255, 255, 255, 0.1); }
.pay-run__bar > span { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--nt-text-strong); transition: width 600ms var(--nt-ease); }
.pay-run__line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--nt-text-strong); }
.pay-run__step { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.pay-run__step > svg { width: 16px; height: 16px; color: var(--nt-good); }
.pay-run__time { font-family: var(--nt-font-mono); font-size: 12px; color: var(--nt-muted); }
.pay-run__done { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.pay-run__done > * { flex: 1 1 180px; }

/* ---- preview column: notification + payout card -------------------------------- */
.pay-notif { padding: 12px 14px; border-color: var(--pay-line); background: var(--pay-raised); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3); }
.pay-notif .nt-notif__top > .nt-lg { --s: 28px; }
.pay-notif .nt-notif__top > svg { align-self: flex-start; width: 14px; height: 14px; }
.pay-notif .nt-notif__text { font-size: 14px; }
.pay-notif .nt-notif__time { margin-top: -6px; }
.pay-notif.is-in { animation: pay-in 420ms var(--nt-ease-out) both; }
@keyframes pay-in { from { opacity: 0; transform: translateY(-10px) scale(0.98); } to { opacity: 1; transform: none; } }

.pay-rcpt { display: flex; flex-direction: column; min-width: 0; padding: 16px; border: 1px solid var(--pay-line); border-radius: 24px; background: var(--pay-raised); }
.pay-rcpt__art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 345 / 236;
  border-radius: 16px;
  background: var(--nt-art, #323232);
  overflow: hidden;
  transition: background 300ms var(--nt-ease);
}
.pay-rcpt__art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); pointer-events: none; }
/* No recipient yet: a quiet neutral mesh with a placeholder pill, so it reads as a draft card. */
.pay-rcpt__art.is-empty {
  background:
    radial-gradient(circle at 22% 16%, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 55%),
    radial-gradient(circle at 88% 96%, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 50%),
    linear-gradient(155deg, #333333 0%, #282828 55%, #1F1F1F 100%);
}
.pay-rcpt__art.is-empty .pay-rcpt__pill { font-weight: var(--nt-w-medium); color: var(--nt-muted); }
.pay-rcpt__art.is-empty .nt-avatar { background: rgba(255, 255, 255, 0.12); }
.pay-rcpt__deadline { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 9999px; background: rgba(10, 10, 10, 0.72); font-size: 12px; font-weight: var(--nt-w-medium); color: var(--nt-text-strong); white-space: nowrap; }
.pay-rcpt__pill { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 20px); height: 34px; padding: 0 14px 0 5px; border-radius: 9999px; background: rgba(10, 10, 10, 0.78); font-size: 13px; font-weight: var(--nt-w-bold); color: var(--nt-text-strong); white-space: nowrap; }
.pay-rcpt__pill > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pay-rcpt__name { display: flex; align-items: baseline; gap: 8px; min-width: 0; margin-top: 16px; font-size: 15px; color: var(--nt-text-strong); }
.pay-rcpt__name > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-rcpt__id { flex: none; font-family: var(--nt-font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--nt-muted); }
.pay-rcpt__stats { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
.pay-rcpt__stats > span { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.pay-rcpt__stats b { font-size: 16px; font-weight: var(--nt-w-bold); color: var(--nt-text-strong); font-variant-numeric: tabular-nums; }
.pay-rcpt__stats small { font-size: 11px; color: var(--nt-muted); }
.pay-rcpt__kv { margin-top: 16px; }
.pay-rcpt__kv .nt-kv__row { min-height: 40px; border-top: 1px solid rgba(255, 255, 255, 0.08); border-bottom: 0; }
.pay-rcpt__kv .nt-kv__row > dt { font-size: 13px; color: #A6A6A6; }
.pay-rcpt__kv .nt-kv__row > dd { font-size: 13px; font-weight: var(--nt-w-bold); font-variant-numeric: tabular-nums; }
.pay-rcpt__note { margin: 0; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 12px; line-height: 1.5; color: var(--nt-muted); }
.pay-k-sub { margin-left: 4px; color: var(--nt-muted); }
.pay-k-sym { font-weight: var(--nt-w-regular); color: var(--nt-muted); }
.pay-route { display: inline-flex; align-items: center; gap: 6px; }
.pay-route .nt-lg { --s: 18px; }
.pay-route > span:last-child { margin-left: 2px; }

/* ---- below 1280: the card stacks; the preview turns sideways (art | facts) -------- */
/* The two-column card needs room: below 1280 it stacks (the kit splits at 1100). */
@media (min-width: 1100px) { .pay-card { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1280px) { .pay-card { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
@media (min-width: 1280px) and (max-width: 1439px) { .pay-fund .nt-lpill__in { gap: 8px; padding: 0 10px; font-size: 13px; } }
@media (min-width: 640px) and (max-width: 1279px) {
  .pay-card .nt-formcard__aside { gap: 20px; }
  .pay-rcpt { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); grid-template-rows: auto auto auto 1fr; column-gap: 24px; }
  .pay-rcpt > :not(.pay-rcpt__art) { grid-column: 2; }
  .pay-rcpt__art { grid-column: 1; grid-row: 1 / span 4; align-self: stretch; aspect-ratio: auto; min-height: 220px; }
  .pay-rcpt__name { margin-top: 2px; }
}
@media (max-width: 767px) {
  .pay-head .nt-headcard__end { padding-top: 0; }
  .pay-card { border-radius: 24px; }
  .pay-card .nt-formcard__main { gap: 20px; padding: 24px 16px 24px; }
  .pay-card .nt-formcard__aside { gap: 20px; padding: 20px 16px 24px; }
  .pay-card .nt-formcard__title { font-size: 24px; }
  .pay-rest .nt-formcard__row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pay-tabs .nt-pilltab { height: 34px; padding: 0 11px; }
  .pay-box { padding-inline: 14px; }
  .pay-xid { padding-inline: 14px; }
  .pay-rcpt { border-radius: 20px; padding: 14px; }
  .pay-rcpt__art { aspect-ratio: 16 / 9; }
}
@media (max-width: 400px) {
  .pay-card .nt-formcard__head { gap: 12px; }
  .pay-tabs .nt-pilltab { padding: 0 9px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .pay-notif.is-in { animation: none; }
  .pay-run__bar > span, .pay-rcpt__art { transition: none; }
  .pay-combo__end.is-looking::after { animation: none; border-color: var(--nt-signal); }
}
