/*-------------- slider -----------------*/
.slider-rule{
  border-left: 5px solid $color-dark-purple;
  background: #fff;
  border-radius: 2px;
  padding: 16px 15px 14px 13px;
  box-shadow: 0 2px 4px 0 #dbe4f9;

  &_dark-blue{border-color: $color-dark-blue;}
  &_purple{border-color: $color-purple;}
  &_grey{border-color: $color-light-grey;}

  &__content{margin-left: 50px;}

  &__list{
    display: flex;
    flex-wrap: wrap;
  }

  &__item{margin: 6px 12px 6px 0;}
  &__item{margin: 6px 12px 6px 0;}

  &__icon{
    margin: 6px 0 6px -10px;

    .ic-pointer{
      vertical-align: bottom;
      width: 12px;
      height: 15px;
      fill: $color-red;
    }
  }

  &__text{
    @include font(normal, normal, rem(14px), rem(30px), $color-dark-grey);
    margin: 6px 12px 6px 0;
  }

  .drop-cond{
    &__content{z-index: auto;}
    &__popup{z-index: 15!important;}
  }

  .drop-auto__option{width: 250px;}
}

.slider-rule-main{
  display: flex;
  position: relative;
  z-index: 16;

  &__list{
    display: flex;
    flex-wrap: wrap;
  }

  &__title{
    width: 50px;
    @include font(normal, normal, rem(14px), rem(28px), $color-dark-grey);
    text-align: right;
    // margin-right: 11px;
  }

  &__text{
    @include font(normal, normal, rem(14px), rem(28px), $color-dark-grey);
    margin-right: 12px;
  }

  &__item{
    .event-select__head{margin-right: 0;}
  }

  &__item:not(:last-child){margin-right: 12px;}
}

.slider-rule-check{
  display: inline-flex;
  align-items: center;

  .input-check{
    &__label{margin-bottom: 0;}
  }

  &__icon{
    width: 16px;
    height: 16px;
    position: relative;
    margin-left: 6px;

    .ic-help,
    .ic-info{
      vertical-align: top;
      width: 16px;
      height: 16px;
    }

    .tooltip{
      display: none;
      width: 250px;
      position: absolute;
      @include top-center;
      left: 100%;
      z-index: 11;
      line-height: 1.4;
      margin: 0 0 0 8px;

      &::after{@include top-center;}
    }
  }

  &__icon:hover .tooltip{display: inline-block;}
}

.typography-slider .flow-content{width: 800px;}

.slider-param{
  position: relative;
  z-index: 15;
}

