/* Wallet actions: top-up, withdrawal, exchange and history, as nested steps of one sheet. */
.w-back { flex: none; margin-left: -6px; }
.w-back[hidden] { display: none; }
.w-title-wrap { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.w-title-wrap .sheet-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-body.w-step > * { flex: none; }

/* Choosing an asset or a network */
.w-label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--hint); margin-bottom: -8px; }
.w-find { width: 100%; font-size: 16px; text-align: left; }
.w-list { margin-top: -6px; }
.w-list .market-name { flex: 1 1 0; }
.w-list .asset-right { max-width: 52%; }
.w-list .asset-right b { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.w-row-sub { display: flex; align-items: center; gap: 5px; min-width: 0; }
.market-name .w-row-sub span { overflow: hidden; text-overflow: ellipsis; }
.market-name .w-row-sub .tag { font-style: normal; flex: none; height: 17px; padding-inline: 5px; border-radius: 6px; font-size: 11px; line-height: 15px; }

/* The asset an action is about */
.w-asset { display: flex; align-items: center; gap: 10px; min-width: 0; }
.w-asset .market-name { flex: 1 1 0; }
.w-asset .asset-right { max-width: 52%; }

.w-usd { font-variant-numeric: tabular-nums; }
.w-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.w-chip { height: 36px; border-radius: 12px; background: var(--fill); font-size: 14px; line-height: 18px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); transition: transform .4s var(--spring), background-color .15s ease; }
.w-chip:active { transform: scale(.95); transition-duration: .1s; }

.field-box input.w-addr { font-size: 15px; font-weight: 500; letter-spacing: 0; }
.w-error { font-size: 13px; line-height: 17px; color: var(--red); }
.w-error[hidden] { display: none; }

/* Exchange */
.w-swap { position: relative; display: flex; flex-direction: column; gap: 6px; }
.w-card { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: var(--r-field); background: var(--fill); min-width: 0; }
.w-card:focus-within { outline: 2.5px solid var(--accent); outline-offset: 1px; }
.w-card-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; line-height: 17px; color: var(--hint); }
.w-card-top b { font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.w-card-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.w-token { flex: none; display: flex; align-items: center; gap: 7px; max-width: 54%; height: 40px; padding: 0 8px 0 4px; margin-left: -4px; border-radius: 20px; background: var(--card); color: var(--text); transition: transform .4s var(--spring); }
.w-token:active { transform: scale(.96); transition-duration: .1s; }
.w-token b { min-width: 0; font-size: 16px; line-height: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-token .icon { flex: none; color: var(--hint); }
.w-amt, .w-recv { flex: 1; min-width: 0; width: 100%; font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -.02em; text-align: right; font-variant-numeric: tabular-nums; }
.w-amt { height: 40px; border: 0; background: none; outline: none; padding: 0; color: var(--text); user-select: text; -webkit-user-select: text; }
.w-recv { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.w-recv.is-empty { color: var(--hint); }
/* The cards leave room where the button sits, so a long balance never runs under it. */
.w-from { padding-bottom: 20px; }
.w-to { padding-top: 20px; }
.w-flip { position: absolute; left: 50%; top: 50%; z-index: 1; width: 36px; height: 36px; margin: -18px 0 0 -18px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--card); color: var(--link); box-shadow: 0 0 0 3px var(--card); transition: scale .4s var(--spring); }
.w-flip:active { scale: .9; transition-duration: .1s; }
.w-flip span { display: flex; transition: transform .5s var(--spring); }

/* History */
.w-filter .seg-btn { font-size: 13px; }
.w-log { display: flex; flex-direction: column; gap: 14px; }
.w-day { display: flex; flex-direction: column; gap: 6px; }
.w-day-name { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--hint); }
.w-tx { min-height: 58px; --sep-left: 62px; gap: 10px; }
.w-tx .cell-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.w-tx-title { font-size: 15px; line-height: 20px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.w-tx-time { font-size: 13px; line-height: 17px; color: var(--hint); font-variant-numeric: tabular-nums; }
.w-tx-right { flex: none; max-width: 56%; display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.w-tx-amount { max-width: 100%; font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-tx-sub { max-width: 100%; font-size: 13px; line-height: 17px; color: var(--hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-is-up { color: var(--green); }
.w-is-down { color: var(--red); }
.w-is-flat { color: var(--text); }
.w-detail-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 4px; text-align: center; }
.w-detail-hero b { max-width: 100%; font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.w-detail-hero span.w-detail-title { font-size: 14px; line-height: 19px; color: var(--hint); }
.w-rows { padding: 14px 16px; }
.w-rows .summary-row > b { min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.w-copy { display: inline-flex; align-items: center; gap: 5px; min-width: 0; font: inherit; font-weight: 500; color: var(--link); }
.w-copy span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.w-copy .icon { flex: none; }
.w-note { text-align: center; font-size: 15px; line-height: 20px; color: var(--hint); }
.w-empty { padding-block: 26px; }

@container app (max-width: 350px) {
  .w-chip { font-size: 13px; }
  .w-amt, .w-recv { font-size: 19px; }
  .w-filter .seg-btn { font-size: 12px; }
  .w-tx-title, .w-tx-amount { font-size: 14px; }
  .w-step ~ .sheet-dock .swipe-text { font-size: 14px; }
}
