:host {
  display: inline-block;
  --hb-switch-width: 40px;
  --hb-switch-active-color: var(--hb-color-primary);
  --hb-switch-inactive-color: var(--hb-color-text-placeholder, #c0c4cc);
}

.hb-switch {
  display: inline-flex;
  align-items: center;
  position: relative;
  font-size: 14px;
  line-height: 20px;
  height: 20px;
  vertical-align: middle;
  cursor: pointer;
}

.hb-switch__original {
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  position: absolute;
}

.hb-switch__core {
  margin: 0;
  display: inline-block;
  position: relative;
  width: var(--hb-switch-width);
  height: 20px;
  border: 1px solid var(--hb-switch-inactive-color);
  outline: none;
  border-radius: 10px;
  box-sizing: border-box;
  background: var(--hb-switch-inactive-color);
  cursor: pointer;
  transition: border-color 0.3s, background-color 0.3s;
  vertical-align: middle;
}

.hb-switch__core::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  border-radius: 100%;
  transition: all 0.3s;
  width: 16px;
  height: 16px;
  background-color: var(--hb-color-white, #ffffff);
}

.hb-switch--checked .hb-switch__core {
  border-color: var(--hb-switch-active-color);
  background-color: var(--hb-switch-active-color);
}

.hb-switch--checked .hb-switch__core::after {
  left: 100%;
  margin-left: -17px;
}

.hb-switch__inner {
  position: absolute;
  left: 23px;
  font-size: 12px;
  color: var(--hb-color-white, #ffffff);
  transition: all 0.3s;
}

.hb-switch--checked .hb-switch__inner {
  left: 5px;
}

.hb-switch--disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.hb-switch--disabled .hb-switch__core {
  cursor: not-allowed;
}

