.switch {
  margin: 4rem auto;
  position: relative;
}
.switch input {
  position: absolute;
  top: 0;
  z-index: 2;
  opacity: 0;
  cursor: pointer;
}
.switch input:checked {
  z-index: 1;
}
.switch input:checked + label {
  opacity: 1;
  cursor: default;
}
.switch input:not(:checked) + label:hover {
  opacity: 0.5;
}
.switch label {
  color: #fff;
  opacity: 0.33;
  transition: opacity 0.25s ease;
  cursor: pointer;
}
.switch .toggle-outside {
  height: 100%;
  border-radius: 2rem;
  padding: 0.25rem;
  overflow: hidden;
  transition: 0.25s ease all;
}
.switch .toggle-inside {
  border-radius: 5rem;
  background: #BECB35;
  position: absolute;
  transition: 0.25s ease all;
}
.switch--horizontal {
  height: 3rem;
  margin: 0 auto;
}
.switch--horizontal input {
  height: 3rem;
  width: 6rem;
  left: 6rem;
  margin: 0;
}
.switch--horizontal label {
  font-size: 15px;
  font-weight: normal;
  line-height: 3rem;
  display: inline-block;
  width: 6rem;
  height: 100%;
  margin: 0;
  text-align: center;
}
.switch--horizontal label:last-of-type {
  margin-left: 6rem;
}
.switch--horizontal .toggle-outside {
  background: #fff;
  position: absolute;
  width: 6rem;
  left: 6rem;
}
.switch--horizontal .toggle-inside {
  height: 2.5rem;
  width: 2.5rem;
}
.switch--horizontal input:checked ~ .toggle-outside .toggle-inside {
  left: 0.25rem;
}
.switch--horizontal input ~ input:checked ~ .toggle-outside .toggle-inside {
  left: 3.25rem;
}

.switch--expanding-inner input:checked + label:hover ~ .toggle-outside .toggle-inside {
  height: 2.5rem;
  width: 2.5rem;
}
.switch--expanding-inner.switch--horizontal input:hover ~ .toggle-outside .toggle-inside {
  width: 3.5rem;
}
.switch--expanding-inner.switch--horizontal input:hover ~ input:checked ~ .toggle-outside .toggle-inside {
  left: 2.25rem;
}
.switch--expanding-inner.switch--vertical input:hover ~ .toggle-outside .toggle-inside {
  height: 3.5rem;
}
.switch--expanding-inner.switch--vertical input:hover ~ input:checked ~ .toggle-outside .toggle-inside {
  top: 2.25rem;
}