/*
  Disk audit. A reporting page: wide tables, sizes that line up so a column can
  be scanned for the big numbers, and paths in mono because the difference
  between two candidates is often one folder deep.
*/

.disk-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-3);
}

.disk-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--sp-3) var(--sp-4);
  background: var(--s1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-2);
  border-radius: var(--r-md);
}

.disk-tile.ok {
  border-left-color: var(--ok);
}

.disk-tile.warn {
  border-left-color: var(--warn);
}

.disk-tile-label {
  color: var(--fg-3);
  font-size: 12px;
}

.disk-tile-value {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

/* The search order matters more than anything else on this page, so the roots
   are numbered and read as a list rather than as a set of cards. */
.disk-root {
  padding: var(--sp-3) var(--sp-4);
}

.disk-tabs {
  margin: var(--sp-4) 0 var(--sp-3);
  overflow-x: auto;
}

.disk-tabs .seg-btn {
  flex: none;
}

.disk-filters {
  margin-bottom: var(--sp-3);
}

/* Inputs are full width by default, which is right in a form and wrong in a
   toolbar: these three belong side by side. */
.disk-filters select {
  width: auto;
  min-width: 150px;
  flex: none;
}

.disk-filters .search {
  flex: 1 1 200px;
}

.disk-table td,
.disk-table th {
  vertical-align: top;
}

.disk-table .c-pick {
  width: 1%;
  padding-right: 0;
}

/* Sizes right-aligned and tabular: the point of the column is comparison. */
.disk-table .c-size {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.disk-table tr.is-picked {
  background: var(--accent-soft);
}

.disk-name {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.disk-name svg {
  width: 15px;
  height: 15px;
  color: var(--fg-3);
}

.disk-group {
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

/* One line per copy. The keeper and the candidates line up so the difference
   between the paths is what the eye lands on. */
.disk-dup-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 4px 0;
  border-top: 1px solid var(--border);
}

.disk-dup-row .pill,
.disk-dup-row .check {
  flex: none;
  min-width: 74px;
}

.disk-dup-row .mono {
  overflow-wrap: anywhere;
}

/* An alias row carries a second line — how many workflows would have to be
   rewritten before its bytes can go — so the path and that sentence stack
   instead of competing for the width. */
.disk-dup-row > .grow {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.disk-dup-row > .btn {
  flex: none;
}

@media (max-width: 860px) {
  .disk-dup-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}
