/* The up button, breadcrumb menus and flyouts, the path field and its autocomplete. Owner: nav. Tokens from style.css only.
   Classes: .ncr-* the breadcrumb's chevrons, .ncm-* the folder menus (js/features/crumbmenu.js), .np-* / .npath the
   path field (js/features/pathbar.js). Menus reuse the shell's .pmenu / .pm-item look. */

/* ---------- breadcrumb ---------- */
/* the empty space right of the crumbs turns into the path field when clicked */
.crumbs { cursor: text; }
/* a pill on hover (Notion-like); the negative margin keeps the board's spacing */
.crumbs .crumb { padding: 3px 6px; margin: 0 -4px; border-radius: 6px; }
.crumbs .crumb:first-child { margin-left: 0; }   /* clear of the scroll fade on the left */
.crumbs a.crumb:hover, .crumbs button.crumb:hover, .crumbs .crumb.ncr-open, .crumbs .crumb.cur[data-menu]:hover { background: var(--hover); color: var(--text); }
.crumbs .crumb.cur { cursor: default; }
.crumbs .crumb:focus-visible { outline-offset: 0; }
/* separators: a small chevron; before a folder crumb it is a button that opens the folders next to it */
.crumbs .sep { display: inline-grid; place-items: center; width: 16px; height: 22px; margin: 0 -2px; color: var(--dim); flex: none; cursor: default; }
.crumbs .ncr-sep { padding: 0; border: 0; border-radius: 5px; background: none; cursor: pointer; }
.crumbs .ncr-sep:hover, .crumbs .ncr-sep.ncr-open { color: var(--text); background: var(--hover); }

/* ---------- folder menus (siblings, nested flyouts) ---------- */
.ncm { min-width: 232px; max-width: min(360px, calc(100vw - 16px)); gap: 0; }
.ncm-list { display: flex; flex-direction: column; gap: 1px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.ncm .pm-item { min-height: 32px; }
.ncm-ic { position: relative; width: 16px; height: 16px; display: grid; place-items: center; flex: none; color: var(--faint); }
.ncm-row .pm-label, .np-opt .pm-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ncm-n { flex: none; color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.ncm-n.partial { color: var(--dim); }
.ncm-go { flex: none; width: 12px; display: grid; place-items: center; color: var(--dim); }
.ncm-row:hover .ncm-go, .ncm-row:focus-visible .ncm-go, .ncm-row.open .ncm-go { color: var(--muted); }
/* the folders on the path on screen */
.ncm-row.on { background: var(--accent-sel); color: var(--accent-ink); }
.ncm-row.on .ncm-ic { color: var(--accent-icon); }
.ncm-row.on .ncm-n { color: var(--accent-text); }
.ncm-row.on:hover, .ncm-row.on:focus-visible, .ncm-row.on.open { background: var(--accent-soft); color: var(--accent-ink); }
/* the row whose flyout is open */
.ncm-row.open { background: var(--raised); color: var(--text); }
/* folder links: a chain icon, as in the folder tree; broken ones greyed */
.ncm-row.link .ncm-ic, .ncm-ic.link { color: var(--accent-icon); }
.ncm-row.broken { color: var(--dim); cursor: default; }
.ncm-row.broken:hover { background: transparent; color: var(--dim); }
.ncm-row.broken .ncm-ic { color: var(--dim); }
.ncm-more { padding-left: 30px; color: var(--muted); font-size: 12px; }
.ncm-more .pm-label { flex: 1; }
.ncm-foot { display: flex; flex-direction: column; gap: 1px; }
.ncm-act .ncm-ic { color: var(--muted); }
.ncm-act:hover .ncm-ic, .ncm-act:focus-visible .ncm-ic { color: var(--text); }
.ncm-wait { color: var(--faint); }

/* ---------- the path field (Ctrl+L) ---------- */
.toolbar.np-editing .crumbs { display: none; }
.npath { flex: 1 1 120px; min-width: 0; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px;
  background: var(--panel); border: 1px solid var(--accent); border-radius: 9px; color: var(--faint); cursor: text; }
.np-in { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; }
.np-in::placeholder { color: var(--faint); }
.np-hint { flex: none; color: var(--faint); font-size: 11.5px; white-space: nowrap; }
.npath.busy { cursor: progress; }
.npath.busy .np-ic { color: var(--accent-icon); }
/* a narrow toolbar: back, forward and up (3 x 32 px + gaps) share the first row with the breadcrumb or the field
   (style.css reserves 76 px, from before the Up button) */
@container (max-width: 860px) {
  body[data-controls~=filter] .crumbs, body[data-controls~=filter] .npath { flex-basis: calc(100% - 114px); }
}
@container (max-width: 640px) {
  .np-hint { display: none; }
}

/* its suggestions */
.np-list { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.np-opt { min-height: 34px; }
.np-opt[aria-selected=true] { background: var(--raised); color: var(--text); }
.np-name { display: flex; align-items: baseline; gap: 8px; }
.np-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.np-where { min-width: 0; overflow: hidden; text-overflow: ellipsis; flex: 0 1000 auto; color: var(--faint); font-size: 11.5px; }
