[data-scope='scroll-area'][data-part='viewport'] {
  border-radius: 0.375rem;
  outline: 1px solid lightgray;
  outline-offset: -1px;

  /* hide scrollbar */
  scrollbar-width: none;
  &::-webkit-scrollbar {
    display: none;
  }
}

[data-scope='scroll-area'][data-part='content'] {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-block: 0.75rem;
  padding-inline-start: 1rem;
  padding-inline-end: 1.5rem;
}

[data-scope='scroll-area'][data-part='scrollbar'] {
  display: flex;
  background-color: lightgray;
  border-radius: 0.375rem;
  margin: 0.5rem;
  opacity: 0;
  transition: opacity 150ms 300ms;

  &[data-hover],
  &[data-scrolling] {
    opacity: 1;
    transition-duration: 75ms;
    transition-delay: 0ms;
  }

  &::before {
    content: '';
    position: absolute;
  }

  &[data-orientation='vertical'] {
    justify-content: center;
    width: 0.5rem;
    &::before {
      width: 1.25rem;
      height: 100%;
    }
    &:not([data-overflow-y]) {
      display: none;
    }
  }

  &[data-orientation='horizontal'] {
    align-items: center;
    height: 0.5rem;
    &::before {
      width: 100%;
      height: 1.25rem;
    }
    &:not([data-overflow-x]) {
      display: none;
    }
  }
}

[data-scope='scroll-area'][data-part='thumb'] {
  border-radius: inherit;
  background-color: gray;

  &[data-orientation='vertical'] {
    width: 100%;
  }

  &[data-orientation='horizontal'] {
    height: 100%;
  }
}
