:root {
  --theme-switch-background: #000000;
  --theme-switch-light-background: #ffffff;
  --theme-switch-sun-color: #b68900;
  --theme-switch-light-sun-color: #ffc207;
  --theme-switch-width: 2rem;
  --theme-switch-height: 1.2rem;
  --theme-slider-width: 0.8rem;
  --theme-slider-height: 0.8rem;
  --theme-slider-offset-left: 0.2rem;
  --theme-slider-offset-top: 0.2rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: var(--theme-switch-width);
  height: var(--theme-switch-height);
  -webkit-tap-highlight-color: transparent;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--theme-switch-light-background);
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  width: var(--theme-slider-width);
  height: var(--theme-slider-height);
  left: var(--theme-slider-offset-left);
  top: var(--theme-slider-offset-top);
  background-color: var(--theme-switch-light-sun-color);
  transition: 0.4s;
}

input:checked + .slider {
  background-color: var(--theme-switch-background);
}

input:checked + .slider:before {
  transform: translateX(var(--theme-slider-width));
  box-shadow: inset -0.3rem 0rem 0px 0rem var(--theme-switch-sun-color);
  background-color: var(--theme-switch-background);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}
