// Table of Content
//==================================================
//	Custom style
//	Search form
//==================================================

// [type="text"], [type="password"], [type="email"], [type="search"], [type="tel"], [type="url"], [type="date"], [type="datetime"], [type="datetime-local"], [type="time"], [type="month"], [type="week"], [type="number"]

//	Custom style
//==================================================
& when (@form) {
	form {
		.clearfix-mixin();
		& > * {
			margin-bottom : 15px;
		}
		.cl-both {
			margin-bottom : 0;
		}

		p {
			.clearfix-mixin();
		}

		// -- Recaptcha & Captcha style
		@import "form/form-recaptcha";

		// -- Buttons
		[type="submit"] {
			margin  : 0 auto;
			display : block;

			&:hover {
			}
		}
	}

	fieldset {
		background     : #fff;

		.border-radius(4px);
		border         : 1px solid #d3d3d3;
		padding-top    : 20px;
		padding-bottom : 10px;
		margin-bottom  : 20px;
		> div {
			margin-bottom : 10px;
		}

		label {
			&.inline-block {
				display : block;
			}
		}

		legend {
			background  : @brand-primary;
			color       : @primary-color;
			font-weight : bold;
			font-size   : @font-size-large;
			.border-radius(4px);
		}

		&.unstyled {
			padding : 0;
			border  : 0;

			legend {
				padding       : 0;
				margin-bottom : .45em;
				font-weight   : @heading-weight;
			}
		}
	}

	.g-recaptcha {
		& > div {
			display          : block;
			margin           : 0 auto;
			transform-origin : 50% 50%;
			@media only screen and (max-width : 576px) {
				.scale(0.8);
				transform-origin : 0 50%;
			}
		}
	}

	label, .label {
		font-weight   : normal;
		display       : block;
		margin-bottom : 0.25rem;

		&[for] {
			cursor : pointer;
		}

		&[class*="grid_"] {
			margin-bottom : 0;
		}

		.label-inline & {
			margin-bottom : 0;
			line-height   : unit(@button-line-height * 2, em);
		}

		&.required::after {
			color   : @brand-error;
			content : ' *';
		}
	}

	.notvalid {
		color : @brand-error; // !important;
	}

	select{
		height: 40.59px;
	}

	select, textarea, input {
		font-family      : @font-family-text;
		border           : @input-border-width solid @input-border-color;
		background-color : @input-bg;
		color            : @input-color;
		padding          : 0.7rem 1rem;
		.border-radius(4px);
		//.box-shadow(1px 1px 3px @gray-light inset, @input-inner-shadow);
		& when (@button-transition) {
			.transition(border 0.3s);
		}

		&:focus {
			& when not(@input-bg-focus = @input-bg) {
				background : @input-bg-focus;
			}
			& when not(@input-border-color-focus = @input-border-color) {
				border-color : @input-border-color-focus;
			}
			//.box-shadow(0 0 @input-shadow-size @input-border-color-focus; @input-shadow-focus);
		}

		&.success, &.warning, &.error, &.info {
			& when (@form-colors) {
				color : @input-color;
			}
		}
		&.success when (@form-color-success) and (@form-colors) {
			border-color : @brand-success;
			&:focus {
				.box-shadow(0 0 @input-shadow-size @brand-success inset; @input-shadow-focus);
			}
		}
		&.warning when (@form-color-warning) and (@form-colors) {
			border-color : @brand-warning;
			&:focus {
				.box-shadow(0 0 @input-shadow-size @brand-warning inset; @input-shadow-focus);
			}
		}
		&.error, &.notvalid {
			& when (@form-color-error) and (@form-colors) {
				border-color : @brand-error;
				&:focus {
					.box-shadow(0 0 @input-shadow-size @brand-error inset; @input-shadow-focus);
				}
			}
		}
		&.info when (@form-color-info) and (@form-colors) {
			border-color : @brand-info;
			&:focus {
				.box-shadow(0 0 @input-shadow-size @brand-info inset; @input-shadow-focus);
			}
		}

		&[disabled], [disabled] &, &[disabled]:focus, &.noedit, &.noedit:focus {
			border-color : @input-border-color-disabled; //!important;
			background   : @input-bg-disabled; //!important;
			color        : darken(@input-bg-disabled, 30%); //!important;
			& when (@ie) and (@ie8) {
				cursor : default; // !important;
			}
			cursor       : not-allowed; // !important;
			.box-shadow(none); // !important;
		}
	}

	[type="file"] {
		width : 100%;
	}

	select {

	}

	select {
		option {
			//        color : @text-color;
		}
	}

	textarea {
		padding    : .5em;
		min-height : 5em;

		&.resize {
			.resize(vertical);
		}
	}

	.forgot-password, .retrieveFormBlock > form + a {
		float      : left;
		margin-top : -(@button-height-base - @padding-base-vertical);
	}

	// Checkbox & Radio Styles
	//===================================================
	@import "form/form-checkbox_radio";

	// Search Form Styles
	//==================================================
	@import "../widgets/search_form";

	// Form builder elements Styles
	//==================================================
	@import "../widgets/form_builder";

	// Form labeled elements Styles
	//==================================================
	@import "form/form-labeled";

	// Form input label elements Styles
	//==================================================
	@import "form/form-input-label";
}

.form-max-width {
	max-width : 600px;
	margin    : 0 auto;
}

.labeled {
	label {
		border      : 1px solid @brand-primary;
		background  : @brand-primary;
		color       : @primary-color;
		text-align  : center;
		.border-radius(4px 0 0 4px);
		padding     : 0.7rem 0;
		line-height : 1.4;
	}
	input[type="text"] {
		.border-radius(0 4px 4px 0);
	}
	@media only screen and (max-width : @responsive-size-tablet) {
		label {
			.border-radius(0 0 4px 4px);
		}

		input[type="text"] {
			.border-radius(4px 4px 0 0);
		}
	}
}