/* Statementer custom styles */
body {
  font-size: 0.9rem;
}

.navbar-brand {
  font-size: 1.1rem;
}

.table-sm td, .table-sm th {
  padding: 0.3rem 0.5rem;
}

.badge-confidence-high {
  background-color: #198754;
}

.badge-confidence-low {
  background-color: #dc3545;
}

.row-duplicate {
  background-color: #fff5f5 !important;
}

.dt-button {
  font-size: 0.85rem;
}

.select2-container {
  width: 100% !important;
}

/* Allow Select2 dropdown to overflow table container */
.dataTables_wrapper {
  overflow: visible !important;
}
#transactionsTable {
  overflow: visible !important;
}

/* Filter row in thead — compact controls */
#filter-row th {
  padding: 0.2rem 0.3rem;
  background-color: var(--bs-light);
}

#filter-row input.form-control,
#filter-row select.form-select {
  font-size: 0.8rem;
  padding: 0.15rem 0.3rem;
  height: auto;
}

#filter-row .btn {
  font-size: 0.8rem;
  padding: 0.15rem 0.3rem;
  line-height: 1;
}

/* Filter dropdowns (Bootstrap Dropdown + checkboxes) */
#filter-row .filter-dd-btn {
  font-size: 0.8rem;
  padding: 0.15rem 0.4rem;
  line-height: 1.4;
}

.filter-dd-menu {
  min-width: 220px;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
}

.filter-dd-item {
  cursor: pointer;
  user-select: none;
}

.filter-dd-item:hover {
  background-color: var(--bs-light);
}

/* DT auto-applies row-reverse flex and text-align:right to date columns — fix both */
#transactionsTable th.dt-type-date,
#transactionsTable td.dt-type-date {
  text-align: left;
}
#transactionsTable th.dt-type-date .dt-column-header {
  flex-direction: row;
}

/* Row and header checkboxes — larger click target */
#transactionsTable .row-checkbox,
#select-all {
  width: 1.8em;
  height: 1.8em;
  cursor: pointer;
}

/* ── Sticky thead ─────────────────────────────── */
/* Sticky on the thead element itself — both rows stick as one block, no inter-row seam */
#transactionsTable thead {
  position: sticky;
  top: 0;
  z-index: 3;
  background-color: #fff;
}

/* Light-grey when scrolled past (matches table-secondary footer row) */
#transactionsTable thead.is-sticky {
  background-color: #e2e3e5;
}

/* Cells transparent so thead background shows uniformly (no gap between rows) */
#transactionsTable thead.is-sticky th {
  background-color: transparent !important;
  border-color: #e2e3e5;
}

#transactionsTable thead.is-sticky tr:first-child th {
  border-bottom: none;
}

/* Inline form fixed-width columns */
.inline-date-col    { min-width: 130px; }
.inline-amount-col  { min-width: 110px; }
.inline-project-col { min-width: 140px; }
