/* Dashboard and sales reports: Needs attention, the sales chart, the report tables. */

/* Dashboard > Needs attention: a line per thing to deal with, each a link, with a dot for how urgent it is. The colour
   isn't the only cue: the line says "out of stock" or "running low" in words. */
.attention-line:hover,
.attention-line:focus-visible {
  background-color: var(--bs-tertiary-bg);
}

.attention-line:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: -3px;
}

.attention-dot {
  flex-shrink: 0;
  width: .6rem;
  height: .6rem;
  border-radius: 50%;
}

.attention-danger { background-color: var(--bs-danger); }
.attention-warning { background-color: var(--chart-3); }

/* Sales chart */
.sales-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-grid {
  stroke: var(--bs-border-color);
  stroke-dasharray: 3 4;
}

.chart-label {
  fill: var(--bs-secondary-color);
  font-size: 11px;
}

.chart-bar {
  fill: var(--chart-1-fill);
  transition: fill .15s ease;
}

.chart-bar.today {
  fill: var(--chart-1);
}

.chart-bar:hover {
  fill: var(--chart-1-strong);
}

.chart-hit {
  fill: transparent;
}

g:hover > .chart-bar {
  fill: var(--chart-1-strong);
}

.chart-line {
  fill: none;
  stroke: var(--chart-compare);
  stroke-width: 2;
  stroke-dasharray: 5 4;
  pointer-events: none;
}

.chart-dot {
  fill: var(--chart-compare);
  pointer-events: none;
}

.legend-swatch {
  display: inline-block;
  width: .75rem;
  height: .75rem;
  border-radius: .2rem;
  vertical-align: -1px;
}

.legend-current {
  background-color: var(--chart-1-fill);
}

.legend-previous {
  border-top: 2px dashed var(--chart-compare);
  height: 0;
  border-radius: 0;
  vertical-align: 3px;
}

/* Sales report */
.share-bar {
  height: 6px;
}

.payment-stack {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background-color: var(--bs-secondary-bg);
}

.payment-stack > span:nth-child(1), .payment-dot-0 { background-color: var(--chart-1); }
.payment-stack > span:nth-child(2), .payment-dot-1 { background-color: var(--chart-2); }
.payment-stack > span:nth-child(3), .payment-dot-2 { background-color: var(--chart-3); }
.payment-stack > span:nth-child(4), .payment-dot-3 { background-color: var(--chart-4); }

.report-table tfoot td {
  font-weight: 600;
  background-color: var(--bs-tertiary-bg);
}

.report-table td, .report-table th {
  white-space: nowrap;
}

.payment-dot {
  display: inline-block;
  width: .6rem;
  height: .6rem;
  border-radius: 50%;
}

.kpi-change {
  font-size: .75rem;
  font-weight: 600;
}
