@import '../style/var';

.van-slider {
  position: relative;
  border-radius: 999px;
  background-color: @slider-inactive-background-color;

  &__bar {
    position: relative;
    border-radius: inherit;
    background-color: @slider-active-background-color;
  }

  &__button {
    width: @slider-button-width;
    height: @slider-button-height;
    box-shadow: @slider-button-box-shadow;
    border-radius: @slider-button-border-radius;
    background-color: @slider-button-background-color;

    &-wrapper {
      position: absolute;
      top: 50%;
      right: 0;
      transform: translate3d(50%, -50%, 0);

      /* use pseudo element to expand touch area */
      &::after {
        content: '';
        position: absolute;
        width: 200%;
        height: 200%;
        top: -50%;
        left: -50%;
      }
    }
  }

  &--disabled {
    opacity: @slider-disabled-opacity;
  }

  &--vertical {
    height: 100%;
    display: inline-block;

    .van-slider__button-wrapper {
      top: auto;
      bottom: 0;
      transform: translate3d(50%, 50%, 0);
    }
  }
}
