@scrollbarScope: ~'@{prefixCls}Scrollbar';

.@{scrollbarScope} {
  overflow: hidden;
  position: relative;
  height: 100%;
  --sc-scrollbar-opacity: .3;
  --sc-scrollbar-bg-color: #909399;
  --sc-scrollbar-hover-opacity: .5;
  --sc-scrollbar-hover-bg-color: #909399;
  &-wrap {
    overflow: auto;
    height: 100%;
    &__hidden-default {
      scrollbar-width: none;
      &::-webkit-scrollbar {
        display: none;
      }
    }
    &.native-scrollbar-small::-webkit-scrollbar {
      width: 4px;
      height: 4px;
    }
    &.native-scrollbar-large::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }
    &.scrollbar-small ~ .is-horizontal {
      height: 4px;
    }
    &.scrollbar-small ~ .is-vertical {
      width: 4px;
    }
    &.scrollbar-large ~ .is-horizontal {
      height: 8px;
    }
    &.scrollbar-large ~ .is-vertical {
      width: 8px;
    }
  }
  &-bar {
    position: absolute;
    right: 2px;
    bottom: 2px;
    z-index: 1;
    border-radius: 4px;
    &.is-horizontal {
      height: 6px;
      left: 2px;
      & > div {
        height: 100%;
      }
    }
    &.is-vertical {
      width: 6px;
      top: 2px;
      & > div {
        width: 100%;
      }
    }
  }
  &-thumb {
    position: relative;
    display: block;
    width: 0;
    height: 0;
    cursor: pointer;
    border-radius: inherit;
    background-color: var(--sc-scrollbar-bg-color, var(--sc-text-color-secondary));
    transition: var(--sc-transition-duration) background-color;
    opacity: var(--sc-scrollbar-opacity, .3);
    &:hover, &:active, &:focus {
      opacity: 0.5;
      cursor: pointer;
    }
  }
  // ::-webkit-scrollbar-thumb {
  //   background-color: #0003;
  //   border-radius: 10px;
  //   transition: all .2s ease-in-out;
  // }
}