input[type=text],
input[type=password],
input[type=submit],
input[type=button],
input[type=reset],
a.button,
button,
textarea,
select,
legend {
	max-width: 100%;
}

input[type=text],
input[type=password],
input[type=submit],
input[type=button],
input[type=reset],
a.button,
button,
textarea,
legend {
	border-radius: 3px;
}

form {
	display: block;
	margin: 0;
	padding: 0;
}

fieldset {
	display: block;
	margin: 1em 0;
	padding: 1em 0.5em;
	border-width: 1px 0;
	border-style: solid;
	border-color: #ccc;
	background: #f7f7f7;
	&:focus-within {
		background-color: #eee;
	}
}

input[type=text],
textarea {
	font-family: $sans-serif-input;
	font-size: 100%;
}

legend {
	padding: 0.2em 0.6em;
	border-width: 1px;
	border-style: solid;
	border-color: #676e78;
	background: #fff;
	margin-bottom: 0.5em;
}

label .maximal,
textarea.maximal,
input.maximal,
select.maximal {
	width: 99%;
}

input.invalid,
textarea.invalid,
select.invalid,
input:not([type=file]):invalid:not(:focus) {
	color: #900;
	box-shadow: 0 0 0 3px rgba(218, 62, 90, 0.3);
}
input.invalid,
textarea.invalid,
input:not([type=file]):invalid:not(:focus) {
	border: 1px solid red;
	background: #FFBABA;
}

input[type=text],
input[type=password],
textarea,
select,
input:not([type=file]):invalid,
input:not([type=file]):invalid:placeholder-shown {
	color: #000;
	box-shadow: 1px 1px 2px #f3f3f3 inset;
	padding: 3px;
	vertical-align: top;
}
input[type=text],
input[type=password],
textarea,
input:not([type=file]):invalid,
input:not([type=file]):invalid:placeholder-shown {
	background: #fcfcfc;
	border-width: 1px;
	border-style: solid;
	border-color: #dfdfdf;
}

input:focus,
textarea:focus {
	border-color: #9bca1c;
}

textarea {
	padding: 2px 0;
	&.maximal {
		resize: vertical;
	}
	.area & {
		display: block;
		width: 100%;
		resize: vertical;
	}
}

select {
	padding: 2px 0;
	vertical-align: middle;
}
@media not all and (min-resolution:.001dpcm)
{ @supports (-webkit-appearance:none) {
	/* Safari 10.1+ only (https://browserstrangeness.bitbucket.io/css_hacks.html#webkit) */
	select {
		font-size: initial;
    }
}}

select.l10n option {
	padding-left: 16px;
}

option.avail10n {
	background: transparent url(../images/check-on.png) no-repeat 0 50%;
}

input[type=text],
input[type=password],
textarea {
	margin-right: .3em;
}

input[type=checkbox],
input[type=radio],
input[type=file] {
	border: none;
	margin: 0 .33em 0 0;
	padding: 0;
	background: transparent;
}
input + input[type=checkbox] {
	// Used for js expand/hide (lists, options, ...)
	margin-left: .33em;
}
a input {
	// Used for js expand/hide (lists, options, ...)
	margin-right: .33em;
}

input[type=file] {
	margin-top: .3em;
	margin-bottom: .3em;
}

optgroup {
	font-weight: bold;
	font-style: normal;
}

option {
	font-weight: normal;
}

label,
label span {
	display: block;
}

label.ib,
input.ib {
	display: inline-block;
}

label.classic {
	display: inline;
}

label.classic input,
label span input,
label.classic select,
label span select {
	display: inline;
}

label.required {
	font-weight: bold;
}

label.required abbr {
	color: #900;
	font-size: 1.3em;
}

label.bold {
	text-transform: uppercase;
	font-weight: bold;
	margin-top: 2em;
}

label.area,
p.area {
	width: inherit !important;
}

p.field {
	position: relative;
	label {
		display: inline-block;
		width: 14em;
	}
	&.wide label {
		width: 21em;
	}
	input,
	select {
		display: inline-block;
	}
}

.form-note, .form-stats {
	font-style: italic;
	font-weight: normal;
	color: #676e78;
}

p.form-note, p.form-stats {
	margin-top: -.7em;
}

span.form-note, span.form-stats {
	text-transform: none;
}

// .more-info Additional information on fieldset, field, … (may be hide from user-prefs)
.more-info {}

.no-more-info {
	display: none;
}
