//////////////////////////////////////////
// BASE FORM STYLES
//////////////////////////////////////////

form {
	margin-bottom: $form-spacing;
	@include clearfix;
}

fieldset {
	margin-bottom: $fieldset-spacing;
	@include clearfix;
}

input[type="email"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="text"],
input[type="url"],
textarea,
select,
.text,
.textarea {
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: $input-padding;
	outline: none;
	border-radius: $input-border-radius;
	font-family: inherit;
	color: $input-color;
	font-size: rem($input-font-size);
	background: $input-background-color;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	-moz-appearance: textfield;
	filter: none;
	@include transition(color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease);

	@include placeholder(#666, 0.6, $body-font, 400);
	// -- COLOR, OPACITY, FONT, FONT-WEIGHT
	
	@if $input-border{
		border: solid $input-border-color;
		border-width: $input-border-width;
	} @else{
		border: 0;
	}

	&:focus {
		border-color: #aaa;
		color: $input-focus-color;
		background-color: $input-focus-background-color;

		@if $input-box-shadow{
			box-shadow:  $input-box-shadow-value;
		} 
	}
}

select{
	margin-top: -1px;
	padding: $select-padding;
	background-image: url(/images/icons/select-tick.svg);
	background-repeat: no-repeat;
	background-position: 98.5% center;
	padding-right: rem(35);
	line-height: 1.4375;

	optgroup {
		font-style: normal;
	} 

	@include edge{
		padding: $select-padding;
		background-image: none;
	}
}

@-moz-document url-prefix() { 

	select{
		color: rgba(0,0,0,0);
		text-shadow: 0 0 0 $text-grey;

		&:focus{
			color: rgba(0,0,0,0);
			text-shadow: 0 0 0 $text-grey;
		}

		.select-label{
			color: lighten($black, 35%);
		}
	}
}

input:-webkit-autofill {
  -webkit-box-shadow: inset 0 0 0px 9999px white;
}

textarea {
	min-height: $textarea-height; 
}

label,
legend {
	display: block;
	font-weight: 700;

	> span{
		font-weight: normal;
		color: #444;
	}
}

input[type="checkbox"], 
input[type="radio"] {
	display: inline;
	margin-right: 0.375em;
	padding: 0;
}

.required {
	color: #D91E18;
	font-weight: 700;
	margin: 0 0.25em
}

.opt-in{
	margin: 1.6em 0;
	position: relative;
	@include transition(background-color 0.25s ease);

	.checkbox{
		display: none;
	}

	label{
		cursor: pointer;
		position: relative;
		padding-left: rem(40, $em-base);
		font-weight: 400;
		margin: 0;
		display: inline-block;
		text-transform: none;
	}

	.indicator{
		border: 2px solid #ccc;
		width: rem(15);
		height: rem(15);
		display: block;
		position: absolute;
		top: rem(2);
		left: 0;
		padding: 2px;
		@include transition(background-color 0.25s ease);
		box-sizing: content-box;
	}

	.checkbox:checked + label .indicator .inner {
		visibility: visible;
	}

	.inner{
		display: block;
		visibility: hidden;
		width: rem(15);
		height: rem(15);

		i{
			font-size: 80%;
			position: absolute;
			top: 3px;
			left: 3px;
			color: #666;
		}
	}
}

.has-error{
	border-color: $flare-error !important;
}

.error-flare{
	color: $flare-error;
	font-weight: 500;
	padding-top: 0.25rem;
}

.g-recaptcha{
	min-height: rem(80);
}