/* Fix the toolbox category strip so every category stays reachable on narrow viewports. */

.sj-toolbox-filter-wrap {
  min-width: 0;
}

.sj-toolbox-chips {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  scroll-behavior: smooth;
  scroll-padding-inline: 8px;
  padding: 2px 8px 10px 1px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(102, 112, 160, .42) transparent;
}

.sj-toolbox-chips::-webkit-scrollbar {
  display: block !important;
  height: 6px;
}

.sj-toolbox-chips::-webkit-scrollbar-track {
  background: transparent;
}

.sj-toolbox-chips::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(102, 112, 160, .34);
}

.sj-toolbox-chips::-webkit-scrollbar-thumb:hover {
  background: rgba(80, 94, 150, .56);
}

.sj-toolbox-chip {
  flex: 0 0 auto !important;
  user-select: none;
  -webkit-user-select: none;
}

.sj-toolbox-chips.sjtb-can-scroll {
  cursor: grab;
}

.sj-toolbox-chips.sjtb-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

/* Touch devices already have native swipe scrolling, so keep the strip visually clean there. */
@media (pointer: coarse) {
  .sj-toolbox-chips {
    padding-bottom: 7px !important;
    scrollbar-width: none !important;
  }

  .sj-toolbox-chips::-webkit-scrollbar {
    display: none !important;
  }
}
