﻿.toggle-switch {
  display: inline-block;
  width: 36px;
  height: 20px;
  position: relative; }

.toggle-switch__helper {
  position: absolute;
  height: 12px;
  width: 100%; }
  .toggle-switch__helper:before, .toggle-switch__helper:after {
    will-change: left, background-color;
    content: '';
    position: absolute;
    left: 0;
    transition: left 200ms, background-color, 200ms; }
  .toggle-switch__helper:before {
    background-color: rgba(0, 0, 0, 0.4);
    top: 4px;
    height: 100%;
    width: 100%;
    border-radius: 10px; }
  .toggle-switch__helper:after {
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background-color: #ffffff;
    left: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1; }

.toggle-switch__checkbox {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 2;
  cursor: pointer; }
  .toggle-switch__checkbox:checked ~ .toggle-switch__helper:after {
    left: calc(100% - 19px);
    background-color: #dc3545; }
  .toggle-switch__checkbox:disabled {
    cursor: auto; }
    .toggle-switch__checkbox:disabled ~ .toggle-switch__helper {
      opacity: 0.65; }
  .toggle-switch__checkbox:active ~ .toggle-switch__helper:after {
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.05); }

.toggle-switch--amber .toggle-switch__checkbox:checked ~ .toggle-switch__helper:after {
  background-color: #ffc107; }

.toggle-switch--blue .toggle-switch__checkbox:checked ~ .toggle-switch__helper:after {
  background-color: #007bff; }

.toggle-switch--green .toggle-switch__checkbox:checked ~ .toggle-switch__helper:after {
  background-color: #28a745; }

.toggle-switch--teal .toggle-switch__checkbox:checked ~ .toggle-switch__helper:after {
  background-color: #20c997; }

.toggle-switch--purple .toggle-switch__checkbox:checked ~ .toggle-switch__helper:after {
  background-color: #6f42c1; }

.toggle-switch--cyan .toggle-switch__checkbox:checked ~ .toggle-switch__helper:after {
  background-color: #17a2b8; }

