/* Transactions (ui/transactions.js). Page rules only: the tokens and the shared parts (buttons, tables, menus, dialogs, status words, the empty list) live in app.css.
   Every class here carries the tx- prefix, so another page's stylesheet never meets it. Wave's look (V, 11 Oct 2026): the account bar is a white bordered card with a grid
   icon, "All accounts" and the combined balance at the right; a toolbar of pills over the list; a plain table; "Load More Transactions" under it. Motion: press feedback .97 in
   140ms on the pills, hover only where a pointer can hover, the account list opens in 150ms from its corner (app.css .menu), nothing animates on a keyboard action, reduced
   motion is handled in app.css. */

/* ---- Page frame: about 1040px wide, as the other Wave lists ---- */
.tx-w{width:100%;max-width:1040px;min-width:0}

/* ---- The account bar ---- */
.tx-bar{padding:0;gap:0}
.tx-bar-wrap{display:block;width:100%}
.tx-bar-btn{display:flex;align-items:center;gap:12px;width:100%;min-height:64px;padding:12px 20px;border-radius:var(--radius);text-align:left;color:var(--text-primary);transition:background 120ms var(--ease)}
.tx-bar-btn:active{background:var(--accent-soft)}
@media (hover:hover) and (pointer:fine){.tx-bar-btn:hover{background:var(--bg-panel-2)}}
.tx-bar-btn .icon{flex:none;color:var(--accent)}
.tx-bar-name{flex:1 1 auto;min-width:0;font-weight:700;overflow-wrap:anywhere}
.tx-bar-bal{flex:none;font-size:var(--type-l);font-weight:700;font-variant-numeric:tabular-nums}
.tx-bar-btn .caret{flex:none;color:var(--text-secondary);transition:transform 140ms var(--ease-out)}
.tx-bar-btn[aria-expanded=true] .caret{transform:rotate(180deg)}
.tx-through{padding:8px 20px 14px 52px;font-size:var(--type-xs);color:var(--text-tertiary)}   /* clear of the bar button's focus ring above it */
.tx-acct-menu{min-width:min(420px,100%);max-width:100%;max-height:min(640px,calc(100dvh - 140px))}
.menu .item.tx-it{justify-content:space-between;gap:16px}
.tx-group{list-style:none;margin:0;padding:0}   /* a group inside the account list: no bullets and no indent of its own */
.tx-it-n{min-width:0;overflow-wrap:anywhere}
.tx-it-b{flex:none;font-variant-numeric:tabular-nums;color:var(--text-secondary)}
.menu .item.tx-it[aria-checked=true]{background:var(--accent-soft);font-weight:700}
.menu .item.tx-it[aria-checked=true] .tx-it-b{color:var(--text-primary)}

/* ---- The toolbar: Filter, Sort, Search transactions ---- */
.tx-panel{gap:16px}
.tx-tools{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 12px;background:var(--grey-bg);border-radius:var(--radius-sm)}
.tx-filter{display:inline-flex;align-items:center;gap:8px}
.tx-fcount{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--accent);color:var(--on-accent);font-size:var(--type-2xs);font-weight:700;font-variant-numeric:tabular-nums}
.tx-search{position:relative;flex:1 1 240px;min-width:0}
.tx-search input{padding-right:40px}
.tx-search .tx-search-ico{position:absolute;right:12px;top:50%;margin-top:-9px;color:var(--text-secondary);pointer-events:none}

/* ---- The table ---- */
.tx-table{table-layout:auto}
.tx-table td.tx-date{white-space:nowrap}
.tx-table td.tx-desc{color:var(--text-primary)}
.tx-d{display:block;font-weight:600;overflow-wrap:anywhere}
.tx-table td.text{overflow-wrap:anywhere}
.tx-table td.tx-amt{font-weight:600;color:var(--text-primary);font-variant-numeric:tabular-nums;white-space:nowrap}
.tx-table td.tx-uncat{color:var(--text-secondary)}
.tx-void{margin-top:4px}
@media (hover:hover) and (pointer:fine){.tx-table tbody tr{cursor:pointer}}
@media (min-width:960px){
  .tx-table th.text{padding-right:16px}
  .tx-table td.text{padding-right:16px}
  .tx-table td.name{padding-right:16px;max-width:320px}
  .tx-table th.state,.tx-table td.state{padding-left:16px;padding-right:16px}
}
.tx-act-ph{display:inline-block;flex:none;width:32px;height:32px}
@media (max-width:959px){
  .tx-table td.act{grid-column:1 / -1;width:auto;text-align:right}
  .tx-table td.act .act-cell{justify-content:flex-end}
  .tx-act-ph{display:none}
}

/* ---- The foot: how many, and Load More Transactions ---- */
.tx-foot{display:flex;flex-direction:column;align-items:center;gap:12px;padding-top:4px}
.tx-count{color:var(--text-secondary);font-size:var(--type-s);font-variant-numeric:tabular-nums}
.tx-skipped{padding-top:4px}

/* ---- The Filter dialog ---- */
.tx-types{display:flex;flex-direction:column;gap:6px;border:0;padding:0;min-width:0}
.tx-types .lbl{font-size:var(--type-xs);font-weight:700;color:var(--text-secondary);padding:0;margin-bottom:2px}
.tx-check{display:flex;align-items:center;gap:10px;min-height:32px;font-weight:600}
.tx-check input{flex:none;width:22px;height:22px;min-height:0;padding:0;accent-color:var(--accent)}

/* ---- The detail view: the facts, then every line of the entry ---- */
.tx-facts{display:grid;grid-template-columns:minmax(0,max-content) minmax(0,1fr);gap:8px 20px;align-items:baseline}
.tx-facts dt{font-size:var(--type-xs);font-weight:700;color:var(--text-secondary)}
.tx-facts dd{min-width:0;overflow-wrap:anywhere;white-space:pre-wrap}
.tx-lines-wrap{min-width:0;overflow-x:auto}
.tx-lines{width:100%;border-collapse:collapse}
.tx-lines th{padding:0 8px 8px 0;border-bottom:1px solid var(--divider);font-size:var(--type-2xs);font-weight:700;letter-spacing:.04em;text-transform:uppercase;text-align:left;color:var(--text-secondary);white-space:nowrap}
.tx-lines td{padding:10px 8px 10px 0;border-bottom:1px solid var(--divider);vertical-align:top;color:var(--text-secondary)}
.tx-lines th.num,.tx-lines td.num{padding-right:0;padding-left:8px;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.tx-lines td.name{color:var(--text-primary);overflow-wrap:anywhere}
.tx-lines td .sub{display:block;font-size:var(--type-xs);color:var(--text-tertiary)}
.tx-lines tfoot td{font-weight:700;color:var(--text-primary);border-bottom:0}
@media (max-width:359px){
  .tx-facts{grid-template-columns:minmax(0,1fr)}
  .tx-facts dd{margin-bottom:6px}
}
