/*
 * Transaction-history panel (CASINO-FEATURE-BACKLOG EPIC 6: wallet). Synthwave design tokens only
 * (no hard-coded colors); reuses .card from styles.css for the outer shell. Credit = --win (neon
 * teal/green), debit = --lose (red). Touch targets are >= var(--touch) (44px). No overflow at 360/390.
 */

/* ---- filter chips (role=tablist) ---- */
.tx-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-3);
}
.tx-chip {
  min-height: var(--touch);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--fg-dim);
  font-size: var(--fs-sm);
  font-weight: var(--fw-med);
  cursor: pointer;
  white-space: nowrap;
}
.tx-chip:hover { border-color: var(--line-3); color: var(--fg); }
.tx-chip.is-active {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--fg);
}
.tx-chip:focus-visible { outline: none; box-shadow: var(--ring); }

/* ---- status line (aria-live) ---- */
.tx-status {
  font-size: var(--fs-sm);
  color: var(--muted);
  min-height: 1.2em;
  margin: 0 0 var(--sp-2);
}

/* ---- the list ---- */
.tx-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.tx-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  min-height: var(--touch);
}
.tx-row:hover { border-color: var(--line-2); }

.tx-ico {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
}
.tx-ico-credit { color: var(--win); background: var(--win-soft); }
.tx-ico-debit  { color: var(--lose); background: var(--lose-soft); }

.tx-main {
  flex: 1 1 auto;
  min-width: 0; /* allow ellipsis; prevents overflow at 360px */
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tx-desc {
  color: var(--fg);
  font-weight: var(--fw-semi);
  font-size: var(--fs-md, 14px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tx-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-1) var(--sp-2);
  color: var(--muted);
  font-size: var(--fs-xs);
}
.tx-when { white-space: nowrap; }
.tx-ref {
  font-family: var(--font-mono, ui-monospace, monospace);
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tx-amt {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-bold);
  font-size: var(--fs-md, 14px);
  white-space: nowrap;
  text-align: right;
}
.tx-amt.is-credit { color: var(--win); }
.tx-amt.is-debit  { color: var(--lose); }

/* ---- empty state + load more ---- */
.tx-empty {
  color: var(--muted);
  font-size: var(--fs-sm);
  text-align: center;
  padding: var(--sp-6) var(--sp-3);
}
.tx-more {
  margin: var(--sp-3) auto 0;
  display: block;
  min-height: var(--touch);
}

/* .hidden { display: none !important; } — provided by the shared styles/03-layout-forms.css (loaded first); not redefined here. */

/* ---- responsive: 360 / 390 phones (0 overflow) ---- */
@media (max-width: 420px) {
  .tx-row { gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); }
  .tx-ico { width: 32px; height: 32px; }
  .tx-ref { max-width: 10ch; }
  .tx-chip { padding: 8px 12px; }
}
