/*! rtl:begin:ignore */
@import '../../style/themes/index';
@import './mixin.less';
@slider-prefix-cls: ~'@{kd-prefix}-slider';

.@{slider-prefix-cls} {
  .slider();

  &-rail {
    position: absolute;
    width: 100%;
    height: 4px;
    background-color: @slider-trail-color-background;
    border-radius: 2px;
  }
  
  &-track {
    position: absolute;
    height: 4px;
    background-color: @slider-track-color-background;
  }
  
  &-step {
    position: absolute;
    width: 100%;
  }
  
  &-dot {
    .slider-dot();
  }

  &-dot.@{slider-prefix-cls}-dot-actived {
    border-color: @slider-dot-color-border-actived;
  }

  &-handle {
    .slider-handle();
  }

  &-mark {
    position: absolute;
    width: 100%;
    top: 14px;
  }

  &-mark-text {
    position: absolute;
    display: inline-block;
    color: @slider-mark-text-color;
    word-break: keep-all;
    cursor: pointer;
    user-select: none;
    transform: translateX(-50%);
  }

  &-mark-text.@{slider-prefix-cls}-mark-text-actived {
    color: @slider-mark-text-color-actived;
  }

  &:hover > &-rail{
    background-color: #e1e1e1;
  }

  &:not(&-disabled):hover > &-handle{
    border-color: @slider-handle-color-border-hover;
  }

  &:not(&-disabled):hover &-track{
    background-color: @slider-track-color-background-hover;
  }

  &-reverse {
    .@{slider-prefix-cls}-dot {
      top: -2px;
      margin-right: -4px;
      margin-left: 0;
    }

    .@{slider-prefix-cls}-mark-text {
      transform: translateX(50%);
    }
  }

  &-reverse.@{slider-prefix-cls}-handle {
    top: -1px;
    margin-right: -7px;
    margin-left: 0;
  }

  &-vertical {
    .slider-vertical();

    .@{slider-prefix-cls}-rail {
      width: 4px;
      height: 100%;
    }

    .@{slider-prefix-cls}-track {
      width: 4px;
    }

    .@{slider-prefix-cls}-step {
      width: 4px;
      height: 100%;
    }

    .@{slider-prefix-cls}-dot {
      top: auto;
      margin-left: 0;
      left: -2px;
      margin-bottom: -4px;
    }

    .@{slider-prefix-cls}-mark {
      width: 4px;
      height: 100%;
      top: auto;
      left: 14px;
    }

    .@{slider-prefix-cls}-mark-text {
      transform: translate(0, -50%);
    }

    .@{slider-prefix-cls}-handle {
      left: -1px;
      margin-left: 0;
      margin-bottom: -7px;
    }

    
    .@{slider-prefix-cls}-reverse {
      .@{slider-prefix-cls}-dot {
        top: auto;
        margin-left: 0;
        left: -2px;
        margin-top: -4px;
      }
      
      .@{slider-prefix-cls}-mark-text {
        transform: translate(0, 50%);
      }
    }

    .@{slider-prefix-cls}-reverse.@{slider-prefix-cls}-handle {
      margin-left: 0;
      margin-top: -7px;
    }
  }

  &-disabled {
    cursor: not-allowed;

    .@{slider-prefix-cls}-track {
      background-color: @slider-track-color-background-disabled;
    }

    .@{slider-prefix-cls}-dot {
      border-color: @slider-dot-color-border-disabled;
      cursor: not-allowed;
    }

    .@{slider-prefix-cls}-handle {
      border-color: @slider-handle-color-border-disabled;
      cursor: not-allowed;
    }
  }
}
.@{slider-prefix-cls}-rtl {
  direction: rtl;
}
/*! rtl:end:ignore */