:host {
  display: inline-block;
  --hb-slider-main-bg-color: var(--hb-color-primary);
  --hb-slider-runway-bg-color: var(--hb-fill-color-light, #e4e7ed);
  --hb-slider-stop-bg-color: var(--hb-color-white, #ffffff);
  --hb-slider-button-size: 20px;
}

.hb-slider {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  position: relative;
}

.hb-slider--vertical {
  width: 40px;
  height: 100%;
  flex-direction: column;
}

.hb-slider__runway {
  width: 100%;
  height: 6px;
  margin: 16px 0;
  background-color: var(--hb-slider-runway-bg-color);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
  vertical-align: middle;
}

.hb-slider--vertical .hb-slider__runway {
  width: 6px;
  height: 100%;
  margin: 0 16px;
}

.hb-slider__bar {
  height: 6px;
  background-color: var(--hb-slider-main-bg-color);
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
  position: absolute;
  top: 0;
  left: 0;
}

.hb-slider--vertical .hb-slider__bar {
  width: 6px;
  height: auto;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  border-bottom-left-radius: 0;
  bottom: 0;
  top: auto;
}

.hb-slider__button-wrapper {
  position: absolute;
  z-index: 1001;
  top: 50%;
  transform: translateY(-50%);
  background-color: transparent;
  text-align: center;
  user-select: none;
  outline: none;
  margin-left: calc(var(--hb-slider-button-size) / -2);
}

.hb-slider--vertical .hb-slider__button-wrapper {
  left: 50%;
  top: auto;
  bottom: 0;
  transform: translateX(-50%);
  margin-left: 0;
  margin-bottom: calc(var(--hb-slider-button-size) / -2);
}

.hb-slider__button {
  width: var(--hb-slider-button-size);
  height: var(--hb-slider-button-size);
  background-color: var(--hb-color-white, #ffffff);
  border: 2px solid var(--hb-slider-main-bg-color);
  border-radius: 50%;
  transition: 0.2s;
  user-select: none;
  cursor: grab;
}

.hb-slider__button:active {
  cursor: grabbing;
}

.hb-slider__button-wrapper:hover .hb-slider__button,
.hb-slider__button-wrapper--hover .hb-slider__button {
  transform: scale(1.2);
}

.hb-slider__tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 8px;
  background-color: rgba(0, 0, 0, 0.75);
  color: var(--hb-color-white, #ffffff);
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
}

.hb-slider__tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.75);
}

.hb-slider--disabled {
  cursor: not-allowed;
}

.hb-slider--disabled .hb-slider__runway {
  cursor: not-allowed;
  background-color: var(--hb-fill-color-light, #e4e7ed);
}

.hb-slider--disabled .hb-slider__bar {
  background-color: var(--hb-color-text-disabled, #c0c4cc);
}

.hb-slider--disabled .hb-slider__button {
  border-color: var(--hb-color-text-disabled, #c0c4cc);
  cursor: not-allowed;
}

