/* Desktop category navigation. No change to mobile or non-category pages.
   The sidebar (including filters below the tree) scrolls internally when tall.
   Its containing row limits sticky travel before the footer. */
@media (min-width: 992px) {
  body#category #wrapper .row:has(> #left-column .block-categories):has(> #content-wrapper) {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
  }
  body#category #wrapper .row:has(> #left-column .block-categories):has(> #content-wrapper)::after {
    display: none;
  }
  body#category #wrapper .row:has(> #left-column .block-categories):has(> #content-wrapper) > #left-column {
    position: sticky;
    top: var(--tlp-sidebar-top, 16px);
    align-self: flex-start;
    flex-shrink: 0;
    height: auto;
    max-height: calc(100vh - var(--tlp-sidebar-top, 16px) - 16px);
    max-height: calc(100dvh - var(--tlp-sidebar-top, 16px) - 16px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
    scroll-padding-block: 12px;
    -webkit-overflow-scrolling: touch;
  }
  body#category #wrapper .row:has(> #left-column .block-categories):has(> #content-wrapper) > #content-wrapper {
    min-width: 0;
  }
}
@media print {
  body#category #wrapper #left-column { position: static; max-height: none; overflow: visible; }
}
