.custom-checkbox-square {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 28px;
  cursor: pointer;
  flex-shrink: 0;

  @media(width < 769px) {
    width: 24px;
    height: 24px;
  }
}

.custom-checkbox-square input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: pointer;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 0.75rem;
  font-weight: bold;
  transition: all 0.2s ease;

  @media(width > 768px) {
    font-size: 1.25rem;
  }
}

.checkmark--white {
  background-color: #FFFFFF;
  border: 1px solid #c7c7c7;
}

.checkmark--black {
  background-color: #3D3D3D;
  border: 1px solid #D4D3D3;
}

.checkmark--blue {
  background-color: #FAFAFA45;
}

.checkmark--gray {
  background-color: #FFFFFF;
  border: 1px solid #c7c7c7;
}

/* Когда отмечен — делаем белый фон и показываем галочку */
.custom-checkbox-square input:checked~.checkmark--blue {
  background-color: #FFFFFF !important;
  color: #D40221;
}

.custom-checkbox-square input:checked~.checkmark--white {
  color: #D40221;
}

.custom-checkbox-square input:checked~.checkmark--black {
  color: #ff0000;
}

.custom-checkbox-square input:checked~.checkmark--gray {
  background-color: #FFFFFF !important;
  color: #000000;
}