@import '../../style/themes/index';
@import '../../style/mixins/index';

@scrollbar-prefix-cls: ~'@{wd-prefix}-scrollbar';

.@{scrollbar-prefix-cls} {
  overflow: hidden;
  position: relative;
  height: 100%;

  &-wrap {
    overflow: auto;
    height: 100%;
  }

  &-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: @sp-scroll-bar;
    transition: background-color 0.3s;
  }

  &-wrap-hidden-default {
    &::-webkit-scrollbar {
      display: none;
    }
  }
}
