/* The insights screen; the tiles, charts, and bar list are shared with the operator dashboard. */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* daisyUI draws a divider between stats in a row; each tile here is its own card. */
.stat-grid .ui\:stat {
  align-content: start;
  border: 0;
}

.stat-grid .ui\:stat-title {
  color: var(--color-muted);
  white-space: normal;
  word-break: auto-phrase;
}

.stat-head {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* The button overhangs the label line so a tile with one is no taller than its neighbours. */
.stat-head .help-tip {
  margin-block: calc(-1 * var(--space-2));
}

.stat-grid .ui\:stat-value {
  color: var(--color-text);
}

.stat-grid .ui\:stat-desc {
  color: var(--color-muted);
  white-space: normal;
}

.stats-range {
  margin-bottom: var(--space-4);
}

.stats-empty {
  margin-top: var(--space-6);
  text-align: center;
}

.stats-cards {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.column-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.column-chart-bar {
  fill: var(--color-primary);
}

.column-chart-base {
  stroke: var(--color-border);
  stroke-width: 1;
}

.column-chart-slot:hover .column-chart-bar {
  opacity: 0.8;
}

/* One equal column per tick, so a tick sits over the first bar of its share of the axis. */
.column-chart-axis {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  margin-top: var(--space-1);
  color: var(--color-muted);
  font-size: var(--font-size-xs);
}

.ticks-center {
  text-align: center;
}

.ticks-ends > :last-child {
  text-align: end;
}

.bar-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.bar-list li {
  display: grid;
  grid-template-columns: minmax(0, 8em) 1fr 2.5em;
  align-items: center;
  gap: var(--space-2);
}

.bar-list-name {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

/* The ellipsis needs a box of its own; on the flex row it would only clip. */
.bar-list-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* daisyUI fills a progress with currentColor; a label's bar takes the label's dot color. */
.bar-list .ui\:progress[class*="label-"] {
  color: var(--label-dot);
}

.bar-list .ui\:progress.label-none {
  color: var(--color-muted);
}

.bar-list-count {
  text-align: end;
}