.t-slider{
  max-width: 710px;

  &__field{
    width: 100%;
    height: 8px;
    background: $color-light-grey;
    margin: 40px 0 55px;
    position: relative;
    //z-index: 2;
  }

  &__mask-left,
  &__mask-right{
    display: inline-block;
    width: 4px;
    height: 100%;
    position: absolute;
    top: 0;

    .icon{
      display: inline-block;
      vertical-align: top;
      fill: #fff;
    }
  }

  &__mask-left{left: 0;}
  &__mask-right{right: 0;}

  &__area{
    //width: 100%;
    height: calc(100% + 20px);
    position: absolute;
    @include top-center;
    left: 0;
    right: 0;
  }

  &__area.active{
    display: block;
    z-index: 2;
  }

  &__area.active .t-slider-roller{display: inline-flex;}
  &__area.active .t-slider-info{display: inline-flex;}

  &__line &__mask-left,
  &__line &__mask-right{
    display: none;
  }

  &__area.active &__line &__mask-left,
  &__area.active &__line &__mask-right{
    display: inline-block;
    vertical-align: top;
  }

  &__line-bg{
    //width: 100%;
    height: calc(100% - 20px);
    background: $color-dark-grey;
    position: absolute;
    @include top-center;
    left: 0;
    right: 0;
  }

  &__line{
    display: none;
    //width: 100%;
    height: calc(100% - 20px);
    position: absolute;
    @include top-center;
    z-index: 2;
  }

  &__field.transition &__line{transition: all 0.2s ease 0s;}

  &__area.active &__line-bg{background: transparent;}

  &__area.active &__line{
    display: block;
    background: $color-green;
    //width: 85%;
  }

  &__more,
  &__less{
    display: none;
    width: 18px;
    height: 23px;
    position: absolute;
    //@include top-center;
    bottom: 0;
    z-index: 3;

    .icon{
      vertical-align: top;
      width: 18px;
      height: 23px;
    }

    input[type="text"]{
      height: rem(25px);
      width: 46px;
      outline: none;
      border: 1px solid $color-light-grey;
      border-radius: 2px;
      @include font(normal, normal, rem(14px), rem(23px), $color-dark-blue);
      padding: 0 3px;
      margin: 0;
      transition: border 0.3s ease;
      position: absolute;
      bottom: 100%;
      margin-bottom: 2px;
      -webkit-touch-callout:none; /* iOS Safari */
      -webkit-user-select:none;   /* Chrome/Safari/Opera */
      -khtml-user-select:none;    /* Konqueror */
      -moz-user-select:none;      /* Firefox */
      -ms-user-select:none;       /* Internet Explorer/Edge */
      user-select:none;
    }

    input[type="text"]::placeholder{
      color: $color-light-grey;
      opacity: 1;
    }

    input[type="text"]:focus{border-color: $color-purple;}

    input[disabled]{
      background: #fff;
      color: $color-light-grey;
    }
  }

  &__more{left: -18px;}
  &__less{right: -18px;}

  &__more.opacity,
  &__less.opacity{
    width: 20px;
    height: 14px;
    bottom: auto;
    @include top-center;

    .icon{
      width: 20px;
      height: 14px;
    }
  }

  //&__more.disable,
  &__more.opacity{
    left: 0;
  }

  //&__less.disable,
  &__less.opacity{
    right: 0;
  }

  &__more input[type="text"]{right: 0;}
  &__less input[type="text"]{left: 0;}

  &__area.active &__more,
  &__area.active &__less{
    display: inline-block;
  }

  &__at{
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: $color-purple;
    position: absolute;
    @include top-center;
    left: 0;
    right: 0;
    margin: 0 auto;
    z-index: 2;
  }

  &__slide{
    width: 100%;
    height: 100%;
    position: relative;
    user-select: none;
    cursor: pointer;
  }

  &__slide:hover{
    .icon.less-or-equal,
    .icon.more-or-equal{
      fill: #5303a8;
    }

    .less-than,
    .more-than{
      box-shadow: 0px 0px 10px 0px rgba(255,141,129,0.5);
    }
  }

  &__less.disable &__slide,
  &__more.disable &__slide,
  &__less.opacity &__slide,
  &__more.opacity &__slide{
    cursor: auto;
  }

  &__mark{
    display: inline-block;
    width: 1px;
    height: 22px;
    background: $color-red;
    position: absolute;
    bottom: 3px;

    .icon{
      max-width: none;
      width: 12px;
      height: 15px;
      fill: $color-red;
      position: absolute;
      bottom: 15px;
      left: 50%;
      transform: translateX(-50%);
    }
  }

  &__mark_left{left: 0;}
  &__mark_right{right: 0;}
}

