/* transactions screens: rules beyond src/ui/style.css. */

/* the account buttons in the header (BFE-TX-19): 36 px discs with a border, 40 px wide targets
   so four sit beside the title on a 375 px phone (Nicolas, 2026-10-28); the chosen one ringed */
.toolslot { display: flex; flex: none; margin-right: -2px; }
.toolslot[hidden] { display: none; }
.acctbtns { display: flex; }
.acctbtn { flex: none; width: 40px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.acctbtn .disc { box-sizing: border-box; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--panel); border: 1.5px solid color-mix(in srgb, var(--rule-strong) 82%, var(--fg)); }
.acctbtns .acctbtn .disc[class*="h-"] { background: var(--panel); }
.acctbtn .disc svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acctbtn .disc img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
/* ringed in the account's colour: the legend of the rows' badges and edges (BFE-TX-7) */
.acctbtn .disc[class*="ring-"] { border-color: var(--mark); }
.acctbtns .acctbtn.on .disc { border: 2.5px solid var(--accent); background: var(--accent-bg); }
.acctbtn:focus-visible { outline: none; }
.acctbtn:focus-visible .disc { outline: 2px solid var(--accent); outline-offset: 2px; }
/* beside them the iPhone's back button is `‹` only (BFE-BCK-2) */
.back.bare { padding: 0 4px; }
/* and the mock's Voorbeeldgegevens (BFE-MOCK-5) takes two lines, so nothing runs off the phone */
body.phone .bar:has(.toolslot:not([hidden])) h1 { min-width: 0; }
body.phone .bar:has(.toolslot:not([hidden])) .sample { white-space: normal; hyphens: auto; -webkit-hyphens: auto; max-width: 7.5em; text-align: center; line-height: 1.2; }

