// /**
//  * Copyright © 2013-2017 Magento, Inc. All rights reserved.
//  * See COPYING.txt for license details.
//  */

//
//  Variables
//  _____________________________________________

@form-field__vertical-indent__desktop: 29px;
@form-calendar-icon__color: @primary__color;

//
//  Common
//  _____________________________________________

& when (@media-common = true) {
    input {
		.lib-input-placeholder(@theme-input-color__placeholder, 400);
	}
	
	textarea,
	select,
	input[type="text"], 
	input[type="password"], 
	input[type="url"], 
	input[type="tel"], 
	input[type="search"], 
	input[type="number"], 
	input[type="datetime"], 
	input[type="email"] {
		width: 100%;
		border-width: @theme-input-border-width;
		border-style: @theme-input-border-type;
		border-color: @theme-input-border-color;
		border-radius: @theme-input-border-radius;
		font-weight: @theme-input-font-weight;
		height: @theme-input-height;
		font-size: @theme-input-font-size;
		padding: @theme-input-padding;
		box-shadow: @theme-input-shadow;
		&:focus {
			outline: none;
			box-shadow: none;
			border-color: @theme-input-border-color__focus;
			box-shadow: @theme-input-shadow__focus;
		}
		&.mage-error {
			border-color: @theme-input-border-color__error;
		}
		+ .nested {
			margin-top: 15px;
		}
		+ div.mage-error {
			color: @theme-input-text-color__error;
			font-size: @theme-input-font-size__error;
			font-weight: @theme-input-font-weight__error;
			margin-top: 15px;
			+ .nested {
				margin-top: 18px;
			}
		}
	}

	.fieldset {
		padding: 0;
		border: none;
		box-shadow: none;
		.field {
			+ .field {
				margin: 16px 0 0;
			}
			> .label {
				margin: 0 0 6px;
				display: block;
				font-weight: @theme-lable-font-weight;
			}
			&.required,
			._required {
				> .label:after {
					content: "*";
					color: @theme-lable-required-star-color;
					margin: 0 0 0 2px;
				}
			}
		}
	}

	select[multiple="multiple"] {
		padding: 0;
		option {
			padding: @theme-select-multiple-padding;
		}
	}
	
	textarea {
		padding: @theme-textarea-start-padding;
		min-height: @theme-textarea-start-height;
		font-family: inherit;
		line-height: inherit;
	}
	
	.field.choice:not(.review-field-rating) {
		position: relative;
		overflow: hidden;
		input[type="radio"],
		input[type="checkbox"] {
			position: absolute;
			left: -10px;
			top: 10px;
			opacity: 0;
			margin: 0;
			width: 1px;
			height: 1px;
			+ label,
			+ .label {
				position: relative;
				padding-left: 34px;
				line-height: 20px;
				cursor: pointer;
				&:before {
					content: "";
					display: block;
					width: 20px;
					height: 20px;
					border-radius: 5px;
					border: 1px solid #d7d7d7;
					position: absolute;
					left: 0;
					top: 0;
				}
			}
		}
		input[type="radio"] {
			+ label:before,
			+ .label:before {
				border-radius: 50%;
			}
			&:checked {
				+ label:after,
				+ .label:after {
					content: '';
					position: absolute;
					left: 8px;
					top: 8px;
					width: 6px;
					height: 6px;
					border-radius: 50%;
					background: #c44860;
				}
			}
		}
		input[type="checkbox"]:checked {
			+ label:after,
			+ .label:after {
				content: '\e64c';
				font-family: @theme-icon-font-family-name;
				position: absolute;
				left: 4px;
				top: 4px;
				line-height: 14px;
			}
		}
		&.disabled input[type="radio"],
		&.disabled input[type="checkbox"],
		input[type="radio"]:disabled,
		input[type="checkbox"]:disabled {
			+ label,
			+ .label {
				cursor: not-allowed;
				&:before,
				&:after {
					opacity: 0.7;
				}
			}
		}
	}
}