@import '../../style/themes/index';
@import '../../style/mixins/index';

@progress-prefix-cls: ~'@{ant-prefix}-scrollbar';

.@{progress-prefix-cls} {
  .reset-component;
  overflow: hidden;
  position: relative;
}

.ant-scrollbar:active > .ant-scrollbar__bar,
.ant-scrollbar:focus > .ant-scrollbar__bar,
.ant-scrollbar:hover > .ant-scrollbar__bar {
  opacity: 1;
  -webkit-transition: opacity 340ms ease-out;
  transition: opacity 340ms ease-out;
}

.ant-scrollbar__wrap {
  overflow: scroll;
  height: 100%;
  &::-webkit-scrollbar {
    display: none;
  }
}

.ant-scrollbar__wrap--hidden-default {
  scrollbar-width: none;
}

.ant-scrollbar__wrap--hidden-default::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.ant-scrollbar__thumb {
  position: relative;
  display: block;
  width: 0;
  height: 0;
  cursor: pointer;
  border-radius: inherit;
  background-color: rgba(144, 147, 153, 0.3);
  -webkit-transition: 0.3s background-color;
  transition: 0.3s background-color;
}

.ant-scrollbar__thumb:hover {
  background-color: rgba(144, 147, 153, 0.5);
}

.ant-scrollbar__bar {
  position: absolute;
  right: 2px;
  bottom: 2px;
  z-index: 1;
  border-radius: 4px;
  opacity: 0;
  -webkit-transition: opacity 120ms ease-out;
  transition: opacity 120ms ease-out;
}

.ant-scrollbar__bar.is-vertical {
  width: 6px;
  top: 2px;
}

.ant-scrollbar__bar.is-vertical > div {
  width: 100%;
}

.ant-scrollbar__bar.is-horizontal {
  height: 6px;
  left: 2px;
}

.ant-scrollbar__bar.is-horizontal > div {
  height: 100%;
}
