/*
 * Storage Monitor — token-based styles.
 * All colours are role tokens; no raw hexes, no hardcoded hues (arch 09 §3.3).
 * A proportional composition bar + a labelled legend; the legend carries the
 * meaning so segments never rely on hue alone (WCAG 1.4.1).
 */

.monitor {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-top: var(--border-width) solid var(--border);
}

/* Stacked composition bar (decorative; the legend is the data). */
.track {
  display: flex;
  width: 100%;
  height: 8px;
  background: var(--layer-02, var(--border));
  border-radius: var(--radius);
  overflow: hidden;
}

.segment {
  height: 100%;
  /* 1px separator drawn inside the right edge — distinguishes adjacent segments
     without adding layout width, so the percentage widths stay exact. */
  box-shadow: inset -1px 0 0 var(--bg);
}

/* Segment + swatch colours. Snippets = accent (the primary user data); datasets =
   a distinct hue; app = a muted neutral (it's overhead, visually de-emphasised). */
.segSnippets {
  background: var(--accent);
}
.segDatasets {
  background: var(--support-info);
}
.segApp {
  background: var(--border-strong);
}

/* Legend — real text, the accessible source of truth. */
.legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  font-size: 11px;
  color: var(--text-secondary);
}

.legendItem {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

.swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: 0 0 auto;
}

.legendLabel {
  color: var(--text-secondary);
}

.legendBytes {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.total {
  font-size: 11px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
