// Base for label styling
[type="checkbox"]:not(.switch):not(:checked),
[type="checkbox"]:not(.switch):checked {
  left: -9999px;
  position: absolute;
}

[type="checkbox"]:not(.switch):not(:checked) + label,
[type="checkbox"]:not(.switch):checked + label,
[type="checkbox"]:not(.switch):not(:checked) + [type=hidden] + label,
[type="checkbox"]:not(.switch):checked + [type=hidden] + label {
  cursor: pointer;
  font-weight: normal;
  padding-left: 1.95em;
  position: relative;
  margin-bottom: 0;
}

// checkbox aspect
[type="checkbox"]:not(.switch):not(:checked) + label::before,
[type="checkbox"]:not(.switch):checked + label::before,
[type="checkbox"]:not(.switch):not(:checked) + [type=hidden] + label::before,
[type="checkbox"]:not(.switch):checked + [type=hidden] + label::before {
  background: transparent;
  border: 1px solid $checkbox-border-color;
  border-radius: $border-radius-base;
  content: '';
  height: 18px;
  left: 0;
  position: absolute;
  top: 0;
  width: 18px;
}

[type="checkbox"]:not(.switch):checked + label::before,
[type="checkbox"]:not(.switch):checked + [type=hidden] + label::before {
  background-color: $checkbox-checked-bg-color;
  border-color: $checkbox-checked-bg-color;
}

// checked mark aspect
[type="checkbox"]:not(.switch):not(:checked) + label::after,
[type="checkbox"]:not(.switch):checked + label::after,
[type="checkbox"]:not(.switch):not(:checked) + [type=hidden] + label::after,
[type="checkbox"]:not(.switch):checked + [type=hidden] + label::after  {
  background: url($base-icon-path + 'check-mark.svg') no-repeat center center;
  background-size: 17px;
  content: '';
  font-size: 1.3em;
  height: 16px;
  left: 2px;
  line-height: .8;
  position: absolute;
  top: 2px;
  transition: all .2s;
  width: 16px;
}

// checked mark aspect changes
[type="checkbox"]:not(.switch):not(:checked) + label::after,
[type="checkbox"]:not(.switch):not(:checked) + [type=hidden] + label::after {
  opacity: 0;
  transform: scale(0);
}

[type="checkbox"]:not(.switch):checked + label::after,
[type="checkbox"]:not(.switch):checked + [type=hidden] + label::after {
  opacity: 1;
  transform: scale(1);
}

// disabled checkbox
[type="checkbox"]:not(.switch):disabled:not(:checked) + label::before,
[type="checkbox"]:not(.switch):disabled:checked + label::before,
[type="checkbox"]:not(.switch):disabled:not(:checked) + [type=hidden] + label::before,
[type="checkbox"]:not(.switch):disabled:checked + [type=hidden] + label::before {
  background-color: transparent;
  border-color: $checkbox-disabled-border-color;
  box-shadow: none;
}

[type="checkbox"]:not(.switch):disabled:checked + label::before,
[type="checkbox"]:not(.switch):disabled:checked + [type=hidden] + label::before {
  background-color: $checkbox-disabled-border-color;
}

[type="checkbox"]:not(.switch):disabled + label,
[type="checkbox"]:not(.switch):disabled + [type=hidden] + label {
  color: $checkbox-disabled-text-color;
  cursor: not-allowed;
}

