// Slider
// --------------------------------------------------
/**
 * @author: ruohuan
 * @email: ruohuan.zhh@alibaba-inc.com
 * @background-attachment:  2016/5/18
 */
@prefix-cls-slider: e("@{prefix-cls}-slider");

.@{prefix-cls-slider} {
  position: relative;
  margin: 10px 8px;
  height: 12px;
  border-radius: 5px;
  background-color: #e9e9e9;
  border-top: 4px solid #fff;
  border-bottom: 4px solid #fff;
  -webkit-transition: background-color .3s ease;
  transition: background-color .3s ease;
  cursor: pointer;

  &:hover {
    background-color: #e1e1e1;

    .@{prefix-cls-slider}-handle {
      border-color: tint(@primary-color, 40%);
    }

    .@{prefix-cls-slider}-track {
      background-color: tint(@primary-color, 40%);
    }
  }

  &.@{prefix-cls-slider}-disabled {

    .@{prefix-cls-slider}-handle {
      border-color: #ccc;
      cursor: not-allowed;
    }

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

    &:hover {
      background-color: #e9e9e9;

      .@{prefix-cls-slider}-handle {
        border-color: #ccc;
        cursor: not-allowed;
      }

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

.@{prefix-cls-slider}-handle {
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  margin: -5px 0 0 -7px;
  background-color: #fff;
  cursor: pointer;
  border-radius: 50%;
  border: 2px solid @primary-color;
  z-index: 2;
  -webkit-transition: border-color .3s ease;
  transition: border-color .3s ease;
}

.@{prefix-cls-slider}-track {
  position: absolute;
  left: 0;
  top: 0;
  height: 4px;
  border-radius: 6px;
  background-color: @primary-color;
  z-index: 1;
  -webkit-transition: background-color .3s ease;
  transition: background-color .3s ease;
}

.@{prefix-cls-slider}-step {
  position: absolute;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 1;
}

.@{prefix-cls-slider}-mark {
  position: absolute;
  top: 10px;
  left: 0;
  width: 100%;
  font-size: 12px;
  z-index: 3;
}
