pragma-checkbox.switch svg{
  display: none;
}

:is(input[type=checkbox], pragma-checkbox).switch {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  width: 2.25rem;
  height: 1.25rem;
  position: relative;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

:is(input[type=checkbox], pragma-checkbox).switch:before {
  position: absolute;
  background: var(--c-switch-off-bg);
  border: 0.065rem solid var(--c-switch-off-bg);
  width: 2.25rem;
  height: 1.25rem;
  content: "";
  display: block;
  border-radius: 1.5rem;
  transition: all 0.3s;
}

input[type=checkbox].switch:checked:before,
pragma-checkbox[checked='true'].switch:before {
  background: var(--c-switch-on-bg);
  border: 0.065rem solid var(--c-switch-on-bg);
}

:is(input[type=checkbox], pragma-checkbox).switch:after {
  position: absolute;
  border-radius: 50%;
  content: "";
  top: 0.065rem;
  width: 1.125rem;
  height: 1.125rem;
  background: var(--c-switch-indicator);
  transform: translate(0.065rem, 0);
  will-change: transform;
  transition: transform 0.2s;
}

input[type=checkbox].switch:checked:after,
pragma-checkbox[checked='true'].switch:after {
  transform: translate(1.1rem, 0);
}

:is(input[type=checkbox], pragma-checkbox).switch:focus:before {
  border: 0.125 solid var(--c-focus);
  box-shadow: 0 0 0 0.125rem var(--c-focus);
}

:is(input[type=checkbox], pragma-checkbox).switch:hover:before {
  border: 0.0625rem solid var(--c-focus);
  box-shadow: 0 0 0 0.125rem var(--c-hover);
}

:is(input[type=checkbox], pragma-checkbox).switch[disabled]:before,
input[type=checkbox].switch[disabled]:checked:before,
pragma-checkbox[checked='true'].switch[disabled]:before {
  background-color: var(--c-switch-disabled-bg);
  border-color: var(--c-switch-disabled-bg);
}
