.switch {
  display: flex;
  align-items: center;
}


.sliderlabelplacementtop
{
  align-self:flex-end;
}
.labelplacementleft
{
  flex-direction:row-reverse;
}
.labelplacementtop
{
  flex-direction:column-reverse;
  align-items: flex-start;
}
.labelplacementbottom
{
  flex-direction:column;
  align-items: flex-start;
}
.small {
  width: var(--lib_size_24);
  height: var(--lib_size_12);
}
.medium {
  width: var(--lib_size_35);
  height: var(--lib_size_14);
}
.large {
  width: var(--lib_size_38);
  height: var(--lib_size_18);
}
.small.slider:before {
  height: var(--lib_size_10);
  width: var(--lib_size_10);
}
.medium.slider:before {
  height: var(--lib_size_18);
  width: var(--lib_size_18);
}
.large.slider:before {
  height: var(--lib_size_20);
  width: var(--lib_size_20);
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  display:inline-flex;
  /*background-color: #ccc;*/
  transition: background-color 0.6s;
  cursor: pointer;
  background-color:var(--lib_base_switch_slider_bg);
  margin: 0 var(--lib_size_20) ;
}
.labelplacementbottom .slider, .labelplacementtop .slider{
  margin: 0;
}
.labelplacementtop .slider{
  margin-top: var(--lib_size_10);
}
.labelplacementbottom .slider{
  margin-bottom: var(--lib_size_10);
  margin-top: var(--lib_size_2);
}

.slider:before {
  /*align-self: flex-end; */
  content: "";
  /*background-color: #fff; */
  transition: transform 0.4s;
  background-color:var(--lib_base_switch_slider_before_bg);
  padding: var(--lib_size_2);
  box-shadow: 0 1px 4px 0 var(--lib_base_switch_slider_before_shadow);
  margin-top: -6%;
}

input:checked + .primary.slider {
  /*background-color: #2196f3;*/
  background-color: var(--lib_base_switch_slider_primary_checked_bg);
}
input:checked + .secondary.slider {
 /* background-color: green; */
  background-color: var(--lib_base_switch_slider_secondary_checked_bg);
}

input:focus + .slider {
  /*box-shadow: 0 0 1px #2196f3; */
  box-shadow: 0 0 1px var(--lib_base_switch_slider_focus_shadow);

}
[dir=ltr] input:checked + .small.slider:before {
  transform: translateX(12px);
}
[dir=rtl] input:checked + .small.slider:before {
  transform: translateX(-12px);
}
[dir=ltr] input:checked + .medium.slider:before {
  transform: translateX(18px);
}
[dir=rtl] input:checked + .medium.slider:before {
  transform: translateX(-18px);
}
[dir=ltr] input:checked + .large.slider:before {
  transform: translateX(20px);
}
[dir=rtl] input:checked + .large.slider:before {
  transform: translateX(-20px);
}

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

.slider.round:before {
  border-radius: 50%;
}
.disabled{
  opacity: 0.5;
  cursor: default;
}
