/* Targeted form-control reset for radio buttons and consent checkbox.
   Prevents generic text-input sizing from leaking into custom controls. */

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
}

.choice input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px;
  max-height: 18px;
  padding: 0 !important;
  margin: 0;
  border: 2px solid #9FB0BC;
  border-radius: 50%;
  background: #fff;
  box-shadow: none !important;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
}

.choice input[type="radio"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  transform: scale(0);
  transition: transform .15s ease;
}

.choice input[type="radio"]:checked {
  border-color: var(--green);
}

.choice input[type="radio"]:checked::before {
  transform: scale(1);
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

.checkbox-line input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px;
  max-height: 20px;
  padding: 0 !important;
  margin: 1px 0 0;
  border: 2px solid #9FB0BC;
  border-radius: 5px;
  background: #fff;
  box-shadow: none !important;
  flex: 0 0 20px;
  position: relative;
  cursor: pointer;
}

.checkbox-line input[type="checkbox"]:focus-visible,
.choice input[type="radio"]:focus-visible {
  outline: 3px solid rgba(242,183,5,.55);
  outline-offset: 3px;
}

.checkbox-line input[type="checkbox"]:checked {
  background: var(--green);
  border-color: var(--green);
}

.checkbox-line input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-line > span {
  display: block;
  padding-top: 1px;
  line-height: 1.5;
}

@media (max-width: 620px) {
  .checkbox-line {
    gap: 9px;
  }

  .checkbox-line input[type="checkbox"] {
    margin-top: 2px;
  }
}
