@import "common.css"; /* This component requires common `.clickable` */

.candidate-with-checkbox {
  background-color: var(--candidate-background);
  border-radius: 7px;
  height: 55px;
  margin-bottom: 7px;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  width: 100%;
}

.candidate-with-checkbox--with-alert {
  border: 1px solid var(--alert-text);
}

.candidate-with-checkbox:hover {
  background-color: var(--candidate-background-hover);
}

.candidate-with-checkbox label {
  flex-grow: 1;
  display: flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 7px;
}

/* Customize appearance of checkboxes (by hiding it and replacing its UI with a span.checkbox-appearance) */

.candidate-with-checkbox input[type="checkbox"],
.candidate-with-checkbox input[type="radio"] {
  opacity: 0;
  width: 1em;
  height: 1em;
  position: absolute;
  left: -100px;
}

.candidate-with-checkbox input[type="checkbox"] ~ label .checkbox-appearance {
  content: "";
  border: 2px solid var(--candidate-checkbox-border);
  border-radius: 5px;
  background-color: var(--candidate-checkbox-background);
  width: 18px;
  height: 18px;
  display: inline-block;
}

.candidate-with-checkbox input[type="radio"] ~ label .radio-button-appearance {
  content: "";
  border: 2px solid var(--candidate-checkbox-border);
  border-radius: 18px;
  background-color: var(--candidate-checkbox-background);
  width: 18px;
  height: 18px;
  display: inline-block;
}

.candidate-with-checkbox input[type="checkbox"]:checked ~ label,
.candidate-with-checkbox input[type="radio"]:checked ~ label {
  background-color: var(--candidate-background-checked);
}
.candidate-with-checkbox:hover input[type="checkbox"]:checked ~ label,
.candidate-with-checkbox:hover input[type="radio"]:checked ~ label {
  background-color: var(--candidate-background-checked-hover);
}

.candidate-with-checkbox
  input[type="checkbox"]:checked
  ~ label
  .checkbox-appearance,
.candidate-with-checkbox
  input[type="radio"]:checked
  ~ label
  .radio-button-appearance {
  background-color: var(--candidate-checkbox-checked);
  border-color: var(--candidate-checkbox-checked);
}

.candidate-with-checkbox
  input[type="checkbox"]:checked
  ~ label
  .checkbox-appearance::after,
.candidate-with-checkbox
  input[type="radio"]:checked
  ~ label
  .radio-button-appearance::after {
  content: "✓";
  color: var(--font-light);
  font-size: 20px;
  padding-left: 2px;
  line-height: 100%;
}

/* End of Customize appearance of checkboxes */

.candidate-with-checkbox .candidate-info {
  display: inline-block;
  padding-left: 15px;
  font-size: 12px;
}
