:root {
  scroll-behavior: smooth;
}

// 设定滚轮
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  border-radius: 4px;
  box-shadow: inset 0 0 5px #cac8c6;
  background: #cac8c6;
}
::-webkit-scrollbar-track {
  background: 0 0;
  border-radius: 1px;
}

// 覆盖默认标签样式
p {
  margin: 0;
}
a {
  text-decoration: none;
}

// 禁止图片被拖拽
img {
  // pointer-events: none;
  -webkit-user-drag: none;
  // user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

// 通用列表item样式
.custom-item {
  background-color: #e6e5e4;

  &:hover {
    background-color: #d8d7d7;
  }

  &.active {
    background-color: #c5c4c4;
  }
}

// 实现鼠标悬浮才显示滚动条
.scroll-no-bar {
  overflow-y: auto;
  -webkit-mask-image: linear-gradient(to top, transparent, black),
    linear-gradient(to left, transparent 8px, black 8px);
  mask-image: linear-gradient(to top, transparent, black),
    linear-gradient(to left, transparent 8px, black 8px);
  -webkit-mask-size: 100% 20000px;
  mask-size: 100% 20000px;
  -webkit-mask-position: left bottom;
  mask-position: left bottom;
  transition: mask-position 0.3s, -webkit-mask-position 0.3s;

  &:hover {
    -webkit-mask-position: left top;
    mask-position: left top;
  }
}

.ps {
  height: 100%;
  overflow-y: hidden;
}

.ps .ps__rail-x:hover, .ps .ps__rail-y:hover, .ps .ps__rail-x:focus, .ps .ps__rail-y:focus, .ps .ps__rail-x.ps--clicking, .ps .ps__rail-y.ps--clicking {
  background-color: transparent !important;
}

.ps__rail-y:hover > .ps__thumb-y, .ps__rail-y:focus > .ps__thumb-y, .ps__rail-y.ps--clicking .ps__thumb-y {
  width: 8px !important;
}