Не срабатывает кастомный checkbox

Хотел сделать красивый чекбокс, попытался сделать, визуально вышло, а вот по факту он даже не работает. В чём дело?

введите сюда описание изображения

.form-buttons {
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: auto;
}
.form-buttons label {
  margin-bottom: 25px;
}
.form-buttons label:last-child {
  margin-bottom: 0;
}
.form-submit-button {
  height: 54px;
  width: auto;
  font-family: "Mazzard";
  font-style: normal;
  font-weight: 600;
  font-size: 21.7636px;
  line-height: 26px;
  letter-spacing: -0.0024em;
  color: #ffffff;
  background: #4d30ff;
  border-radius: 2px;
}
.custom-checkbox {
  position: absolute;
  z-index: -1;
  opacity: 0;
}
.custom-checkbox + label {
  display: inline-flex;
  align-items: center;
  user-select: none;
  font-style: normal;
  font-weight: normal;
  font-size: 16px;
  line-height: 16px;
  color: #212d3a;
}
.custom-checkbox + label::before {
  content: "";
  display: inline-block;
  width: 25px;
  height: 25px;
  flex-shrink: 0;
  flex-grow: 0;
  border: 1px solid #adb5bd;
  border-radius: 2px;
  margin-right: 0.5em;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 50% 50%;
}
.custom-checkbox:checked + label::before {
  border-color: #0b76ef;
  background-color: #0b76ef;
  background-image: url("../images/checkbox.svg");
}
/* стили при наведении курсора на checkbox */
.custom-checkbox:not(:disabled):not(:checked) + label:hover::before {
  border-color: #b3d7ff;
}
/* стили для активного состояния чекбокса (при нажатии на него) */
.custom-checkbox:not(:disabled):active + label::before {
  background-color: #b3d7ff;
  border-color: #b3d7ff;
}
/* стили для чекбокса, находящегося в фокусе */
.custom-checkbox:focus + label::before {
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
/* стили для чекбокса, находящегося в фокусе и не находящегося в состоянии checked */
.custom-checkbox:focus:not(:checked) + label::before {
  border-color: #80bdff;
}
/* стили для чекбокса, находящегося в состоянии disabled */
.custom-checkbox:disabled + label::before {
  background-color: #e9ecef;
}
<div class="form-buttons">
    <input class="custom-checkbox" type="checkbox" name="a" value="yes"/>
        <label for="yes">Согласен</label>
    <label>
        <input class="form-submit-button" type="submit" value="Отправить"/>
    </label>
</div>


Ответы (0 шт):