////
/// Form elements.
///
/// @group  Elements
/// @author Lee Anthony <seothemeswp@gmail.com>
/// @link   https://CustomizePro.com/
////

::placeholder {
	opacity: 1; // Firefox fix
}

label {
	display: block;
	margin: 0 0 $spacing--s;
}

input,
select,
textarea {
	width: 100%;
	margin: 0 0 $spacing--s;
	background-clip: padding-box; // Remove iOS box shadow.

	&:focus {
		border-color: $color--primary;
		outline: none;
	}

	&:disabled,
	&:disabled:hover {
		border-color: map_get($colors, grey-light);
		color: map_get($colors, grey);
		background-color: map_get($colors, grey-lighter);
		cursor: not-allowed;
	}
}

select {
	height: 2em;
}

input[type="checkbox"],
input[type="image"],
input[type="radio"] {
	width: auto;
	margin-right: $spacing--s;
}

input[type="color"] {
	min-height: $spacing--xl;
}

input[type="search"] {
	-webkit-appearance: none;

	&::-webkit-search-cancel-button,
	&::-webkit-search-results-button {
		display: none;
	}
}

fieldset {
	min-width: 0;
	margin: 0;
	padding: 0.01em 0 0 0;
	border: 0;

	body:not(:-moz-handler-blocked) & {
		display: table-cell;
	}
}

legend {
	display: table;
	float: left;
	width: 100%;
	margin: 0 0 $spacing--s;
	padding: 0;

	+ * {
		clear: both;
	}
}
