/* Sizes in the inspector and header, Everything inside, the folder tree with thumbnails. Owner: sizes.
   Tokens from style.css only (no raw colours). */

/* ---------- the FOLDERS header: compact | with thumbnails ---------- */
.sz-tree-mode { position: relative; }
.sz-tree-mode[aria-pressed=true] { color: var(--accent-icon); background: var(--accent-soft); }
.sz-tree-mode[aria-pressed=true]:hover { color: var(--accent-ink); }
/* touch screens: a 44 px target around the small button, without making the header taller */
@media (pointer: coarse) { .sz-tree-mode::before { content: ""; position: absolute; inset: -11px; } }

/* ---------- folder links in the tree (both modes) ---------- */
.trow.trow-link .fic { color: var(--accent-icon); }
.trow.broken { color: var(--dim); cursor: default; }
.trow.broken .fic, .trow.broken .sz-tcov-ic { color: var(--dim); }
.trow.broken .tname { text-decoration: line-through; text-decoration-color: var(--line-3); }

/* ---------- "With thumbnails": taller rows, a cover, count with the size below it ---------- */
.tree.sz-thumbs { gap: 2px; }
/* a slightly smaller step per level than the compact tree: the cover and the numbers already take room */
.tree.sz-thumbs .trow { min-height: 40px; padding: 4px 6px 4px calc(6px + var(--depth, 0) * 11px); gap: 6px; }
.sz-tcov { position: relative; display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 6px;
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2); overflow: hidden; color: var(--faint); }
.sz-tcov img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .18s; }
.sz-tcov img.ld { opacity: 1; }
.sz-tcov.has .sz-tcov-ic { visibility: hidden; }
.trow.on .sz-tcov { box-shadow: inset 0 0 0 1px var(--accent); }
/* Explorer's shortcut arrow, bottom left of a link's cover */
.sz-tlink { position: absolute; left: 1px; bottom: 1px; display: grid; place-items: center; width: 12px; height: 12px; border-radius: 3px;
  background: var(--pane); color: var(--accent-icon); z-index: 1; }
.sz-tlink .ic { width: 10px; height: 10px; stroke-width: 2; }
.tree.sz-thumbs .tname { line-height: 1.3; }
.sz-tnums { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; min-width: 0; max-width: 46%; line-height: 1.2; }
.sz-tnums .tcount { color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sz-tnums .tcount.partial { color: var(--dim); }
.sz-tnums .tcount.linked { color: var(--accent-icon); }
.sz-tsize { color: var(--dim); font-size: 10.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sz-tsize:empty, .sz-tnums .tcount:empty { display: none; }
.trow.on .sz-tnums .tcount, .trow.on .sz-tsize { color: var(--accent-text); }

/* ---------- header tools: Everything inside, Include links ---------- */
.sz-inside-btn .ic, .sz-links-btn .ic { color: var(--faint); }
.sz-inside-btn:hover .ic { color: var(--text); }
.sz-links-btn[aria-pressed=true] .ic { color: var(--accent-text); }

/* ---------- inspector: the size card ---------- */
.ins-stat.sz-stat .n { letter-spacing: -.01em; }

/* ---------- phones: 44 px touch targets ---------- */
@media (max-width: 767px) {
  .tree.sz-thumbs .trow { min-height: 44px; }
  .sz-tcov { width: 32px; height: 32px; border-radius: 7px; }
  .sz-inside-btn, .sz-links-btn { height: 44px; padding: 0 14px; border-radius: 12px; }
}
