/* Insights · Income versus spending: green money in, red money out, and the
   part of spending made on credit cards stacked on top of the red bar in blue
   (one bar per side, so overspending on cards is visible at a glance).
   Bars are a fifth of the month's width, capped at 26px. */
.cashflow-columns i {
  width: min(26px, 20%);
}

.cashflow-columns .income,
.chart-legend i.income {
  background: #23932f;
}

.cashflow-columns .expense,
.chart-legend i.expense {
  background: #d5260e;
}

.cashflow-columns i.expense {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cashflow-columns .expense-card,
.chart-legend i.expense-card {
  background: #315ee6;
}

.cashflow-columns .expense-card {
  display: block;
}

.cashflow-columns .expense-card {
  width: 100%;
  flex: 0 0 auto;
  /* A hairline between the card part and the cash part. */
  box-shadow: 0 1px 0 rgba(255, 255, 255, .55);
}

body[data-theme="midnight"] .cashflow-columns .expense-card,
body[data-theme="midnight"] .chart-legend i.expense-card {
  background: #6f8fff;
}

body[data-theme="midnight"] .cashflow-columns .expense-card {
  box-shadow: 0 1px 0 rgba(0, 0, 0, .45);
}
