// @import "../_utils.scss";
// @import "./tooltip.scss";
// @import "./inputNumber.scss";
.#{$slider-prefix-cls} {
  line-height: normal;
  @if $--size-switch == yes {
    padding-top: (($--size-height-base - $slider-height)/2);
    padding-bottom: (($--size-height-base - $slider-height)/2);
  } @else {
    margin: $slider-height;
  }

  &-wrap {
    width: 100%;
    @if $--size-switch == yes {
      &:before {
        content: "";
        display: block;
        height: $slider-height;
      }
    } @else {
      height: $slider-height;
      margin: $slider-margin;
    }
    background-color: $border-color-split;
    border-radius: $btn-border-radius-small;
    vertical-align: middle;
    position: relative;
    cursor: pointer;

    @include theme-background-color($__slider_background-color);
  }

  &-button-wrap {
    @include square($slider-button-wrap-size);
    text-align: center;
    background-color: transparent;
    position: absolute;
    top: $slider-button-wrap-offset;
    transform: translateX(-50%);

    .#{$tooltip-prefix-cls} {
      display: block;
      user-select: none;
    }
  }

  &-button {
    width: $slider-button-width;
    height: $slider-button-height;
    border: 2px solid $slider-color;
    border-radius: $slider-button-border-radius;
    background-color: $slider-button-border-background-color;
    transition: all $transition-time linear;

    @include theme-background-color($__slider-button_background-color);
    @include theme-border-color($__slider-button_border-color);

    &:hover,
    &-dragging {
      border-color: $primary-color;
      transform: scale(1.5);

      @include theme-border-color($__slider-button_hover_border-color);
    }

    &-dragging {
      @include theme-box-shadow($__slider-button_dragging_box-shadow);
    }

    &:hover {
      cursor: grab;
    }

    &-dragging,
    &-dragging:hover {
      cursor: grabbing;
    }
  }

  &-bar {
    height: $slider-height;
    background: $slider-color;
    border-radius: $btn-border-radius-small;
    position: absolute;
    @if $--size-switch == yes {
      top: 0;
    }
    @include theme-background-color($__slider-bar_background-color);
  }

  &-stop {
    position: absolute;

    @include square($slider-height);
    border-radius: 50%;
    background-color: $slider-disabled-color;
    transform: translateX(-50%);

    @include theme-background-color($__slider-stop_background-color);
    @include theme-border($__slider-stop_border);
  }
}

.#{$slider-prefix-cls}-disabled {
  cursor: $cursor-disabled;

  .#{$slider-prefix-cls}-wrap {
    background-color: $slider-disabled-color;
    cursor: $cursor-disabled;

    @include theme-background-color($__slider_disabled_background-color);
  }
  .#{$slider-prefix-cls}-bar {
    background-color: $slider-disabled-color;

    @include theme-background-color($__slider-bar_disabled_background-color);
  }

  .#{$slider-prefix-cls}-button {
    border-color: $slider-disabled-color;

    @include theme-border-color($__slider-button_disabled_border-color);
    @include theme-background-color($__slider-button_disabled_background-color);

    &:hover,
    &-dragging {
      border-color: $slider-disabled-color;

      @include theme-border-color($__slider-button_disabled-hover_border-color);
    }

    &:hover {
      cursor: $cursor-disabled;
    }

    &-dragging,
    &-dragging:hover {
      cursor: $cursor-disabled;
    }
  }
}

.#{$slider-prefix-cls}-input {
  .#{$slider-prefix-cls}-wrap {
    width: auto;
    margin-right: $slider-input-wrap-margin-right;
  }

  .#{$input-number-prefix-cls} {
    float: right;
    margin-top: $slider-input-wrap-number-margin-top;
  }
}
