.switch *,
.switch *:before,
.switch *:after {
  box-sizing: border-box;
}
.switch.vertical-middle {
	transform: translate(0%, 30%);
}
.switch {
  width: 24rem;
  position: relative;
  display: inline-block;
}
.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.3s ease-in-out;
  cursor: pointer;
}
.switch .toggle-outside {
  height: 100%;
  border-radius: 2rem;
  padding: 0.25rem;
  overflow: hidden;
  transition: 0.3s ease-in-out all;
  border: 1px solid black;
}
.switch .toggle-inside {
  border-radius: 5rem;
  background: #4a4a4a;
  position: absolute;
  transition: 0.3s ease-in-out all;
}
.switch--horizontal {
  width: 18rem;
  height: 2.1rem;
  margin: 0 10px;
  font-size: 0;
  /*margin-bottom: 1rem;*/
}
.switch--horizontal input {
  height: 2.1rem;
  width: 5.1rem;
  left: 5.1rem;
  margin: 0;
}
.switch--horizontal label {
  font-size: 1.5rem;
  line-height: 3rem;
  display: inline-block;
  width: 5.1rem;
  height: 100%;
  margin: 0;
  text-align: center;
}
.switch--horizontal label:last-of-type {
  margin-left: 5.1rem;
}
.switch--horizontal .toggle-outside {
  background: #fff;
  position: absolute;
  width: 5.1rem;
  left: 5.1rem;
}
.switch--horizontal .toggle-inside {
  height: 1.5rem;
  width: 1.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--vertical {
  width: 12rem;
  height: 5.1rem;
}
.switch--vertical input {
  height: 100%;
  width: 2.1rem;
  right: 0;
  margin: 0;
}
.switch--vertical label {
  font-size: 1.5rem;
  line-height: 3rem;
  display: block;
  width: 8rem;
  height: 50%;
  margin: 0;
  text-align: center;
}
.switch--vertical .toggle-outside {
  background: #fff;
  position: absolute;
  width: 2.1rem;
  height: 100%;
  right: 0;
  top: 0;
}
.switch--vertical .toggle-inside {
  height: 1.5rem;
  left: 0.25rem;
  top: 0.25rem;
  width: 1.5rem;
}
.switch--vertical input:checked ~ .toggle-outside .toggle-inside {
  top: 0.25rem;
}
.switch--vertical input ~ input:checked ~ .toggle-outside .toggle-inside {
  top: 3.25rem;
}
.switch--no-label label {
  width: 0;
  height: 0;
  visibility: hidden;
  overflow: hidden;
}
.switch--no-label input:checked ~ .toggle-outside .toggle-inside {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(0,0,0,0.2);
}
.switch--no-label input ~ input:checked ~ .toggle-outside {
  background: #fff;
}
.switch--no-label input ~ input:checked ~ .toggle-outside .toggle-inside {
  /*background: #B40000;*/
  background: #2ecc71;
}
.switch--no-label input ~ input:checked ~ .toggle-outside {
  /*border: 1px solid #B40000;*/
  border: 1px solid #2ecc71;
}
.switch--no-label.switch--vertical {
  width: 3rem;
}
.switch--no-label.switch--horizontal {
  width: 5.1rem;
}
.switch--no-label.switch--horizontal input,
.switch--no-label.switch--horizontal .toggle-outside {
  left: 0;
}
.switch--expanding-inner input:checked + label:hover ~ .toggle-outside .toggle-inside {
  height: 1.5rem;
  width: 1.5rem;
}
.switch--expanding-inner.switch--horizontal input:hover ~ .toggle-outside .toggle-inside {
  width: 2.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: 2.5rem;
}
.switch--expanding-inner.switch--vertical input:hover ~ input:checked ~ .toggle-outside .toggle-inside {
  top: 2.25rem;
}
/* mixin */
