/* Consistent form-control sizing across CRM Admin, Instructor and Student portals.
 *
 * Loaded AFTER style.css/theme.css so it wins on specificity ties. Needed because the three apps
 * ship different vintages of the DashLite theme: text inputs and selects rendered anywhere from
 * 26px to 46px, and MUI's DataGrid quick-filter added a third size again. This file pins them all
 * to one height.
 *
 * Deliberately NOT normalised here:
 *   - checkboxes / radios (.form-check-input) -- they are not text boxes and must stay small
 *   - textarea height     -- multi-line inputs size to their `rows`; only the box styling is
 *                            shared so they still line up horizontally with single-line fields
 */

:root {
  --crm-field-height: 44px;
  --crm-field-padding-y: 9px;
  --crm-field-padding-x: 14px;
  --crm-field-font-size: 14px;
}

.form-control,
.form-select,
.form-control-sm,
.form-select-sm,
.form-control-lg,
.form-select-lg {
  min-height: var(--crm-field-height);
  height: var(--crm-field-height);
  padding: var(--crm-field-padding-y) var(--crm-field-padding-x);
  font-size: var(--crm-field-font-size);
  line-height: 1.5;
}

/* Multi-line: keep the shared look, but let `rows` drive the height. */
textarea.form-control,
textarea.form-control-sm,
textarea.form-control-lg {
  height: auto;
  min-height: var(--crm-field-height);
}

/* Selects reserve room for the caret the theme draws as a background image. */
.form-select,
.form-select-sm,
.form-select-lg {
  padding-right: 2.25rem;
}

/* MUI DataGrid quick-filter / toolbar fields, so the grid search box matches the page's inputs. */
.MuiDataGrid-root .MuiInputBase-root {
  min-height: var(--crm-field-height);
  font-size: var(--crm-field-font-size);
}
.MuiDataGrid-root .MuiInputBase-input {
  padding-top: 0;
  padding-bottom: 0;
  height: auto;
  font-size: var(--crm-field-font-size);
}