/* above the list: the search field and the filters */
.txpanel { padding-top: 2px; }
.txpanel .chips { margin: 8px 0 6px; }
.txpanel button.chip span[aria-hidden] { color: inherit; opacity: 0.7; }
/* a filter as a small chip (BFE-TX-15): its text, a chevron, and the select unseen over it */
.txpanel .chip.pick { position: relative; max-width: 12em; }
.txpanel .chip.pick .pickv { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.txpanel .chip.pick::after { content: ''; flex: none; width: 5px; height: 5px; margin: -3px 1px 0 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: 0.6; }
/* 16px: iOS zooms into a smaller field it focuses */
.txpanel .chip.pick select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; cursor: pointer; appearance: none; -webkit-appearance: none; }
.txpanel .chip.pick:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
/* the field's own ✕ (BFE-TX-14), the browsers' hidden so there is one everywhere */
.txpanel .search input { padding-right: 44px; }
.txpanel .search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.txpanel .clearq { position: absolute; top: 0; right: 0; width: 44px; height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.txpanel .clearq svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.txpanel .clearall svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.txhead.pinned .txpanel { padding: 0 0 2px; }
.txinfo { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txinfo .balance { color: var(--fg); font-size: 15px; }
.txinfo.tap { cursor: pointer; }
.findbtn, .donebtn { flex: none; min-height: 36px; }
/* back to today (BFE-TX-18): in the bar beside Filter or Klaar, while needed */
.todaybtn { flex: none; min-height: 36px; color: var(--accent); font-weight: 600; }
/* the month's end (BFE-TX-23): where Vandaag stands, while it does not */
.txmonthend { flex: none; white-space: nowrap; }
.txmonthend .balance { color: var(--fg); font-size: 15px; }
.txmonthend[hidden] { display: none; }

/* the list: the name with its paperclip and pending tag on one line */
.txrows .tx .cp { display: flex; align-items: center; gap: 6px; min-width: 0; }
.txrows .tx .cp > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.txrows .tx .cp .tag { flex: none; }
.txrows .tx .clip { flex: none; display: inline-flex; }
.txrows .tx.own .d1 { color: var(--faint); }
.txrows .tx .amt { flex: none; text-align: right; }
/* the account a row is on, in a list of several (BFE-TX-7; Nicolas, 2026-10-30): under the
   amount, in the second line's empty end so the row is no taller and every amount stands at
   one height; its button's picture with its colour down the row's left edge, or its name */
.txrows .tx .amtcol { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
/* a name gets the room of `− 99.99` at least, so the same under 0.01 as under 99.99, and of the
   amount above it, sign included, at most (Nicolas, 2026-10-30): the column is the wider of the
   two and the name fills it */
.txrows .tx .amtcol::after { content: '− 99.99'; font-weight: 600; height: 0; margin-top: -2px; overflow: hidden; visibility: hidden; white-space: nowrap; }
.txrows .tx .acctname { box-sizing: border-box; width: 0; min-width: 100%; font-size: 12px; line-height: 20px; color: var(--muted); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* a green amount's pill reaches 8 px further left than its figures: that room is not the name's
   (the future's amount holds its pill one level down, `comingAmount`) */
.txrows .tx .amtcol:has(> .amt.pos, > .amt > .amt.pos)::after { padding-left: 8px; }
.txrows .tx .amtcol:has(> .amt.pos, > .amt > .amt.pos) > .acctname { padding-left: 8px; }
.txrows .tx .acctmark { display: inline-flex; }
.txrows .tx .acctmark .disc { box-sizing: border-box; width: 20px; height: 20px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--panel); border: 1.5px solid var(--mark, var(--rule-strong)); }
.txrows .tx .acctmark .disc svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.txrows .tx .acctmark .disc img { width: 100%; height: 100%; object-fit: cover; display: block; }
.txrows .tx[data-edge] { box-shadow: inset 3px 0 0 var(--mark); }
/* an account's colour (`shortcutHue`), for its button's ring, a row's badge and edge */
.ring-blue, .tx[data-edge="blue"] { --mark: var(--h-blue-fg); }
.ring-slate, .tx[data-edge="slate"] { --mark: var(--h-slate-fg); }
.ring-indigo, .tx[data-edge="indigo"] { --mark: var(--h-indigo-fg); }
.ring-violet, .tx[data-edge="violet"] { --mark: var(--h-violet-fg); }
.ring-pink, .tx[data-edge="pink"] { --mark: var(--h-pink-fg); }
.ring-orange, .tx[data-edge="orange"] { --mark: var(--h-orange-fg); }
.ring-yellow, .tx[data-edge="yellow"] { --mark: var(--h-yellow-fg); }
.ring-cyan, .tx[data-edge="cyan"] { --mark: var(--h-cyan-fg); }
.ring-teal, .tx[data-edge="teal"] { --mark: var(--h-teal-fg); }
.ring-green, .tx[data-edge="green"] { --mark: var(--h-green-fg); }
.ring-sand, .tx[data-edge="sand"] { --mark: var(--h-sand-fg); }
.ring-grey, .tx[data-edge="grey"] { --mark: var(--h-grey-fg); }
.txrows .gapline { position: relative; }
.sentinel { min-height: 1px; }
.sentinel.top:empty { height: 1px; }
.txend .failed { margin: 10px 14px; }
.txend .endline { border-top: 0; }

/* the future above Transacties (BFE-TX-17): in amber, not the past's blue-grey, so it reads as
   the future at a glance (Nicolas, 2026-10-24); the line to the past */
.txfuture .tx { background: color-mix(in srgb, var(--surface) 88%, var(--amber-mark)); }
.txfuture .day { background: var(--amber-bg); color: var(--amber-fg); box-shadow: inset 4px 0 0 var(--amber-mark); }
.txfuture .day .when { font-weight: 400; font-style: italic; }
.txfuture .failed { margin: 10px 14px; }
.nowline { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 14px; font-size: 12.5px; color: var(--accent); background: var(--accent-bg); border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent); }
.nowline b { font-size: 13.5px; letter-spacing: 0.04em; text-transform: uppercase; }

/* the far end of the future (src/ui/farFuture.js): a tall picture with its own colours, as a
   photo has, dimmed a little in the dark; the date under it, just above what is expected */
.farend { text-align: center; padding-bottom: 12px; border-bottom: 1px solid var(--rule); background: var(--surface); }
.farend svg { display: block; width: 100%; height: auto; }
.farend .farnote { margin: 12px 16px 2px; font-weight: 600; color: var(--fg); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .farend svg { filter: brightness(0.82) saturate(0.9); }
}
:root[data-theme="dark"] .farend svg { filter: brightness(0.82) saturate(0.9); }

/* an opened row */
.txdetail .facts { margin: 0 0 6px; overflow-wrap: anywhere; }
.txdetail .catline { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.txdetail .catline select.chip { max-width: 100%; }
.txdetail .ruleline { margin-top: 8px; }
/* 16px: below it iOS zooms the page when the field is focused. */
.txdetail .ruleword { font-size: 16px; min-width: 0; }
.txdetail .rulemsg:empty { display: none; }
.txdetail .rulemsg { margin-top: 6px; }
.txdetail .teaser .btn { flex: none; }

/* the overview of the selection */
.txsum .sumrow .who { min-width: 0; }
.txsum .sumrow .who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 699px) {
  .txdetail .teaser { flex-wrap: wrap; }
}
