@import './constants.css'; // instead of including, can get constants.css to compile into style.css through package.json

$switch-inactive: var(--switch-inactive); 
$switch-active: var(--switch-active);   

$switch-width: 3em;

$switch-height: $switch-width / 1.7647; 
$switch-circle: $switch-height / 1.3;                

.switch-con
{
  display:flex;
}

.switch 
{
  align-self:center;
  position: relative;
  display: inline-block;
  width: $switch-width;
  height: $switch-height; 
}

.switch input {display:none;}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: $switch-inactive;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: $switch-circle;
  width: $switch-circle; 
  top: ($switch-height - $switch-circle)/2;
  left: ($switch-width/2 - $switch-circle);
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: $switch-active;
}

input:focus + .slider {
  box-shadow: 0 0 1px $switch-active;
}

input:checked + .slider:before {
  -webkit-transform: translateX($switch-circle);
  -ms-transform: translateX($switch-circle); 
  transform: translateX($switch-circle); 
}

/* Rounded sliders */
.slider.round {
  border-radius: $switch-height; 
}

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