/* The folder tree: nested lists without marks, each level set in from the one above, the current folder in the strong
   colour of the text. Shared tokens and layout words only, on the root of the tree (packages/components/src/styles.ts);
   logical properties only, so the levels follow the direction of the page. A sheet of this kind holds no function, so the
   drawing of the toggle (an arrow that turns when the folder opens) belongs to the sheet of the app, as the separator
   of the breadcrumb does (docs/folder-tree.md says how); here the toggle only takes its room. */
.folder-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.folder-tree .folder-tree-group {
  padding-inline-start: var(--nw-space-16);
}

.folder-tree .folder-tree-node,
.folder-tree .folder-tree-more {
  display: block;
}

.folder-tree .folder-tree-item {
  display: inline-block;
  padding-block: var(--nw-space-2);
  padding-inline: var(--nw-space-4);
  overflow-wrap: anywhere;
}

.folder-tree [aria-current] {
  color: var(--nw-color-text-strong);
  font-weight: var(--nw-font-weight-semibold);
}

.folder-tree .folder-tree-toggle {
  display: inline-block;
  inline-size: var(--nw-size-icon-s);
  block-size: var(--nw-size-icon-s);
  cursor: pointer;
}

.folder-tree .folder-tree-toggle[hidden] {
  display: none;
}

/* With the script, a folder that holds none keeps the room of its toggle, so that the names of a level stay in line. */
.folder-tree[data-script] .folder-tree-toggle[hidden] {
  display: inline-block;
  visibility: hidden;
}

.folder-tree .folder-tree-group[hidden] {
  display: none;
}
