.root {
	font-family: var(--font-family);
}

.wrapper {
	display: block;
	font-size: var(--font-size-base);
	line-height: var(--line-height-base);
	box-sizing: border-box;
	display: flex;
	flex-flow: row wrap;
}

.input {
	border-radius: 0;
	margin: 0;
	font-size: inherit;
	height: calc(
		var(--line-height-base) + 2 * var(--grid-base) + 2 * var(--border-width) - 2
	); /* for IE 11 */
	line-height: var(--line-height-base);
	padding: var(--grid-base);
	box-sizing: border-box;
	background-color: var(--color-background);
	color: var(--color-text-primary);
	border: var(--border-width) solid;
	flex-grow: 1;
}

.labelWrapper,
.notchedOutline {
	display: inline-block;
	width: 100%;
}

.input:focus {
	outline: none;
}

.input::placeholder {
	color: var(--color-text-faded);
}

.wrapper.focused .leading,
.wrapper.focused .trailing,
.wrapper.focused .input {
	border-color: var(--color-highlight);
	border-bottom-color: var(--color-highlight);
}

.wrapper:hover {
	box-shadow: 0 4px 2px -2px var(--color-box-shadow);
}

.input::-ms-clear {
	display: none;
	width: 0;
	height: 0;
}

/* disabled and readonly */
.disabled .input,
.readonly .input {
	background-color: var(--color-background-faded);
}

.disabled .input:hover,
.readonly .input:hover {
	box-shadow: none;
}

/* invalid */
.invalid .leading,
.invalid .trailing,
.invalid .input {
	border-color: var(--color-border-invalid);
	border-bottom-color: var(--color-error);
}

.invalid.focused .input {
	box-shadow: var(--box-shadow-dimensions-small) var(--color-box-shadow-invalid);
}

/* valid */
.valid .leading,
.valid .trailing,
.valid .input {
	border-color: var(--color-border-valid);
	border-bottom-color: var(--color-success);
}

.valid.focused .input {
	box-shadow: var(--box-shadow-dimensions-small) var(--color-box-shadow-valid);
}

.leading,
.trailing {
	color: var(--color-text-faded);
	flex: 0 0 auto;
	font-size: inherit;
	line-height: var(--line-height-base);
	padding: var(--grid-base);
	box-sizing: border-box;
}

.leading {
	border: var(--border-width) solid;
	border-right: none;
}

.hasLeading .input {
	border-left: none;
}

.trailing {
	background-color: var(--color-background-faded);
	border: var(--border-width) solid;
	border-left: none;
}

.hasTrailing .input {
	border-right: none;
}

.defaultKind .leading,
.defaultKind .trailing,
.defaultKind .input {
	border-color: var(--color-border);
	border-bottom-color: var(--color-border-strong);
}

.outlinedKind .leading,
.outlinedKind .trailing,
.outlinedKind .input {
	border-color: var(--color-highlight);
}

.notchedOutlineNotch {
	width: 100% !important;
}
