@class-prefix-slider: ~'adm-slider';

.@{class-prefix-slider} {
  --fill-color: var(--adm-color-primary);
  padding: 5px 14px;
  list-style: none;
  user-select: none;

  &-track-container {
    padding: 8px 0;
  }

  &-track {
    position: relative;
    width: 100%;
    height: 3px;
    background-color: var(--adm-color-fill-content);
    border-radius: 3px;
  }

  &-fill {
    position: absolute;
    z-index: 1;
    height: 3px;
    border-radius: 3px;
    background-color: var(--fill-color);
  }

  &-ticks {
    position: absolute;
    width: 100%;
    height: 3px;
    background: transparent;
  }

  &-tick {
    position: absolute;
    top: -2px;
    width: 7px;
    height: 7px;
    margin-left: -3px;
    background-color: var(--adm-color-fill-content);
    border-radius: 50%;
    &-active {
      background-color: var(--fill-color);
    }
  }

  &-thumb {
    width: 28px;
    height: 28px;
    margin: 2px;
    border-radius: 50%;
    text-align: center;
    line-height: 28px;
    background: var(--adm-color-text-light-solid);
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.12);
    color: var(--fill-color);
    &:focus {
      outline: none;
    }
  }
  &-thumb-icon {
    width: 12px;
    height: 12px;
    margin: 8px;
    user-select: none;
  }
  &-thumb-container {
    cursor: grab;
    touch-action: none;
    position: absolute;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  &-mark {
    position: relative;
    width: 100%;
    overflow: visible;
    font-size: var(--adm-font-size-3);
    height: 11px;
    margin-top: 10px;
  }

  &-mark-text {
    position: absolute;
    display: inline-block;
    line-height: 1;
    color: var(--adm-color-text);
    text-align: center;
    word-break: keep-all;
    user-select: none;
    transform: translateX(-50%);
  }

  &-disabled {
    .@{class-prefix-slider}-mark,
    .@{class-prefix-slider}-thumb-icon {
      opacity: 0.4;
    }
    .@{class-prefix-slider}-tick-active,
    .@{class-prefix-slider}-fill {
      &::after {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        border-radius: inherit;
        background-color: rgba(255, 255, 255, 0.6);
      }
    }
    .@{class-prefix-slider}-thumb {
      cursor: not-allowed;
      box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.06);
    }
    .@{class-prefix-slider}-mark-text,
    .@{class-prefix-slider}-tick {
      cursor: not-allowed;
      box-shadow: none;
    }
  }
}
