.resetAppearance {
  /* Add if not using autoprefixer */
  -webkit-appearance: none;
  appearance: none;
  /* Not removed via appearance */
  margin: 0;
}

.checkbox {
  display: grid;
  place-content: center;
  background-color: var(--bgcolor-checkbox);
  color: currentColor;
  min-width: 1.2em;
  min-height: 1.2em;
  width: 1.2em;
  height: 1.2em;
  border: 2px solid var(--color-checkbox-border-normal);
  border-radius: 0.2em;
  outline: none;
  cursor: pointer;

  &:disabled {
    cursor: not-allowed;
    border-color: gray;
  }

  &::before {
    content: "";
    width: 0.7em;
    height: 0.7em;
    transform: scale(0);
    transition: 0.1s transform ease-out;
    box-shadow: inset 1em 1em var(--color-checkbox);
    transform-origin: center;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  }
  &:checked {
    border-color: var(--color-checkbox-border-normal);
    background-color: var(--bgcolor-checkbox);
  }

  &:checked::before {
    transform: scale(1);
  }

  &:checked:disabled {
    background-color: var(--bgcolor-checkbox);
    border-color: gray;

    &::before {
      box-shadow: inset 1em 1em grey;
    }
  }

  &:focus {
    border-color: var(--color-checkbox-border-focused);
  }
}

.checkboxWrapper {
  display: flex;
  flex-direction: row;
  justify-items: center;
  font-size: 0.9em;
  margin: 2px 0 6px 0;
}

label {
  cursor: pointer;

  &.left {
    margin-right: 8px;
  }

  &.right {
    margin-left: 8px;
  }

  &.disabled {
    color: grey;
    cursor: not-allowed;
  }
}

