.yc-slider {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  .yc-slider-track {
    flex: 1;
    flex-shrink: 0;
    position: relative;

    &::before {
      display: block;
      content: '';
      position: absolute;
      background-color: var(--color-fill-3);
      border-radius: var(--border-radius-small);
    }
    .yc-slider-bar {
      position: absolute;
      background-color: rgb(var(--primary-6));
      border-radius: var(--border-radius-small);
    }
    .yc-slider-btn {
      z-index: 2;
      user-select: none;
      cursor: pointer;
      position: absolute;
      transform: translate(-50%, -50%);
      width: 12px;
      height: 12px;
      &:hover::before {
        box-shadow: 0 2px 5px #0000001a;
        transform: scale(1.16666667);
      }
      &::before {
        content: '';
        display: inline-block;
        position: absolute;
        top: 0;
        left: 0;
        width: 12px;
        height: 12px;
        background: var(--color-bg-2);
        border: 2px solid rgb(var(--primary-6));
        border-radius: var(--border-radius-circle);
        transition: all 0.3s cubic-bezier(0.3, 1.3, 0.3, 1);
      }
    }
  }
  .yc-slider-input {
    display: flex;
    align-items: center;
    .yc-slider-input-divider {
      margin: 0 6px;
      width: 8px;
      height: 2px;
      background: rgb(var(--gray-6));
    }
    .yc-input-outer {
      width: 65px;
      .yc-input-wrapper {
        .yc-input {
          text-align: center;
        }
        .yc-input-suffix {
          padding-left: 0;
        }
      }
    }
  }
  .yc-slider-ticks,
  .yc-slider-dots,
  .yc-slider-marks {
    z-index: 1;
    position: absolute;
    //   tick
    .yc-slider-tick {
      position: absolute;
      background: var(--color-fill-3);
      &.yc-slider-tick-active {
        background-color: rgb(var(--primary-6));
      }
    }
    //   dot
    .yc-slider-dot {
      position: absolute;
      width: 8px;
      height: 8px;
      background-color: var(--color-bg-2);
      border: 2px solid var(--color-fill-3);
      border-radius: var(--border-radius-circle);
      &.yc-slider-dot-active {
        border-color: rgb(var(--primary-6));
      }
    }
    //   mark
    .yc-slider-mark {
      position: absolute;
      cursor: pointer;
      color: var(--color-text-3);
      font-size: 14px;
      line-height: 1;
      user-select: none;
    }
  }
}
// direction
.yc-slider-direction-horizontal {
  width: 100%;
  min-height: 32px;
  .yc-slider-track {
    &::before,
    .yc-slider-bar,
    .yc-slider-btn {
      left: 0;
      top: 50%;
    }
    &::before,
    .yc-slider-bar {
      transform: translateY(-50%);
    }
    &::before {
      height: 2px;
      width: 100%;
      right: 0;
    }
    .yc-slider-bar {
      height: 2px;
    }
  }
  .yc-slider-ticks,
  .yc-slider-dots,
  .yc-slider-marks {
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    .yc-slider-tick {
      top: -4px;
      width: 1px;
      height: 3px;
      border-top-left-radius: 1px;
      border-top-right-radius: 1px;
    }
    .yc-slider-dot {
      transform: translateY(-50%);
    }
    &.yc-slider-marks {
      transform: translateY(calc(-50% + 10px));
    }
  }
}
.yc-slider-direction-vertical {
  height: 100%;
  min-width: 32px;
  flex-direction: column;

  .yc-slider-track {
    display: flex;
    flex-direction: column;
    justify-content: center;
    &::before,
    .yc-slider-bar,
    .yc-slider-btn {
      bottom: 0;
      left: 50%;
    }
    &::before,
    .yc-slider-bar {
      transform: translateX(-50%);
    }
    &::before {
      top: 0;
      width: 2px;
      height: 100%;
    }
    .yc-slider-bar {
      width: 2px;
    }
  }
  .yc-slider-ticks,
  .yc-slider-dots,
  .yc-slider-marks {
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    &.yc-slider-marks {
      transform: translateX(calc(-50% + 10px));
    }

    .yc-slider-tick {
      left: 0;
      width: 3px;
      height: 1px;
      border-top-left-radius: 1px;
      border-top-right-radius: 1px;
    }
    .yc-slider-dot {
      transform: translateX(-50%);
    }
  }
}
// disabled
.yc-slider-disabled {
  .yc-slider-track {
    &::before {
      background-color: var(--color-fill-3);
    }
    .yc-slider-bar {
      background-color: var(--color-fill-3);
    }
    .yc-slider-btn {
      cursor: not-allowed;
      &::before {
        border-color: var(--color-fill-3);
      }
    }
  }
}
