.checkbox {
  --checkbox-width: 1.25rem;

  padding-left: calc(var(--checkbox-width) + 1rem);
  margin-bottom: var(--space-md);
  position: relative;
  cursor: pointer;
  display: block;
}

.checkbox.checkbox--with-hint {
  margin-bottom: var(--space-sm);
}

.checkbox input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.checkbox input:hover+.checkmark {
  border-color: var(--color-signature-blue-darkened);
  box-shadow: 0 0 0 1px var(--color-signature-blue-darkened);
  background-color: var(--color-white);
}

.checkbox input:focus-visible+.checkmark {
  outline: -webkit-focus-ring-color auto 1px;
}

/* Create custom checkbox */
.checkbox .checkmark {
  position: absolute;
  top: 0;
  left: 0;

  width: var(--checkbox-width);
  height: var(--checkbox-width);
  border: 1px solid var(--color-dark-gray);
  border-radius: var(--radius-sm);
  display: inline-block;
  transition: var(--transition);
  pointer-events: none;
}

/* Checkbox checked state */
.checkbox input:checked+.checkmark {
  background-color: var(--color-signature-blue-darkened);
  border-color: var(--color-signature-blue-darkened);
}

/* Add checkmark using ::after */
.checkbox input:checked+.checkmark::after {
  content: '';
  position: absolute;
  background-image: url("/assets/icons/checkmark_checkbox-9dee4bf5.svg");
  background-repeat: no-repeat;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 11px;
  transform: translate(-50%, -50%);
  color: var(--color-white);
}

.checkbox-hint {
  padding-left: 2.25rem;
}
