.theme-checkbox {
  position: relative;
}
.theme-checkbox input[type="checkbox"] {
  position: absolute;
  height: 0;
  width: 0;
}

.theme-checkbox input[type="checkbox"] + label {
  position: relative;
  display: flex;
  margin: 0.6em 0;
  align-items: center;
  color: #333;
  transition: color 250ms cubic-bezier(0.4, 0, 0.23, 1);
}
.theme-checkbox input[type="checkbox"] + label > span {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 1em;
  width: 20px;
  height: 20px;
  background: transparent;
  border: 2px solid #9e9e9e;
  border-radius: 2px;
  cursor: pointer;
  transition: all 250ms cubic-bezier(0.4, 0, 0.23, 1);
}
.theme-checkbox input[type="checkbox"]:checked + label > span {
  border: 10px solid var(--colorprimary);
  animation: shrink-bounce 200ms cubic-bezier(0.4, 0, 0.23, 1);
}
.theme-checkbox input[type="checkbox"]:checked + label > span:before {
  content: "";
  position: absolute;
  top: 12px;
  left: 2px;
  border-right: 3px solid transparent;
  border-bottom: 3px solid transparent;
  transform: rotate(45deg);
  transform-origin: 0% 100%;
  animation: checkbox-check 125ms 250ms cubic-bezier(0.4, 0, 0.23, 1) forwards;
}

@keyframes shrink-bounce {
  0% {
    transform: scale(1);
  }
  33% {
    transform: scale(0.85);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes checkbox-check {
  0% {
    width: 0;
    height: 0;
    border-color: #fff;
    transform: translate3d(0, 0, 0) rotate(45deg);
  }
  33% {
    width: 8px;
    height: 0;
    transform: translate3d(0, 0, 0) rotate(45deg);
  }
  100% {
    width: 8px;
    height: 15px;
    border-color: #fff;
    transform: translate3d(0, -15px, 0) rotate(45deg);
  }
}

input[type='radio'], input[type='checkbox']{
  /* width: 18px; */
  /* height: 18px; */
}