@import "../common/varible";

.yu-slider {
  font-family: $font-family;
  margin: 0 $space-small $space 0;
  &.disabled {
    &>.bottom-bar {
      &>.top-bar {
        background-color: lighten($info, 20);
        &>.circle {
          border-color: lighten($info, 20);
        }
      }
    }
  }
  &>.bottom-bar {
    position: relative;
    width: 100%;
    height: $slider-bar-length;
    border-radius: $slider-bar-length/2;
    background-color: $border;
    &>.top-bar {
      height: $slider-bar-length;
      border-radius: $slider-bar-length/2;
      background-color: $primary;
      &>.circle {
        &>.tooltip {
          box-sizing: content-box;
          position: absolute;
          top: -36px;
          height: 20px;
          padding: 2px 7px;
          line-height: 20px;
          background: #373737;
          border-radius: $radius;
          color: #fff;
          font-size: $normal;
          margin-left: -$slider-circle-length + 2;
          text-align: center;
          min-width: 20px;
          display: none;
          &:after{
            content: '';
            display: inline-block;
            height: $tooltip-angle-length;
            width: $tooltip-angle-length;
            background-color: $tooltip-dark;
            position: absolute;
            bottom: -$tooltip-angle-length/2;
            left: $slider-circle-length;
            transform: rotate(45deg);
          }
        }
        transform: translateX(-8px);
        position: absolute;
        top: -($slider-circle-length/2 - 1);
        box-sizing: border-box;
        line-height: $slider-circle-length;
        vertical-align: middle;
        display: inline-block;
        width: $slider-circle-length;
        height: $slider-circle-length;
        background-color: #fff;
        border: 2px solid $primary;
        border-radius: $slider-circle-length;
        &.hover {
          width: $slider-circle-length+2;
          height: $slider-circle-length+2;
          &>.tooltip {
            display: inline-block;
          }
        }
        &:hover {
          width: $slider-circle-length+2;
          height: $slider-circle-length+2;
          &>.tooltip {
            display: inline-block;
          }
        }
      }
      &>.point {
        position: absolute;
        width: $slider-bar-length;
        height: $slider-bar-length;
        background-color: #fff;
        border-radius: $slider-bar-length/2;
      }
    }
    &:hover {
      cursor: pointer;
    }
  }
  input{
    display: none;
  }
}