.t-slider-scale{
  position: relative;
  padding: 0 21px 0;
  margin-bottom: 30px;
  user-select: none;

  &__label{
    position: absolute;
    @include top-center;
    left: 0;
    margin-top: -3px;

    .ic-infinity{
      width: 16px;
      height: 7px;
      fill: $color-dark-grey;
    }
  }

  &__label:last-child{
    left: auto;
    right: 0;
  }

  &__content{
    height: 1px;
    width: 100%;
    background: $color-light-grey;
    position: relative;
  }

  &__arr-left,
  &__arr-right{
    display: inline-block;
    width: 21px;
    height: 11px;
    position: absolute;
    @include top-center;

    .icon{
      display: inline-block;
      vertical-align: top;
      fill: $color-light-grey;
    }
  }

  &__arr-left{left: -21px;}
  &__arr-right{right: -21px;}

  &__timeline{
    width: calc(100% - 40px);
    height: 9px;
    background: url(/assets/img/short-line.svg) repeat-x center;
    position: absolute;
    @include top-center;
    left: 0;
    right: 0;
    margin: 0 auto;
  }

  &__start{
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: $color-light-grey;
    position: absolute;
    left: 0;
    right: 0;
    @include top-center;
    margin: 0 auto;

    .ic-pointer{
      width: 12px;
      max-width: none;
      height: 15px;
      max-height: none;
      fill: $color-red;
      position: absolute;
      top: -88px;
      left: 50%;
      transform: translateX(-50%);
    }
  }

  &__start::before{
    content: '';
    display: inline-block;
    width: 1px;
    height: 77px;
    border-left: 2px dotted $color-light-grey;
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    margin: 0 auto;
  }

  &__start &__note{
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
  }

  &__note{
    display: inline-flex;
    align-items: center;
    @include font(normal, normal, rem(12px), 1.2, $color-dark-grey);
    white-space: nowrap;
    margin-top: 10px;
  }

  &__before,
  &__after{
    width: 50%;
    text-align: center;
    position: absolute;
    top: 100%;

    .icon{
      width: 12px;
      height: 6px;
      fill: $color-dark-grey;
    }

    .icon:first-child{margin-right: 5px;}
    .icon:last-child{margin-left: 5px;}
  }

  &__before{left: 0;}
  &__after{right: 0;}
}

.t-slider-roller{
  display: none;
  justify-content: center;
  vertical-align: top;
  //width: 50%;
  //height: 100%;
  width: 20px;
  height: 20px;
  position: absolute;
  @include top-center;
  transition: all 0.2s ease 0s;
  right: 100%;
  user-select: none;
  margin: 0 8px;

  &__content{
    width: 100%;
    height: 100%;
    position: relative;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
  }

  &__icon{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: top;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: $color-blue;
    cursor: pointer;

    .icon{
      width: 12px;
      height: 12px;
      fill: #fff;
    }
  }

  &__text{
    display: none;
    @include font(normal, 600, rem(10px), 1, $color-blue);
    text-transform: uppercase;
    text-align: center;
    padding-top: 3px;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
  }

  .tooltip{
    display:inline-block;
    margin: 8px 0 0 0;
    white-space: nowrap;
    position: absolute;
    left: -6px;
    top: 100%;
    z-index: 10;
    opacity: 0;
    transition: opacity 0s linear 0.3s;
  }

  &__content:hover .tooltip{opacity: 1;}
  &__content .tooltip:hover{opacity: 0;}

  &_right{
    left: 100%;
    right: auto;
  }

  &_right .tooltip{
    left: auto;
    right: -6px;
  }

  &_right .tooltip_top::after{
    left: auto;
    right: 10px;
  }
}

.t-slider-info{
  display: none;
  width: 16px;
  height: 16px;
  margin: 0 10px;
  position: absolute;
  top: -20px;
  right: 100%;
  z-index: 3;

  &__icon{
    .icon{
      width: 16px;
      height: 16px;
    }
  }

  .tooltip{
    display: none;
    width: 250px;
    position: absolute;
    bottom: 100%;
    left: -9px;
    margin: 0 0 8px;

    &::after{
      right: auto;
      left: 10px;
    }
  }

  &:hover .tooltip{
    display: inline-block;
    opacity: 1;
  }

  &_right{
    right: auto;
    left: 100%;

    .tooltip{
      right: -9px;
      left: auto;

      &::after{
        left: auto;
        right: 10px;
      }
    }
  }
}

.slider-wrap{
  display: inline-block;
  vertical-align: top;
  width: 710px;
  max-width: 100%;

  .tabs-page{
    justify-content: center;
    margin: 60px auto 0;
    user-select: none;
  }
}
