/* Payment and money journey components. Base layout and controls live in base.css. */

.balance-overview {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.balance-overview > .muted,
.review-amount > .muted,
.qr-payment > .muted {
  font-size: 13px;
  line-height: 1.5;
}

.flow-progress {
  display: flex;
  gap: 7px;
  width: 112px;
  margin-bottom: 26px;
}

.flow-progress span {
  height: 3px;
  flex: 1;
  border-radius: 3px;
  background: var(--line);
}

.flow-progress span.is-active { background: var(--accent); }

.recipient-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  margin-bottom: 24px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.recipient-card > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.recipient-card strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.recipient-card small {
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.recipient-card > svg:last-child {
  margin-left: auto;
  color: var(--accent-hover);
  flex: 0 0 auto;
}

.recipient-card .avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border-radius: 50%;
  background: #8d47ef18;
  color: #c7a5ff;
  font-size: 12px;
  font-weight: 600;
}

.amount-field { gap: 12px; }

.amount-field .input-wrap {
  height: 96px;
  padding: 14px 20px;
  gap: 12px;
  align-items: center;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--bg);
  transition: border-color 160ms ease;
}

.amount-field .input-wrap:focus-within { border-color: var(--accent); }

.amount-prefix {
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.3;
}

.amount-field .amount-input {
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
  font-family: Sora, Inter, sans-serif;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 500;
  letter-spacing: -1.6px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.amount-field .amount-input:focus { box-shadow: none; border: 0; }

.summary-list {
  margin: 0;
  width: 100%;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 22px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
  line-height: 1.6;
}

.summary-row:first-child { padding-top: 0; }
.summary-row:last-child { border-bottom: 0; }
.summary-row dt { color: var(--muted); }

.summary-row dd {
  margin: 0;
  max-width: 63%;
  color: var(--text);
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.summary-row.summary-total {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  padding-top: 21px;
  padding-bottom: 21px;
}

.summary-total dt { color: var(--soft); font-weight: 500; }
.summary-total dd { font-size: 19px; font-weight: 600; letter-spacing: -.5px; }

.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  margin: 20px 0;
  background: #8d47ef09;
  border: 1px solid #8d47ef20;
  border-radius: 12px;
}

.notice > svg { flex: 0 0 auto; margin-top: 1px; color: var(--accent-hover); }
.notice strong { display: block; font-size: 12px; line-height: 1.6; font-weight: 600; }
.notice p { margin: 4px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.stack > .notice { margin: 0; }
.notice + .flow-progress { margin-top: 28px; }

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  margin-top: 5px;
  border-top: 1px solid var(--line);
}

.form-actions .back-button { padding-left: 0; }
.form-actions > .button-primary { margin-left: auto; }

.review-amount {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 26px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.review-amount .balance { line-height: 1.2; }

.pin-group {
  display: flex;
  gap: 12px;
  width: min(100%, 290px);
}

.pin-group .pin-input {
  flex: 1 1 0;
  min-width: 0;
  width: 0;
  height: 64px;
  padding: 0;
  text-align: center;
  font-size: 24px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.pin-group .pin-input:focus { border-color: var(--accent); }

.card-art {
  width: 100%;
  max-width: 510px;
  margin: 0 auto 24px;
}

.card-art img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 15px;
}

.screen-content[data-section="cards"] > .grid-2 { align-items: start; }
.card-art + .row { margin-bottom: 24px; gap: 12px; }
.card-art + .row strong { font-size: 13px; font-weight: 500; }
.card-art + .row .muted { font-size: 12px; letter-spacing: 1px; }

.action-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--accent-hover);
  background: #8d47ef12;
}

.action-card > strong { font-size: 14px; font-weight: 600; }
.action-card > .muted { font-size: 12px; line-height: 1.6; }
.action-card > svg:last-child { color: var(--muted); }

.list-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  color: var(--soft);
  background: var(--surface-raised);
}

.list-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
  text-align: left;
  margin-right: auto;
}

.list-copy strong { font-size: 13px; font-weight: 500; line-height: 1.5; }
.list-copy small { font-size: 11px; line-height: 1.5; color: var(--muted); }

.list-value {
  display: grid;
  gap: 5px;
  flex: 0 0 auto;
  margin-left: 10px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.list-value strong { font-size: 13px; font-weight: 500; white-space: nowrap; }
.list-value small { font-size: 10px; color: var(--muted); }

.qr-payment {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 9px 0 26px;
  text-align: center;
}

.qr-payment > strong { font-size: 13px; letter-spacing: .6px; font-weight: 500; }
.qr-payment > .balance { font-size: clamp(29px, 4vw, 38px); }

.qr-placeholder {
  display: grid;
  place-items: center;
  width: min(100%, 240px);
  aspect-ratio: 1;
  padding: 16px;
  margin: 0 auto;
  border: 1px solid #fff;
  border-radius: 17px;
  background: #fff;
  overflow: hidden;
}

.qr-placeholder img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.address-box {
  padding: 16px 18px;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.address-box > .muted { font-size: 11px; }
.address-box .row { margin-top: 6px; gap: 12px; }
.address-box strong { font-size: 13px; line-height: 1.6; letter-spacing: .3px; overflow-wrap: anywhere; }
.address-box .icon-button { width: 36px; height: 36px; min-height: 36px; padding: 8px; flex: 0 0 36px; }

.scan-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
  max-width: 520px;
  min-height: 290px;
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  padding: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, #14111c, #09080d);
}

.scan-corners {
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  color: var(--accent-hover);
  border: 1px solid #8d47ef35;
  border-radius: 18px;
}

.scan-preview > .muted { font-size: 12px; }

.timeline {
  display: grid;
  gap: 0;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 84px;
  padding: 0 0 26px 38px;
  color: var(--muted);
}

.timeline li:last-child { min-height: 0; padding-bottom: 0; }

.timeline li::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 0;
  z-index: 1;
  width: 16px;
  height: 16px;
  border: 1px solid var(--muted);
  border-radius: 50%;
  background: var(--surface);
}

