.check {
  display: block;
  position: relative;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 22px;
  user-select: none;
}

/* Hide the default checkbox */
.check input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Create the custom checkbox */
.checkmarkSr {
  position: absolute;
  height: 16px;
  width: 16px;
  background-color: white;
  border-radius: 4px;
  /* border: 1px solid black; Default border color */
  left: 6px;
  top: -6px;
}

/* On hover, change the background color */
.check:hover input ~ .checkmarkSr {
  background-color: #ccc;
}

/* When the checkbox is checked, remove the border */
.check input:checked ~ .checkmarkSr {
  background-color: #29845a;
  border: none; /* Remove the border when checked */
}

/* Show the checkmark when the checkbox is checked */
.check input:checked ~ .checkmarkSr:after {
  display: block;
}

/* Create the checkmark */
.checkmarkSr:after {
  content: '';
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: 1px solid white; /* Default white checkmark color */
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  animation: bounceFadeIn 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Change the checkmark color based on --checkmark-color */
.check input:checked ~ .checkmarkSr:after {
  border-color: var(--checkmark-color, white); /* Default is white */
  transform: rotate(45deg);
  animation: bounceFadeIn 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes bounceFadeIn {
  from {
    transform: translate(0, -10px) rotate(45deg);
    opacity: 0;
  }

  to {
    transform: translate(0, 0) rotate(45deg);
    opacity: 1;
  }
}
