input[type='checkbox'] {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  transition: background-color 0.3s;
  border: 2px solid var(--text-color);
  border-radius: 12.25%;
  padding: 0.125rem;

  &:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);

    &:hover {
      filter: saturate(200%);
    }
  }

  &::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
  }

  &:checked::before {
    background-image: url(~resources/icons/checkmark.svg);
    background-color: white;
    background-blend-mode: screen;
    mask-repeat: no-repeat;
    mask-image: url(~resources/icons/checkmark.svg);
    -webkit-mask-image: url(~resources/icons/checkmark.svg);
  }

  &:hover {
    filter: brightness(125%);
  }

  &:focus {
    outline: none;
    border-color: var(--accent-color);
  }
}

// Switch
input[type='checkbox'][data-toggle='true'] {
  min-width: 2.5rem;
  border-radius: 2.5rem;

  &::before {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-image: none;
    mask-image: none;
    -webkit-mask-image: none;
    background-color: var(--text-color);
    transform: translateX(0);
    transition: transform 0.4s;
  }

  &:focus::before {
    background-color: var(--accent-color);
  }

  &:checked::before {
    transform: translateX(1.25rem);
    background-color: white;
  }
}
