/* The banking module's own styling. It travels with the module - the package the core fetches
   from it consists of its frontend assembly and this file. What only its views need belongs
   here and not in the toolkit's paula.css: the toolkit delivers tools, never meaning. */

/* THE IMPORT LIST OF BANKING (2026-09-15) - a row per paper, and the sheets of one unfolded
   under it.

   The fold is a SIGN and not a speck: as a small ghost button it was eight pixels of text in a
   twelve-pixel box, and the owner of the page did not find it. It gets the size of a target one
   aims at, and a background that says it is one. */
.import-fold { width: 2.2rem; }

/* the icons of a row stay in one line (2026-09-20) - wrapped, the eye stood under the tick */
.import-does { white-space: nowrap; }

.import-folder
{
  width: 1.8rem;
  height: 1.8rem;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.import-folder:hover { background: var(--surface-3); border-color: var(--accent); }

/* a row that waits for somebody, and the sheets under one that is unfolded */
.row-open > td { background: var(--surface-2); }

.row-sheet > td
{
  padding-top: var(--s1);
  padding-bottom: var(--s1);
  font-size: 0.92em;
}

/* what a finding weighs, in the one column that says it */
.level-open { color: var(--err-fg); font-weight: 600; }
/* a hint of a row, not a problem (2026-09-20): its own muted orange - the wait brown of the
   chips read as brown, not as a warning */
.level-warning { color: #d9700a; }

/* THE YEAR GRID of an account: one row per year, one cell per statement number. Green where the
   paper is there and its arithmetic comes out, yellow where it does not, red where the paper is
   missing, pale where nothing is knowable - before the first paper of the stock and after the
   last (banking, 2026-09-15). */
.year-grid { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s4); }

.year-row { display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap; }

.year-name
{
    min-width: 4em; font-weight: 600; font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}

.year-cell
{
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2em; height: 1.6em; padding: 0 var(--s1);
    border-radius: var(--radius-sm); font-size: var(--fs-xs);
    font-variant-numeric: tabular-nums;
}

.year-ok      { background: var(--ok-bg);   color: var(--ok-fg); }
.year-off     { background: var(--wait-bg); color: var(--wait-fg); }
.year-missing { background: var(--err-bg);  color: var(--err-fg); font-weight: 700; }
.year-outside { background: var(--idle-bg); color: var(--idle-fg); opacity: .55; }

/* what the four colours mean - beside the grid, because a colour without a word is a riddle */
.year-legend { display: flex; flex-wrap: wrap; gap: var(--s4); font-size: var(--fs-xs); }
.year-legend span { display: inline-flex; align-items: center; gap: var(--s2); }
.year-legend .year-cell { min-width: 1.2em; height: 1.2em; }

/* the designation of an account while it is being renamed: the field fills its cell, and the
   cell stays as narrow as the name it holds - the sentence that explains it stands under the
   table (banking, 2026-09-15) */
.account-name { width: 22ch; }
.account-field { width: 100%; }

/* WHAT AN ACCOUNT IS AT THE BANK, in one column (2026-09-16): a masked card number, an IBAN in
   groups of four, or the account number with its sort code under it. One line stands in the size
   of the row; only the two lines of number and sort code are set a little smaller, so that they
   do not make the row taller than its neighbours. */
.account-mark { display: inline-block; line-height: 1.3; }
.account-mark:has(.account-code) { font-size: 0.9em; }
.account-code { display: block; }

/* THE SIGN OF AN IMPORT (2026-09-17) beside its sentence - the icon in the size of the text; the
   spinner of a working run turns, everything else stands */
.import-state { display: inline-flex; align-items: center; gap: 6px; }
.import-state .icon { --icon-size: 16px; }
.import-working .icon-drawing > svg { animation: import-spin 1s linear infinite; }

@keyframes import-spin { to { transform: rotate(360deg); } }

/* WHAT WENT WRONG AT THE BANK (2026-09-18): the bank's error lines in the FinTS check, in the
   colour of a problem - grey was overlooked */
.fints-problem { color: var(--err-fg); }

/* a raw parameter line of the bank: fixed width, wrapping wherever, never wider than the card */
.fints-raw { font-family: monospace; font-size: 0.85em; overflow-wrap: anywhere; }

/* ONE PAPER (2026-09-20, evening): the switch in the row of the list's buttons, aligned with them */
.import-single { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* THE RECOGNISED TEXT IN THE TRAIL OF A READING (2026-09-20): as it came, wrapped, and never
   taller than the dialog can hold */
.trail-text { white-space: pre-wrap; font-family: var(--mono); font-size: 0.85em; max-height: 40vh; overflow: auto; margin: 0 0 var(--s3); }

/* THE ACCESS DIALOG IN ROWS (2026-09-18): two fields side by side where they belong together,
   and a switch whose sentence gets the whole width beside its heading - squeezed into a column
   of a hundred pixels it read like a ransom note */
.access-form { align-items: stretch; }
.access-row { display: flex; flex-wrap: wrap; gap: var(--s3); }
.access-row .admin-field { flex: 1 1 240px; }
.access-switch { display: grid; grid-template-columns: 160px 1fr; gap: 8px; align-items: baseline; }
.access-switch > span { color: var(--muted-fg, inherit); }
.access-switch label { display: flex; gap: 8px; align-items: baseline; }

/* the details of the open import under its row (2026-10-03) */
.import-details { padding: 0.25rem 0; }

/* one line per house above the papers: its sender (2026-10-03) */
.import-sender { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0 0 0.5rem; padding: 0.35rem 0.6rem; background: var(--surface-2); border-radius: 6px; }
