.dark-checkbox {
  position: relative;
}

.dark-checkbox .checkbox {
  display: table-cell;
  width: 100%;
  height: 100%;
  vertical-align: middle;
  text-align: center;
}

.dark-checkbox label {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.dark-checkbox label span {
  display: inline-block;
  position: relative;
  background-color: transparent;
  width: 1.5675rem;
  min-width: 1.5675rem;
  height: 1.5675rem;
  min-height: 1.5675rem;
  transform-origin: center;
  border: 2px solid #333;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 0.625rem;
  transition: background-color 150ms 200ms, transform 350ms cubic-bezier(0.78, -1.22, 0.17, 1.89);
}

.dark-checkbox label span:before {
  content: "";
  width: 0px;
  height: 2px;
  border-radius: 2px;
  background: #333;
  position: absolute;
  transform: rotate(45deg);
  top: 13px;
  left: 9px;
  transition: width 50ms ease 50ms;
  transform-origin: 0% 0%;
}

.dark-checkbox label span:after {
  content: "";
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: #333;
  position: absolute;
  transform: rotate(305deg);
  top: 16px;
  left: 10px;
  transition: width 50ms ease;
  transform-origin: 0% 0%;
}

.dark-checkbox label:hover span:before {
  width: 5px;
  transition: width 100ms ease;
}

.dark-checkbox label:hover span:after {
  width: 10px;
  transition: width 150ms ease 100ms;
}

.dark-checkbox input[type=checkbox] {
  opacity: 0;
  position: absolute;
  z-index: -1;
  left: 1em;
  top: 1em;
  width: 1px;
}

.dark-checkbox input[type=checkbox]:checked + label span {
  background-color: purple;
  transform: scale(1.25);
}

.dark-checkbox input[type=checkbox]:checked + label span:after {
  width: 10px;
  background: #fff;
  transition: width 150ms ease 100ms;
}

.dark-checkbox input[type=checkbox]:checked + label span:before {
  width: 5px;
  background: #fff;
  transition: width 150ms ease 100ms;
}

.dark-checkbox input[type=checkbox]:checked + label:hover span {
  background-color: purple;
  transform: scale(1.25);
}

.dark-checkbox input[type=checkbox]:checked + label:hover span:after {
  width: 10px;
  background: #fff;
  transition: width 150ms ease 100ms;
}

.dark-checkbox input[type=checkbox]:checked + label:hover span:before {
  width: 5px;
  background: #fff;
  transition: width 150ms ease 100ms;
}

