.form-select {
	background:
		var(--color-surface)
		url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOSAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1LjUgNi43NTAwMUw5LjUgMTIuNzVMMy41IDYuNzUwMDFMNC41NjA1IDUuNjg5NTFMOS41IDEwLjYyOUwxNC40Mzk1IDUuNjg5NTFMMTUuNSA2Ljc1MDAxWiIgZmlsbD0iIzY0Njk3MCIvPgo8L3N2Zz4K)
		no-repeat right 10px center;
	border-color: var(--color-neutral-10);
	border-style: solid;
	border-radius: 2px;
	border-width: 1px;
	color: var(--color-neutral-70);
	cursor: pointer;
	display: inline-block;
	margin: 0 0 1em;
	outline: 0;
	overflow: hidden;
	font-size: $font-body;
	font-weight: 400;
	/* stylelint-disable-next-line declaration-property-unit-allowed-list */
	line-height: 1.4em;
	text-overflow: ellipsis;
	text-decoration: none;
	vertical-align: top;
	white-space: nowrap;
	box-sizing: border-box;
	padding: 7px 32px 9px 14px; // Aligns the text to the 8px baseline grid and adds padding on right to allow for the arrow.
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;

	&:focus {
		border-color: var(--color-primary);
		box-shadow: 0 0 0 2px var(--color-primary-10);
		outline: 0;
		-moz-outline: none;
		-moz-user-focus: ignore;

		&.is-error {
			box-shadow: 0 0 0 2px var(--color-error-10);
		}

		&.is-error:hover {
			box-shadow: 0 0 0 2px var(--color-error-20);
		}
	}

	&:disabled,
	&:hover:disabled {
		background:
			url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1IDYuNzUwMDFMOSAxMi43NUwzIDYuNzUwMDFMNC4wNjA1IDUuNjg5NTFMOSAxMC42MjlMMTMuOTM5NSA1LjY4OTUxTDE1IDYuNzUwMDFaIiBmaWxsPSIjQzNDNEM3Ii8+Cjwvc3ZnPgo=)
			no-repeat right 10px center;
		background-color: var(--studio-gray-0);
		border-color: var(--gray-gray-10, #c3c4c7);
		opacity: 1;
	}

	// A smaller variant that works well when presented inline with text
	&.is-compact {
		min-width: 0;
		padding: 0 20px 2px 6px;
		margin: 0 4px;
		background-position: right 5px center;
		background-size: 12px 12px;
	}

	// Make it display:block when it follows a label
	label &,
	label + & {
		display: block;
		min-width: 200px;

		&.is-compact {
			display: inline-block;
			min-width: 0;
		}
	}

	// IE: Remove the default arrow
	&::-ms-expand {
		display: none;
	}

	// IE: Remove default background and color styles on focus
	&::-ms-value {
		background: none;
		color: var(--color-neutral-70);
	}

	// Firefox: Remove the focus outline, see http://stackoverflow.com/questions/3773430/remove-outline-from-select-box-in-ff/18853002#18853002
	&:-moz-focusring {
		color: transparent;
		text-shadow: 0 0 0 var(--color-neutral-70);
	}

	&.is-error {
		border-color: var(--color-error);
	}

	&.is-error:hover {
		border-color: var(--color-error-dark);
	}

	&:disabled {
		color: var(--studio-gray-20);
	}
}

// According to CSS tricks, browser support is IE9+
.form-select:only-of-type,
.form-select:last-of-type {
	margin-bottom: 0;
}
