.custom-checkbox-square {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 28px;
  cursor: pointer;
  background-color: #fafaf933;
  border-radius: 6px;
  flex-shrink: 0;
}

.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: #4b5e6b;
}
.checkmark--blue {
  background-color: #f3f3f3;
}

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

/* Анимация появления галочки */
.custom-checkbox-square input:checked ~ .checkmark::before {
  color: #fff;
  font-size: 1.25rem;
  font-weight: bold;
  animation: fadeInCheck 0.2s ease-out;
}

@keyframes fadeInCheck {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.error-message {
  font-size: 12px;
  line-height: 1.25rem;
  margin-top: 4px;
  color: #ef4444;
  font-weight: 500;
}
