/* ==========================================================================
   Checkboxes, radios, form-check and form-floating.
   Owning feature: shared / components
   Load order is defined in Views/Shared/_CssIncludes.cshtml — do not reorder.
   ========================================================================== */

/* --- Modern Form Check / Checkboxes / Radios --------------------------- */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 1.5rem;
  margin-bottom: 0.5rem;
  padding-left: 0;
}
/* Bootstrap's `.form-check .form-check-input` (float + margin-left: -1.5em)
   beats the single-class reset below and pulls the box left of the label. */
.form-check .form-check-input {
  float: none;
  margin-top: 0;
  margin-left: 0;
}
.form-check-input,
.table input[type="checkbox"]:not(.form-check-input),
.fh-list-card input[type="checkbox"]:not(.form-check-input) {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0;
  margin-left: 0;
  float: none;
  flex-shrink: 0;
  background-color: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--fh-radius-sm, 0.35rem);
  appearance: none;
  -webkit-appearance: none;
  print-color-adjust: exact;
  cursor: pointer;
  vertical-align: middle;
  transition: background-color var(--fh-transition-fast, 0.15s ease),
              border-color var(--fh-transition-fast, 0.15s ease),
              box-shadow var(--fh-transition-fast, 0.15s ease),
              transform 0.1s ease;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.form-check-input[type="radio"] {
  border-radius: 50%;
}
.form-check-input:hover:not(:disabled),
.table input[type="checkbox"]:not(.form-check-input):hover:not(:disabled),
.fh-list-card input[type="checkbox"]:not(.form-check-input):hover:not(:disabled) {
  border-color: var(--fh-primary);
  background-color: var(--fh-primary-soft, #eff6ff);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}
.form-check-input:active:not(:disabled),
.table input[type="checkbox"]:not(.form-check-input):active:not(:disabled),
.fh-list-card input[type="checkbox"]:not(.form-check-input):active:not(:disabled) {
  transform: scale(0.92);
}
.form-check-input:checked,
.table input[type="checkbox"]:not(.form-check-input):checked,
.fh-list-card input[type="checkbox"]:not(.form-check-input):checked {
  background-color: var(--fh-primary);
  border-color: var(--fh-primary);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.75' d='m4.5 10 3.8 4 7.2-8'/%3e%3c/svg%3e");
}
.form-check-input[type="radio"]:checked {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}
.form-check-input:indeterminate,
.table input[type="checkbox"]:not(.form-check-input):indeterminate,
.fh-list-card input[type="checkbox"]:not(.form-check-input):indeterminate {
  background-color: var(--fh-primary);
  border-color: var(--fh-primary);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.75' d='M5 10h10'/%3e%3c/svg%3e");
}
.form-check-input:focus-visible,
.table input[type="checkbox"]:not(.form-check-input):focus-visible,
.fh-list-card input[type="checkbox"]:not(.form-check-input):focus-visible {
  outline: none;
  border-color: var(--fh-primary);
  box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem rgba(37, 99, 235, 0.25);
}
.form-check-input:focus:not(:focus-visible),
.table input[type="checkbox"]:not(.form-check-input):focus:not(:focus-visible),
.fh-list-card input[type="checkbox"]:not(.form-check-input):focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}
.form-check-input:disabled,
.table input[type="checkbox"]:not(.form-check-input):disabled,
.fh-list-card input[type="checkbox"]:not(.form-check-input):disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background-color: var(--fh-soft, #f7f8fa);
  border-color: var(--fh-border, #eaebef);
}
.form-check-label { font-size: var(--fh-text-base); color: var(--fh-text); cursor: pointer; user-select: none; }
/* An iCheck-style checkbox wrapper still used on the login form — no
   iCheck plugin is bundled, so style the native checkbox directly. */
.icheck-primary input[type="checkbox"], .icheck-primary input[type="radio"] {
  accent-color: var(--fh-primary);
  width: 1.05rem;
  height: 1.05rem;
  vertical-align: middle;
  margin-right: 0.35rem;
}
.form-floating > label { color: var(--fh-muted); }
.form-floating > .form-control, .form-floating > .form-select {
  background-color: var(--fh-form-bg, #ffffff);
}
.form-floating > .form-control:disabled,
.form-floating > .form-control[readonly],
.form-floating > .form-select:disabled,
.form-floating > .form-select[readonly] {
  background-color: var(--fh-soft, #f1f5f9);
}

