/* store-filter-cap.css — cap the height of the Layered Navigation filter
   options so long lists (Category, esp. for broad search queries) scroll
   inside the panel instead of stretching the sidebar down for a mile.
   Applies on category + search-result pages; mobile is untouched (the
   filter opens as a full-screen sheet there anyway). */

@media (min-width: 768px) {
  .block.filter .filter-options-content {
    max-height: 320px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    /* Padding-right leaves room for the scrollbar so entries don't slide
       under it. */
    padding-right: 6px !important;
    /* Thin custom scrollbar so it doesn't jump out visually. Falls back
       to the browser default in Firefox etc. */
    scrollbar-width: thin;
    scrollbar-color: #b5b5b5 transparent;
  }
  .block.filter .filter-options-content::-webkit-scrollbar {
    width: 6px;
  }
  .block.filter .filter-options-content::-webkit-scrollbar-thumb {
    background: #b5b5b5;
    border-radius: 3px;
  }
  .block.filter .filter-options-content::-webkit-scrollbar-thumb:hover {
    background: #8a8a8a;
  }
  /* When the panel is scrollable, hint at it: a soft fade at the bottom. */
  .block.filter .filter-options-item {
    position: relative;
  }
}
