/* OmniVenta ERP V62.8 - system-wide form alignment audit.
 * Presentation only. Keeps legacy Bootstrap 3, Select2 and Selectize controls
 * on the same visual grid without changing Sales/Receiving product scanners.
 */

/* Standard form controls in this application are 40px high. Keep Select2
 * single/multi controls on the same baseline so mixed rows do not look uneven. */
body.ov-responsive .form-group .select2-container .select2-choice,
body.ov-responsive .form-group .select2-container--default .select2-selection--single {
  min-height:40px!important;
  height:40px!important;
  line-height:38px!important;
  box-sizing:border-box!important;
}
body.ov-responsive .form-group .select2-container .select2-choice .select2-chosen,
body.ov-responsive .form-group .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height:38px!important;
}
body.ov-responsive .form-group .select2-container--default .select2-selection--single .select2-selection__arrow {
  height:38px!important;
}
body.ov-responsive .form-group .select2-container-multi,
body.ov-responsive .form-group .select2-container--default .select2-selection--multiple {
  min-height:40px!important;
  height:auto!important;
  box-sizing:border-box!important;
}
body.ov-responsive .form-group .select2-container-multi .select2-choices {
  min-height:40px!important;
}

/* Selectize may copy .form-control from the source select onto its generated
 * outer .selectize-control. Bootstrap would then paint an extra shell around
 * the real .selectize-input. Remove only that accidental outer shell. */
body.ov-responsive .selectize-control.form-control {
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
body.ov-responsive .selectize-control.form-control:focus,
body.ov-responsive .selectize-control.form-control.focus {
  border:0!important;
  box-shadow:none!important;
  outline:0!important;
}
body.ov-responsive .form-group .selectize-control.single .selectize-input {
  min-height:40px!important;
  box-sizing:border-box!important;
}
body.ov-responsive .form-group .selectize-control.multi .selectize-input {
  min-height:40px!important;
  height:auto!important;
  box-sizing:border-box!important;
}

/* Explicit full-width input groups used by date/time fields corrected in the
 * audit. They now occupy the exact Bootstrap control column instead of starting
 * immediately after a floated label. */
body.ov-responsive .ov-full-width-input-group {
  width:100%!important;
  max-width:100%!important;
}

/* Legacy integration checkbox lists now participate in the Bootstrap grid. */
body.ov-responsive .ov-check-list {
  list-style:none!important;
  margin:0!important;
  padding:0!important;
  max-width:100%;
}
body.ov-responsive .ov-check-list > li {
  margin:0 0 6px 0;
  min-width:0;
}

/* Marker used when an enhanced select must not carry obsolete Bootstrap 2
 * width classes. The plugin owns the visible control. */
body.ov-responsive .ov-select-control + .select2-container,
body.ov-responsive .ov-select-control + .selectize-control,
body.ov-responsive .select2-container.ov-select-control,
body.ov-responsive .selectize-control.ov-select-control {
  width:100%!important;
  max-width:100%!important;
}

/* Purchase Planner deliberately uses a compact 38px filter grid; preserve its
 * internal rhythm while the rest of the system uses the standard 40px row. */
body.ov-responsive .purchase-planner .field .form-control,
body.ov-responsive .purchase-planner .field .select2-container .select2-choice,
body.ov-responsive .purchase-planner .field .select2-container--default .select2-selection--single {
  min-height:38px!important;
  height:38px!important;
  line-height:36px!important;
}
body.ov-responsive .purchase-planner .field .select2-container .select2-choice .select2-chosen,
body.ov-responsive .purchase-planner .field .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height:36px!important;
}
body.ov-responsive .purchase-planner .field .select2-container-multi,
body.ov-responsive .purchase-planner .field .select2-container-multi .select2-choices,
body.ov-responsive .purchase-planner .field .select2-container--default .select2-selection--multiple {
  min-height:38px!important;
  height:auto!important;
}

@media(max-width:767px){
  body.ov-responsive .form-group .select2-container .select2-choice,
  body.ov-responsive .form-group .select2-container--default .select2-selection--single {
    min-height:44px!important;
    height:44px!important;
    line-height:42px!important;
  }
  body.ov-responsive .form-group .select2-container .select2-choice .select2-chosen,
  body.ov-responsive .form-group .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height:42px!important;
  }
  body.ov-responsive .form-group .select2-container--default .select2-selection--single .select2-selection__arrow {
    height:42px!important;
  }
  body.ov-responsive .form-group .select2-container-multi,
  body.ov-responsive .form-group .select2-container-multi .select2-choices,
  body.ov-responsive .form-group .select2-container--default .select2-selection--multiple,
  body.ov-responsive .form-group .selectize-control.single .selectize-input,
  body.ov-responsive .form-group .selectize-control.multi .selectize-input {
    min-height:44px!important;
  }
  body.ov-responsive .purchase-planner .field .form-control,
  body.ov-responsive .purchase-planner .field .select2-container .select2-choice,
  body.ov-responsive .purchase-planner .field .select2-container--default .select2-selection--single {
    min-height:44px!important;
    height:44px!important;
    line-height:42px!important;
  }
  body.ov-responsive .purchase-planner .field .select2-container .select2-choice .select2-chosen,
  body.ov-responsive .purchase-planner .field .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height:42px!important;
  }
  body.ov-responsive .purchase-planner .field .select2-container--default .select2-selection--single .select2-selection__arrow {
    height:42px!important;
  }
  body.ov-responsive .purchase-planner .field .select2-container-multi,
  body.ov-responsive .purchase-planner .field .select2-container-multi .select2-choices,
  body.ov-responsive .purchase-planner .field .select2-container--default .select2-selection--multiple {
    min-height:44px!important;
    height:auto!important;
  }
}
