/* money-receipts.css: the Receipts tab of the Expenses room (public/tools/money-receipts.js, mockups approved 2026-11-22).
   Builds on money-books.css (mw-t, mw-chip, mw-tb, mw-pg, mw-drawer, mw-dr-*) and money-expenses.css (ex-kpis, ex-kv). Tokens only, so both
   themes follow; borders, not shadows. On a phone the table stacks into cards (the same markup, no second render). */

.rc-t td { height: auto; padding-top: var(--s-2); padding-bottom: var(--s-2); }
.rc-thumb { display: grid; place-items: center; width: 36px; height: 46px; border-radius: var(--r-sm); border: 1px solid var(--border-subtle); background: var(--surface-2); overflow: hidden; color: var(--ink-3); }
.rc-thumb img, .rc-big img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rc-t .rc-c-who, .rc-t .rc-c-read { min-width: 140px; max-width: 300px; }
.rc-t .rc-c-who b, .rc-t .rc-c-read b { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-t .rc-sb { white-space: normal; }
.rc-t .rc-amt { display: inline; font-weight: 700; color: var(--ink-2); }
.rc-t .rc-c-status { min-width: 220px; max-width: 380px; }
.rc-why { display: block; margin-top: 3px; font-size: var(--text-xs); line-height: 1.4; color: var(--ink-2); }
.mw-chip.rc-st.bad { background: var(--danger-soft); color: var(--danger-ink); }
.rc-t .rc-c-amt { display: none; }
.rc-t .rc-c-go { width: 24px; color: var(--ink-3); }

/* the drawer */
.rc-chips, .rc-btns, .rc-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-chips { margin-top: var(--s-2); }
.rc-flags:empty { display: none; }
.rc-big { display: grid; place-items: center; width: 100%; max-height: 420px; aspect-ratio: 3 / 4; border-radius: var(--r-md); background: var(--surface-3); overflow: hidden; color: var(--ink-3); }
.rc-big img { object-fit: contain; }
.rc-big.none { aspect-ratio: auto; min-height: 120px; gap: var(--s-2); font-size: var(--text-sm); }
.rc-ab { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s-3); padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); font-size: var(--text-sm); line-height: 1.5; }
.rc-ab > div { flex: 1 1 200px; }
.rc-ab .ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-full); background: var(--surface); }
.rc-ab.warn { background: var(--warn-soft); border-color: var(--warn); color: var(--warn-ink); }
.rc-ab.info { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.rc-ab.info .ic { color: var(--accent-ink); }
.rc-line { display: grid; gap: 2px; padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); font-size: var(--text-sm); }
.rc-warn-t { color: var(--warn-ink); font-weight: 600; }
.rc-fuel { display: flex; align-items: flex-start; gap: 6px; }
.rc-cands { display: grid; }
.rc-cand { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 44px; padding: var(--s-2) 0; border-bottom: 1px solid var(--border-subtle); }
.rc-cand:last-child { border-bottom: 0; }
.rc-cand-m { display: grid; gap: 2px; min-width: 0; font-size: var(--text-sm); overflow-wrap: anywhere; }
.rc-hand-q { width: 100%; max-width: none; }
.rc-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.rc-hist li { display: flex; gap: var(--s-3); }
.rc-hist .dt { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: var(--r-full); border: 2px solid var(--brand-mint); }
.rc-hist .t1 { font-size: var(--text-sm); font-weight: 650; }
.rc-hist .t2 { font-size: var(--text-xs); color: var(--ink-3); }
.rc-grow { flex: 1; }
.rc-dr-f { flex-wrap: wrap; }

/* a phone (mockup 05): the search, the filters and one card per receipt (photo, store and total, sender and time, status); no KPI strip */
@media (max-width: 640px) {
  .rc-kpis { display: none; }
  .rc-t thead { display: none; }
  .rc-t, .rc-t tbody { display: block; }
  .rc-t tbody tr[data-i] { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 2px var(--s-3); margin: var(--s-2); padding: var(--s-3); border: 1px solid var(--border-subtle); border-radius: var(--r-md); background: var(--surface); }
  .rc-t tbody tr[data-i] td { display: block; height: auto; min-width: 0; max-width: none; padding: 0; border: 0; background: transparent; }
  .rc-t .rc-c-photo { grid-column: 1; grid-row: 1 / span 3; }
  .rc-t .rc-thumb { width: 64px; height: 80px; }
  .rc-t .rc-c-read { grid-column: 2; grid-row: 1; }
  .rc-t .rc-c-amt { display: block; grid-column: 3; grid-row: 1; font-size: var(--text-md); font-weight: 750; }
  .rc-t .rc-c-who { grid-column: 2 / span 2; grid-row: 2; color: var(--ink-3); font-size: var(--text-sm); }
  .rc-t .rc-c-who b, .rc-t .rc-c-who .sb { display: inline; font-weight: 500; font-size: inherit; color: inherit; white-space: normal; }
  .rc-t .rc-c-who .sb::before { content: ", "; }
  .rc-t .rc-c-status { grid-column: 2 / span 2; grid-row: 3; }
  .rc-t .rc-c-read .rc-sb, .rc-t .rc-why, .rc-t .rc-c-kind, .rc-t .rc-c-go { display: none; }
  .rc-btns .ds-btn, .rc-cand .ds-btn, .mw-dr-f .ds-btn { min-height: 44px; }
}
