@import './theme/default.pcss';

.zent-slider {
  display: flex;
  min-height: 30px;

  &-main {
    flex: 1;
    margin: 8px 7px;
    height: 14px;
    cursor: pointer;
    position: relative;
    border-top: 5px solid $theme-stroke-10;
    border-bottom: 5px solid $theme-stroke-10;
    box-sizing: border-box;

    &-with-marks {
      margin-bottom: 20px;
    }

    &:hover {
      .zent-slider-track {
        background: $theme-primary-2;

        &-disabled {
          background: $theme-stroke-5;

          &:hover {
            background: $theme-stroke-5;
          }
        }
      }
    }
  }

  &-container {
    height: 4px;
    background: $theme-stroke-7;
    border-radius: 8px;
    position: absolute;
    width: 100%;
  }

  &-track {
    height: 4px;
    background: $theme-primary-4;
    position: absolute;
    border-radius: 8px;

    &:hover {
      background: $theme-primary-2;
    }

    &-disabled {
      background: $theme-stroke-5;

      &:hover {
        background: $theme-stroke-5;
      }
    }
  }

  &-point {
    position: absolute;
    box-sizing: border-box;
    width: 14px;
    height: 14px;
    margin-top: -5px;
    margin-left: -7px;
    border-radius: 50%;
    border: 2px solid $theme-primary-4;
    background-color: $theme-stroke-10;
    transition: border-color 0.3s ease, transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);

    &:hover {
      border-color: $theme-primary-2;
      transform: scale(1.2);
      transform-origin: center center;
    }

    &:active {
      box-shadow: 0 0 0 2px $theme-primary-6;
    }

    &-disabled {
      border: 2px solid $theme-stroke-6;
      cursor: not-allowed;

      &:hover {
        border-color: $theme-stroke-6;
        transform: scale(1.2);
        transform-origin: center center;
      }

      &:active {
        box-shadow: 0 0 0 2px $theme-mask-2;
      }
    }
  }

  &-points {
    position: absolute;
    width: 100%;
    user-select: none;
  }

  &-toolTips {
    display: inline-block;
    position: absolute;

    .toolTips-content-hide {
      visibility: hidden;
    }

    .toolTips-content {
      position: absolute;
      top: -33px;
      transform: translateX(-50%);

      .toolTips-inner {
        padding: 4px 5px;
        background-color: $theme-stroke-3;
        border-radius: 2px;
        font-size: 12px;
        color: $theme-stroke-10;
        line-height: 11px;
        position: relative;
        z-index: 2;
      }

      .toolTips-arrow {
        background: $theme-stroke-3;
        transform: translate(-50%, 50%) rotate(45deg);
        left: 50%;
        position: absolute;
        z-index: 1;
        top: 13px;
        width: 6px;
        height: 6px;
        box-shadow: 0 1px 4px $theme-mask-1;
        overflow: hidden;
      }
    }

    &:hover {
      .toolTips-content {
        visibility: visible;
      }
    }
  }

  &-input {
    display: flex;
    margin-left: 15px;
    line-height: 30px;

    .slider-input-line {
      padding: 0 5px;
    }

    .zent-input-wrapper {
      width: 60px;

      .zent-input {
        min-width: 60px;
      }
    }
  }

  &-marks {
    position: absolute;
    width: 100%;
    font-size: 12px;
    margin-top: 4px;
    color: $theme-stroke-1;

    .zent-slider-mark {
      position: absolute;
      padding-top: 10px;
      transform: translateX(-50%);
    }
  }

  &-dots {
    position: absolute;
    width: 100%;

    .zent-slider-dot {
      position: absolute;
      display: inline-block;
      width: 6px;
      margin-top: -2px;
      transform: translateX(-50%);
      background-color: $theme-stroke-10;
      height: 6px;
      border: 1px solid $theme-stroke-7;
      border-radius: 50%;

      &-active {
        border: 1px solid $theme-primary-4;
      }
    }
  }

  &-disabled {
    .zent-slider-main {
      cursor: not-allowed;
    }
  }
}
