/* Progress panel: header with close button, optional filter, scrolling list.
   On phones the panel is a bottom sheet that can be dragged down to dismiss
   (nav_controller.js). Tokens only. */
/* touch-action: none on the sheet itself, re-opened to pan-y only inside the
   scrollable list below — otherwise a drag starting on the head/handle/gaps
   (anywhere but the list) has no CSS-level claim on the gesture, so a real
   touchscreen can commit to natively scrolling the page underneath the fixed
   sheet before nav_controller.js's JS-side preventDefault() ever runs (it
   waits for a 6px direction threshold, which loses that race on real
   hardware even though devtools' synthetic touch emulation never reproduces
   it — the bug showed "fixed in mobile-mode devtools, broken on a real
   phone" for exactly this reason). */
.nav-panel--progress { display: flex; flex-direction: column; overflow: hidden; padding: 0; touch-action: none; }
.nav-panel__head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding: var(--space-2) var(--space-2) var(--space-1) var(--space-3);
  touch-action: none;
}
.nav-panel__title { padding: 0; }
.nav-panel__count { color: var(--text-muted); font-weight: 600; letter-spacing: 0; text-transform: none; }
.nav-panel__close { display: none; font-size: 1.75rem; line-height: 1; }
.nav-panel__filter {
  flex: 0 0 auto;
  width: auto; min-height: var(--tap);
  margin: 0 var(--space-3) var(--space-2);
  font-size: 16px; /* no iOS zoom-on-focus */
}
.nav-panel--progress .nav-progress-list {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  padding: 0 var(--space-2) var(--space-2);
}
.nav-panel--progress .nav-progress-list a {
  display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-progress-nomatch { padding: var(--space-3); }

@media (max-width: 760px) {
  .nav-panel--progress {
    max-height: 80vh;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transition: transform 0.18s ease-out;
  }
  .nav-panel--progress::before { margin-top: var(--space-3); flex: 0 0 auto; }
  .nav-panel__close { display: inline-flex; }
  /* A long list keeps a stable height so the sheet doesn't jump while typing. */
  .nav-panel--progress:has(.nav-panel__filter:not([hidden])) { height: 75vh; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-panel--progress { transition: none; }
}
