/* Reset */

a img {
	border: none;
}

fieldset {
	border: none;
	padding: 0;
}

/* Correct font properties not being inherited */
button,
input,
optgroup,
select,
textarea {
	font-family: inherit;
	font-size: inherit;
	line-height: 1.2;
}

/* Clearfix for IE */
.clearfix {
    zoom: 1; /* necessary to trigger hasLayout */
}

/* Clearfix for other browsers */
.clearfix:after {
	content: ".";
	display: block;
	height: 0;
	clear: both;
	visibility: hidden;
	position: relative; /* to have the same offsetParent in Firefox and IE */
}

/*
There is another technique for clearfix, but it doesn't work when a contained element (like a popup)
is taller that the containing element:

.clearfix {
	overflow: hidden;
}
*/

/* Notice and error messages */

#flash, .errormessage {
    color: white;
    padding: 0.7em;
    text-align: left;
	-moz-border-radius: 4px;
	-webkit-border-radius: 4px;
	margin-bottom: 2em;
}

#flash {
	background: #EEAA44;
	display: none;
}

.errormessage {
    background: #c00;
}

#flash a, .errormessage a {
	color: white;
	text-decoration: underline;
}

/* Forms */

form .loading {
	display: none;
}

div.field,
div.inline-field,
div.help {
	padding-bottom: 1.5em;
}

div.columns div.field {
	float: left;
	margin-right: 1em;
}

.col-12,
.col-6,
.col-4 {
	display: block;
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
}

.col-12 {
	width: 44em;
}

.col-6 {
	width: 21.5em;
}

.col-4 {
	width: 14em;
}

div.inline-field {
	line-height: 1.5em;
}

div.inline-field label.description {
	display: inline;
}

div.inline-field input {
	margin: 0 0.1em 0 1.5em;
}

label.description {
	display: block;
	color: #555;
	font-weight: bold;
	font-size: 95%;
	margin-bottom: 3px; /* XXX en pixels ? */
}

span.required {
	color: red;
}

div.upload-list a {
	margin-left: 0.4em;
}

ul.choices {
	float: left;
	list-style: none;
	margin: 0;
	padding: 0;
	margin-right: 1em;
}

ul.choices li {
	margin: 0.4em 0;
}

ul.choices input {
	vertical-align: middle;
	margin: 0;
	margin-right: 0.2em;
}

div.form-actions {
	margin: 2em 0 0;
}

div.form-actions > * {
	vertical-align: middle;
}

div.legal {
	margin-top: 2em;
	font-size: 80%;
}

/* INPUTS */

fieldset {
	margin: 2em 0;
}

input[type=text],
input[type=password],
input[type=date],
input[type=email],
input[type=number],
select,
textarea {
	background: white;
}

/* Single line */
input[type=text],
input[type=password],
input[type=date],
input[type=email],
input[type=number],
select,
.input-suffix {
	height: 2em;
	vertical-align: middle;
}

.input-suffix {
	line-height: 2em;
}

input[type=text],
input[type=password],
input[type=date],
input[type=email],
input[type=number],
select,
textarea,
.input-suffix {
	display: inline-block;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	border: 1px solid #ccc;
	border-radius: 2px;
	margin: 0;
	padding-left: 0.5em;
	padding-right: 0.5em;
}

/* Multiple lines */
textarea {
	padding-top: 0.4em;
	padding-bottom: 0.4em;
}

input[type=text]:focus,
input[type=password]:focus,
input[type=date]:focus,
input[type=email]:focus,
input[type=number]:focus,
select:focus,
textarea:focus {
	border-color: #666;
}

.input-suffix {
	border-left: none;
	color: #777;
	background: #eee;
}

/* SELECT
 *
 * Browser compatiblity:
 * - The native dropdown arrow is displayed over our custom arrow in IE <10 and Firefox <35
 * - The offset in background-position is not supported in Chrome <25, Safari <7 and Android <4.4
 */

select {
	/* Remove native dropdown arrow in Chrome, Safari, Android, Edge and Firefox 35+ */
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;

	/* Style with our custom dropdown arrow */
	padding-right: 20px;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23333' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E");
	background-size: 8px 10px;
	background-repeat: no-repeat;
	background-position: right 6px center;

	/* Remove right padding in IE <10 */
	padding-right: 0 \9;
}

/* Remove the native dropdown arrow in IE 10+ */
select::-ms-expand {
	display: none;
}

.select-button {
	height: calc(2.4em + 1px);
}

/* BUTTONS */

button,
input[type=button],
input[type=submit],
.button,
.toggle span {
	display: inline-block;

	color: #555;
	background: #e0e0e0;

	font-weight: bold;

	vertical-align: middle;
	white-space: nowrap;

	margin: 2px; /* Normalize margin for all browsers */
	padding: .6em .8em;
	overflow: visible; /* IE 7 width fix */
	border: 1px solid transparent;

	-webkit-border-radius: 3px;
	-moz-border-radius: 3px;
	border-radius: 3px;

	transition-property: color, background-color, border-color;
	transition-duration: .2s;
	transition-timing-function: ease-in-out;

	zoom: 1;  /* IE 7 inline-block hack */
}

.button,
.button:hover {
	text-decoration: none;
}

button:hover,
input[type=button]:hover,
input[type=submit]:hover,
.button:hover,
.toggle:hover span {
	cursor: pointer;
	background: #d0d0d0;
}

button:active,
input[type=button]:active,
input[type=submit]:active,
.button:active,
.toggle input:checked + span {
	background: #c0c0c0;
}

button[disabled],
input[type=button][disabled],
input[type=submit][disabled] {
	cursor: default;
	color: #999;
	background: #f5f5f5;
}

button:focus,
input[type=button]:focus,
input[type=submit]:focus,
.button:focus,
.toggle input:focus + span {
	outline: thin dotted;
	outline: 5px auto -webkit-focus-ring-color;
	outline-offset: -2px;
}

/**
* Remove inner padding and border in Firefox 4+ (Firefox bug 140562).
*/
button::-moz-focus-inner,
input[type=button]::-moz-focus-inner,
input[type=submit]::-moz-focus-inner {
	border: 0;
	padding: 0;
}

.toggle > input[type=radio] {
	position: absolute;
	margin-left: -9999px;
}
