/* Money screens, Home, and the widgets in src/widgets. Builds on style.css (tokens, cards, lists). */

/* Transactions: rows */
.tx-row.pending .tx-title { font-style: italic; }
.tx-row.pending .tx-amount { color: var(--muted); }
.tx-amount-transfer { color: var(--muted); font-weight: 500; }
.tx-icon-transfer { color: var(--accent); background: var(--accent-soft); }
.tx-icon-lg { width: 52px; height: 52px; border-radius: 14px; font-size: 1.5rem; }
.tx-route { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tag-project { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.pill-transfer { background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 80%, var(--text)); }
.pill-split { background: var(--surface-2); color: var(--text); }
.pill-needs { background: color-mix(in srgb, var(--warn) 20%, transparent); color: color-mix(in srgb, var(--warn) 70%, var(--text)); }

/* Transactions: filters */
.filters { align-items: center; }
.chip-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; font-size: 0.72rem; font-weight: 700;
  background: color-mix(in srgb, var(--warn) 24%, var(--surface)); color: var(--text);
}
.chip.active .chip-count { background: var(--bg); color: var(--text); }
select.chip-select { max-width: 60vw; text-overflow: ellipsis; background-color: var(--surface); color: var(--text); }
select.chip-select.active { background-color: var(--text); color: var(--bg); border-color: var(--text); }

/* Transaction sheet */
.detail-amount.transfer { color: var(--muted); }
.detail-amount.negative { color: var(--bad); }
.facts dd { min-width: 0; overflow-wrap: anywhere; }
.capitalise { text-transform: capitalize; }
.split-summary { display: flex; flex-direction: column; gap: 6px; }
.split-summary .row { justify-content: flex-start; gap: 10px; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.section-row h3 { margin: 0; }
.section-row .segmented button { padding: 5px 14px; }
.splits { display: flex; flex-direction: column; gap: 8px; }
.split-row { display: flex; align-items: center; gap: 8px; }
.split-row select { flex: 1; min-width: 0; }
.split-amount { width: 124px; flex: none; }
.split-row .icon-btn { min-width: 36px; flex: none; }
.split-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.split-ok { color: var(--good); }
.split-left { color: var(--warn); }
.split-over { color: var(--bad); }
.list-emoji { width: 34px; height: 34px; flex: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); font-size: 1.05rem; }
.link:disabled { opacity: 0.5; cursor: default; }

/* Notes */
.notes { gap: 8px; }
.notes > h3 { margin-bottom: 0; }
.note-list { display: flex; flex-direction: column; gap: 8px; }
.note { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.note-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.95rem; }
.note-meta { display: flex; align-items: center; gap: 4px; }
.note-meta .link { padding: 2px 6px; }
.note .form textarea { background: var(--surface); }
.note-add { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.note-add textarea { min-height: 52px; }

/* Overview */
.attention {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); color: var(--text);
  background: color-mix(in srgb, var(--warn) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--border));
}
.attention-icon { font-size: 1.3rem; width: 28px; text-align: center; flex: none; }
.net-line { padding: 0 4px; }
a.budget-row { color: var(--text); }
.budget-row.static { cursor: default; }
.hero .row { gap: 8px; }

/* Accounts */
.account-line { min-height: 60px; }
.account-line .right { font-size: 1rem; }
.account-line.pot { padding-left: 34px; background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.account-line.pot .account-icon { width: 28px; height: 28px; font-size: 0.95rem; }
.account-icon { width: 36px; height: 36px; flex: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); font-size: 1.15rem; }
.tucked summary { padding: 4px 2px 10px; }
.account-summary { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.account-summary .detail-amount { margin: 4px 0 0; }
.suggestion { display: flex; flex-direction: column; gap: 10px; }
.suggestion-amount { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.suggestion-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.suggestion-sides > div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .suggestion-sides { grid-template-columns: 1fr; }
}

/* Home */
.home-money { color: var(--text); }
.home-money .hero-amount { margin-top: 2px; }
.food-hint { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-style: dashed; box-shadow: none; background: transparent; }
.family-strip { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--text); }
.avatars { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.avatars .avatar { width: 30px; height: 30px; font-size: 0.85rem; }

@media (min-width: 900px) {
  .accounts { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
  .account-card { min-width: 180px; }
}
.attention.calm { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); }

/* Sheets scroll their body: don't let cards with hidden overflow shrink to nothing in it. */
.sheet-body > * { flex-shrink: 0; }

/* Category picker: a grid per group. */
.cat-group { display: flex; flex-direction: column; gap: 6px; }
.cat-group + .cat-group { margin-top: 6px; }
.cat-group-head { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.category-foot { align-items: center; flex-wrap: wrap; }
.postings-details { margin-top: 8px; }
.postings-details > summary { font-size: 0.9rem; padding: 6px 2px; }
.postings .list-row { gap: 10px; }

/* Accounts */
.unreconciled { color: var(--warn); font-weight: 600; }
.account-summary + .notice { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
