/* TheaCRM v2.8.527
   Desktop checkbox / boolean normalization.
   Problem fixed: global form-control polish applied min-height/border-radius to
   .form-check-input, making checkboxes and boolean switches tall vertical pills.
*/

@media (min-width: 768px) {
  body .thea-page input.form-check-input[type="checkbox"],
  body .thea-page input.form-check-input[type="radio"],
  body .thea-ui-form-page input.form-check-input[type="checkbox"],
  body .thea-ui-form-page input.form-check-input[type="radio"],
  body .thea-card input.form-check-input[type="checkbox"],
  body .thea-card input.form-check-input[type="radio"],
  body .card input.form-check-input[type="checkbox"],
  body .card input.form-check-input[type="radio"] {
    width: 1.05rem !important;
    height: 1.05rem !important;
    min-width: 1.05rem !important;
    min-height: 1.05rem !important;
    max-width: 1.05rem !important;
    max-height: 1.05rem !important;
    padding: 0 !important;
    flex: 0 0 1.05rem !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: .25rem !important;
    line-height: 1 !important;
    vertical-align: middle !important;
  }

  body .thea-page input.form-check-input[type="radio"],
  body .thea-ui-form-page input.form-check-input[type="radio"],
  body .thea-card input.form-check-input[type="radio"],
  body .card input.form-check-input[type="radio"] {
    border-radius: 50% !important;
  }

  /* Boolean switches are visually normalized to classic checkbox squares on desktop.
     The wrapper may still be .form-switch, but the control must not render as a tall pill. */
  body .thea-page .form-switch input.form-check-input[type="checkbox"],
  body .thea-ui-form-page .form-switch input.form-check-input[type="checkbox"],
  body .thea-card .form-switch input.form-check-input[type="checkbox"],
  body .card .form-switch input.form-check-input[type="checkbox"] {
    width: 1.05rem !important;
    min-width: 1.05rem !important;
    border-radius: .25rem !important;
    background-image: none !important;
    background-position: center !important;
    background-size: .75rem .75rem !important;
  }

  body .thea-page .form-switch input.form-check-input[type="checkbox"]:checked,
  body .thea-ui-form-page .form-switch input.form-check-input[type="checkbox"]:checked,
  body .thea-card .form-switch input.form-check-input[type="checkbox"]:checked,
  body .card .form-switch input.form-check-input[type="checkbox"]:checked {
    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='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
  }

  body .thea-page .form-check-input:focus,
  body .thea-ui-form-page .form-check-input:focus,
  body .thea-card .form-check-input:focus,
  body .card .form-check-input:focus {
    box-shadow: 0 0 0 .18rem rgba(25, 135, 84, .16) !important;
  }

  /* Keep labels compact and aligned; do not turn checkbox rows into 42px input rows. */
  body .thea-ui-form-page .form-check,
  body .thea-ui-form-page .form-switch,
  body .thea-page .form-check,
  body .thea-page .form-switch {
    min-height: 0 !important;
  }

  body .thea-ui-form-page .form-check-label,
  body .thea-page .form-check-label {
    line-height: 1.35 !important;
  }

  /* Inline check groups in tables/settings should not be stretched by card/grid helpers. */
  body .thea-page .form-check.form-check-inline,
  body .thea-ui-form-page .form-check.form-check-inline {
    display: inline-flex !important;
    align-items: center !important;
    gap: .35rem !important;
    min-height: 0 !important;
  }
}

/* Safety net outside .thea-page for admin/settings cards that use Bootstrap directly. */
@media (min-width: 768px) {
  body input.form-check-input[type="checkbox"]:not(.bulk-check):not(.row-check),
  body input.form-check-input[type="radio"] {
    min-height: 1.05rem !important;
  }
}
