/*
 * @Author: 焦质晔
 * @Date: 2022-10-18 09:36:59
 * @Last Modified by: 焦质晔
 * @Last Modified time: 2024-11-05 18:59:03
 */
@use '../../style/src/themes' as *;

$prefix: '#{$qm-prefix}-scrollbar';

.#{$prefix} {
  position: relative;
  &__wrap {
    display: grid;
    height: 100%;
    max-height: inherit;
    overflow: auto;
    &--hidden {
      scrollbar-width: none;
      &::-webkit-scrollbar {
        display: none;
      }
    }
  }
  &__view {
    display: block;
  }
  &__bar {
    position: absolute;
    right: 2px;
    bottom: 2px;
    z-index: 2;
    border-radius: 4px;
    &.is-vertical {
      width: 6px;
      top: 2px;
      & > div {
        width: 100%;
      }
    }
    &.is-horizontal {
      height: 6px;
      left: 2px;
      & > div {
        height: 100%;
      }
    }
  }
  &__thumb {
    position: relative;
    display: block;
    width: 0;
    height: 0;
    cursor: pointer;
    border-radius: inherit;
    background-color: #909090;
    opacity: 0.3;
    &:hover {
      opacity: 0.5;
    }
  }
  &-fade {
    &-enter-active {
      transition: opacity 340ms ease-out;
    }
    &-leave-active {
      transition: opacity 120ms ease-out;
    }
    &-enter-from,
    &-leave-active {
      opacity: 0;
    }
  }
}
