.checkbox label, .radio label {
  padding-left: 0;
}

td > label.checkbox, td > label.radio {
  display : inline ;
}

[type="radio"] + span:not(.lever) {
  font-weight: normal;
}

/* Radio and checkbox inside form-control */
.form-control .checkbox.inline-container,
.form-control .radio.inline-container {
  margin-top: 5px;
}


/* Checkboxes
   ========================================================================== */

/* Remove default checkbox */
[type="checkbox"]:not(:checked),
[type="checkbox"]:checked {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

[type="checkbox"] + span:not(.lever) {
  position: relative;
  padding-left: 2rem;
  cursor: pointer;
  display: inline-block;
  height: 1.4rem;
  line-height: 1.4rem;
  font-size: 1rem;
  user-select: none;
     user-select: none;
      user-select: none;
          user-select: none;
  transition: font-weight .3s, color .3s;
}

.filter-box [type="checkbox"] + span:not(.lever) {
  padding-left: 1.6rem;
}

[type="checkbox"] + span:not(.lever)::before,
[type="checkbox"] + span:not(.lever)::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1rem;
  height: 1rem;
  z-index: 0;
  border: 2px solid var(--checkbox-color);
  border-radius: 3px;
  opacity: .9;
  margin-top: 2px;
  transition: .2s;
  transition: .2s;
}

[type="checkbox"]:not(:checked) + span:not(.lever)::after {
  border: 0;
}

[type="checkbox"]:not(:checked):disabled + span:not(.lever)::before {
  border: none;
  background-color: rgb(0 0 0 / 42%);
}

[type="checkbox"]:checked + span:not(.lever) {
  color: var(--checkbox-color);
}

[type="checkbox"]:checked + span:not(.lever)::before {
  top: -.25rem;
  left: -.15rem;
  width: .7rem;
  height: 1.2rem;
  opacity: 1;
  border-top: .17rem solid transparent;
  border-left: .17rem solid transparent;
  border-right: .17rem solid var(--checkbox-color);
  border-bottom: .17rem solid var(--checkbox-color);
  transform: rotate(35deg);
          transform: rotate(35deg);
  backface-visibility: hidden;
          backface-visibility: hidden;
  transform-origin: 100% 100%;
          transform-origin: 100% 100%;
}

[type="checkbox"]:checked:disabled + span:not(.lever)::before {
  border-right: .1rem solid rgb(0 0 0 / 42%);
  border-bottom: .1rem solid rgb(0 0 0 / 42%);
}

/* Indeterminate checkbox */
[type="checkbox"]:indeterminate + span:not(.lever)::before {
  top: -.65rem;
  left: -.7rem;
  width: .6rem;
  height: 1.3rem;
  border-top: none;
  border-left: none;
  border-right: .1rem solid var(--checkbox-color);
  border-bottom: none;
  transform: rotate(90deg);
          transform: rotate(90deg);
  backface-visibility: hidden;
          backface-visibility: hidden;
  transform-origin: 100% 100%;
          transform-origin: 100% 100%;
}

[type="checkbox"]:indeterminate:disabled + span:not(.lever)::before {
  border-right: .1rem solid rgb(0 0 0 / 42%);
  background-color: transparent;
}

@media (width <= 800px) {
  [type="checkbox"]:checked + span:not(.lever)::before { top: -.35rem; }
}




/* Radio Buttons
   ========================================================================== */
[type="radio"]:not(:checked),
[type="radio"]:checked {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

[type="radio"]:not(:checked) + span:not(.lever),
[type="radio"]:checked + span:not(.lever) {
  position: relative;
  padding-left: 2rem;
  cursor: pointer;
  display: inline-block;
  height: 1.4rem;
  line-height: 1.4rem;
  font-size: 1rem;
  transition: .28s ease;
  transition: .28s ease;
  user-select: none;
     user-select: none;
      user-select: none;
          user-select: none;
}

[type="radio"]:checked + span:not(.lever) {
  color: var(--checkbox-color);
}

[type="radio"] + span:not(.lever)::before,
[type="radio"] + span:not(.lever)::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 1rem;
  height: 1rem;
  margin: 2px 0 0;
  z-index: 0;
  transition: .28s ease;
  transition: .28s ease;
}

/* Unchecked styles */
[type="radio"]:not(:checked) + span:not(.lever)::before,
[type="radio"]:not(:checked) + span:not(.lever)::after,
[type="radio"]:checked + span:not(.lever)::before,
[type="radio"]:checked + span:not(.lever)::after,
[type="radio"].with-gap:checked + span:not(.lever)::before,
[type="radio"].with-gap:checked + span:not(.lever)::after {
  border-radius: 50%;
}

[type="radio"]:not(:checked) + span:not(.lever)::before,
[type="radio"]:not(:checked) + span:not(.lever)::after {
  border: 2px solid var(--checkbox-color);
}

[type="radio"]:not(:checked) + span:not(.lever)::after {
  transform: scale(0);
          transform: scale(0);
}

/* Checked styles */
[type="radio"]:checked + span:not(.lever)::before {
  border: 2px solid var(--checkbox-color);
}

[type="radio"]:checked + span:not(.lever)::after,
[type="radio"].with-gap:checked + span:not(.lever)::before,
[type="radio"].with-gap:checked + span:not(.lever)::after {
  border: 2px solid var(--checkbox-color);
}

[type="radio"]:checked + span:not(.lever)::after,
[type="radio"].with-gap:checked + span:not(.lever)::after {
  background-color: var(--checkbox-color);
}

[type="radio"]:checked + span:not(.lever)::after {
  transform: scale(.5);
          transform: scale(.5);
}

/* Radio With gap */
[type="radio"].with-gap:checked + span:not(.lever)::after {
  transform: scale(0.5);
          transform: scale(0.5);
}

/* Focused styles */
[type="radio"].tabbed:focus + span:not(.lever)::before {
  box-shadow: 0 0 0 10px rgb(0 0 0 / 10%);
          box-shadow: 0 0 0 10px rgb(0 0 0 / 10%);
}

/* Disabled Radio With gap */
[type="radio"].with-gap:disabled:checked + span:not(.lever)::before {
  border: 2px solid rgb(0 0 0 / 42%);
}

[type="radio"].with-gap:disabled:checked + span:not(.lever)::after {
  border: none;
  background-color: rgb(0 0 0 / 42%);
}

/* Disabled style */
[type="radio"]:disabled:not(:checked) + span:not(.lever)::before,
[type="radio"]:disabled:checked + span:not(.lever)::before {
  background-color: transparent;
  border-color: rgb(0 0 0 / 42%);
}

[type="radio"]:disabled + span:not(.lever) {
  color: rgb(0 0 0 / 42%);
}

[type="radio"]:disabled:not(:checked) + span:not(.lever)::before {
  border-color: rgb(0 0 0 / 42%);
}

[type="radio"]:disabled:checked + span:not(.lever)::after {
  background-color: rgb(0 0 0 / 42%);
  border-color: #949494;
}

/* SWITCH */
.switch label input[type="checkbox"]:checked + .lever::after {
  background-color: var(--primary-color);
}
