// Shared scrollbar styles - Keep these here to minimize duplication
body,                 // Shell
pre,                  // Code block
.scroll-x,
.omnisearch-results {
  // Listing chips
  --clr-el-scrollbar-bg: var(--clr-scrollbar-bg);
  --clr-el-scrollbar-knob: var(--clr-scrollbar-knob);
  --clr-el-scrollbar-knob-active: var(--clr-scrollbar-knob-active);

  &::-webkit-scrollbar-track {
    background: var(--clr-el-scrollbar-bg);
  }

  &::-webkit-scrollbar {
    background: transparent;
    width: 2px;
    height: 2px;
  }

  &::-webkit-scrollbar-thumb {
    background-color: var(--clr-el-scrollbar-knob);
    border-radius: var(--br-sm);

    &:hover {
      background-color: var(--clr-el-scrollbar-knob-active);
    }
  }
}

// Body scrollbar
body {
  &::-webkit-scrollbar {
    @media screen and (min-width: $layout-medium-breakpoint) {
      width: 4px;
    }
  }
}

// Listing chips scrollbars
.scroll-x {
  &::-webkit-scrollbar-track {
    margin: 0 4rem;
    border-radius: var(--br-sm);

    @media screen and (min-width: $layout-medium-breakpoint) {
      margin: 0 12rem;
    }

    @media screen and (min-width: $layout-large-breakpoint) {
      margin: 0 16rem;
    }
  }
}

// Scroll lock class for body, allowing modals to lock page scroll while open
.scroll-lock {
  overflow: hidden;
}
