/* Edit font preference */
.mw-editfont-monospace {
	font-family: monospace, monospace;
}

.mw-editfont-sans-serif {
	font-family: sans-serif;
}

.mw-editfont-serif {
	font-family: serif;
}

/* Standardize font size for edit areas using edit-fonts T182320 */
.mw-editfont-monospace,
.mw-editfont-sans-serif,
.mw-editfont-serif {
	// TODO: Re-evaluate to use Codex design token like `@font-size-small`, which would mean to
	// bump the size up by equal to 14px in Vector 2022 and MinervaNeue.
	// `0.8125rem` equals `13px` at `16px` base font size.
	font-size: 0.8125rem;
	/* Standardize tab width when in edit areas */
	-moz-tab-size: 4;
	tab-size: 4;

	/* For OOUI TextInputWidget, the parent <div> element uses normal font size, and only
	 * the <textarea>/<input> inside of it has the adjusted font size. This allows the width
	 * of the widget and size of icons etc. (which are expressed in ems) to stay the same.
	 */
	&.oo-ui-textInputWidget {
		font-size: inherit;

		> .oo-ui-inputWidget-input {
			// TODO: Re-evaluate to use Codex design token like `@font-size-small`, which would mean to
			// bump the size up by equal to 14px in Vector 2022 and MinervaNeue.
			// `0.8125rem` equals `13px` at `16px` base font size.
			font-size: 0.8125rem;
		}

		// Single-line only, preserve original height to avoid
		// reflow when toggling (T246136) and to align with buttons
		// in ActionFieldLayout
		> input.oo-ui-inputWidget-input {
			min-height: 32px; // 18px original line-height + 12px padding + 2px border
		}
	}
}