.timeline li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 23px;
  bottom: 2px;
  left: 8px;
  width: 1px;
  background: var(--line);
}

.timeline li.is-complete::before { background: var(--success); border-color: var(--success); box-shadow: inset 0 0 0 4px var(--surface); }
.timeline li.is-active::before { border: 4px solid var(--accent); }
.timeline strong { font-size: 13px; line-height: 1.6; font-weight: 500; color: var(--text); }
.timeline span { font-size: 12px; line-height: 1.6; }

.success-view {
  width: 100%;
  max-width: 630px;
  margin: 0 auto;
  padding: 8px 0 20px;
  text-align: center;
}

.success-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 28px;
  border: 1px solid #63dba52c;
  border-radius: 50%;
  background: #63dba50e;
  color: var(--success);
}

.success-view .page-header { display: block; margin-bottom: 24px; }
.success-view .eyebrow { color: var(--success); }
.success-view .page-title { max-width: none; font-size: clamp(26px, 3vw, 33px); }
.success-view .lead { max-width: 430px; margin-left: auto; margin-right: auto; }

.success-amount {
  margin: 24px 0 28px;
  font-family: Sora, Inter, sans-serif;
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: -1.6px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.success-view .receipt { margin-bottom: 26px; text-align: left; }
.success-view > .button { display: flex; width: 100%; max-width: 390px; margin: 12px auto 0; }

@media (max-width: 640px) {
  .recipient-card { gap: 11px; padding: 14px; border-radius: 12px; }
  .recipient-card .avatar { width: 36px; height: 36px; flex-basis: 36px; font-size: 11px; }
  .recipient-card strong { font-size: 13px; }
  .recipient-card small { font-size: 11px; }
  .recipient-card > svg:last-child { width: 18px; height: 18px; }
  .flow-progress { margin-bottom: 22px; }
  .amount-field .input-wrap { padding: 14px 15px; height: 86px; gap: 9px; }
  .amount-prefix { font-size: 16px; }
  .amount-field .amount-input { font-size: 34px; letter-spacing: -1.4px; }
  .summary-row { gap: 16px; padding: 15px 0; font-size: 12px; }
  .summary-row dd { max-width: 62%; }
  .summary-total dd { font-size: 17px; }
  .notice { gap: 10px; padding: 14px; }
  .notice > svg { width: 18px; height: 18px; }
  .notice strong { font-size: 11px; }
  .notice p { font-size: 11px; }
  .form-actions { gap: 10px; padding-top: 21px; }
  .form-actions > .button-primary { flex: 1; justify-content: center; }
  .form-actions .back-button { padding-right: 4px; }
  .review-amount { padding-bottom: 22px; margin-bottom: 22px; }
  .pin-group { gap: 10px; width: min(100%, 270px); }
  .pin-group .pin-input { height: 60px; }
  .card-art { margin-bottom: 21px; }
  .card-art img { border-radius: 11px; }
  .list-icon { width: 36px; height: 36px; flex-basis: 36px; border-radius: 11px; }
  .list-copy strong { font-size: 12px; }
  .list-copy small { font-size: 10px; }
  .list-value { margin-left: 2px; }
  .list-value strong { font-size: 12px; }
  .list-value small { font-size: 9px; }
  .action-icon { width: 36px; height: 36px; }
  .action-card > strong { font-size: 13px; }
  .action-card > .muted { font-size: 11px; }
  .qr-payment { gap: 14px; }
  .qr-placeholder { width: min(100%, 222px); padding: 14px; border-radius: 14px; }
  .address-box { padding: 13px 14px; }
  .address-box strong { font-size: 12px; }
  .scan-preview { min-height: 270px; padding: 24px; border-radius: 14px; }
  .scan-corners { width: 140px; height: 140px; }
  .timeline li { padding-left: 32px; min-height: 82px; }
  .timeline strong { font-size: 12px; }
  .timeline span { font-size: 11px; }
  .success-view { padding-top: 4px; }
  .success-icon { width: 66px; height: 66px; margin-bottom: 24px; }
  .success-view .page-title { font-size: 27px; }
  .success-amount { margin: 22px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .amount-field .input-wrap { transition: none; }
}
