body {
	background: #ffffff url(../img/body.png) repeat-x fixed left top;
	font-family: verdana;
	font-size: 0.9em;
	line-height: 1.5em;
}

main {
	display: block; /* IE11 hack */
	margin: 25px 25%;
	width: 50%;
	border: 1px solid #cccccc;
	border-radius: 10px;
	box-shadow: 0 0 0 3px #ffffff;
}
main.userbg {
	background: #ffffff url(../img/user.png) no-repeat right bottom;
}
main.mailbg {
	background: #ffffff url(../img/mail.png) no-repeat right bottom;
}

form {
	padding: 8px;
}

input:not([type="file"]), textarea {
	border: 1px solid #cccccc;
	padding: 1px;
}
input:not([type="file"]):focus, textarea:focus {
	border-color: #888888;
}
input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover {
	border-color: #cccccc #888888 #888888 #cccccc;
}
input[type="button"]:focus, input[type="reset"]:focus, input[type="submit"]:focus {
	border-color: #cccccc;
}
input[type="button"]:hover:focus, input[type="reset"]:hover:focus, input[type="submit"]:hover:focus {
	border-color: #888888 #cccccc #cccccc #888888;
}

aside {
	float: right;
	width: 40%;
	text-align: center;
	font-weight: bold;
	font-style: italic;
	margin: 0 -4px;
	padding: 1px;
	border-radius: 10px;
	opacity: 0;
	transition-property: opacity;
	transition-duration: 0.5s;
	transition-timing-function: linear;
}
aside.info {
	background-color: #eeffe0;
	color: #4e9a06;
}
aside.error {
	background-color: #ffe0e1;
	color: #a40000;
}
aside.show {
	opacity: 1;
}

label:before {
	content: url(../img/bullet_black.png);
	vertical-align: sub;
}
section.success label:before {
	content: url(../img/bullet_white.png);
}

section.success:after {
	content: url(../img/accept.png);
	vertical-align: sub;
}
section.success span, section.success input {
	display: none;
}
section.error:after {
	content: url(../img/exclamation.png);
	vertical-align: sub;
}

#id {
	padding-left: 18px;
	background-image: url(../img/bullet_key.png);
	background-repeat: no-repeat;
	background-position: 1px 1px;
}

textarea {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 100%;
	height: 160px;
	min-height: 160px;
	font-family: verdana;
	font-size: 14px;
	background: transparent url(../img/transparent.png);
	overflow: auto;
	box-shadow: none;
	margin-bottom: 4px;
}

#attachment {
	font-size: 0.75em;
	box-sizing: border-box;
	width: 100%;
	padding: 1px;
	margin-bottom: 4px;
	border: 1px solid #cccccc;
	background: transparent url(../img/transparent.png);
}
#attachment header {
	position: relative;
	overflow: hidden;
	width: 100%;
	text-align: center;
	margin: auto;
}
#attachment header input {
	position: absolute;
	z-index: 100;
	width: 100%;
	left: 0;
	opacity: 0;
}
#attachment .file:first-of-type {
	border-top: 2px solid #cccccc;
	padding-top: 5px;
}
#attachment .file {
	margin: 4px 7px;
	line-height: 1em;
}
#attachment .file:before {
	content: "";
	width: 16px;
	height: 16px;
	float: right;
	margin-left: 8px;
	background: url(../img/link_go.png);
}
#attachment .file.success:before {
	background: url(../img/link.png);
}
#attachment .file.error:before {
	background: url(../img/link_error.png);
}
#attachment .file.error.break:before {
	background: url(../img/link_break.png);
}
#attachment .file .delete {
	margin-right: 8px;
	cursor: pointer;
	vertical-align: middle;
}
#attachment .file span {
	float: right;
}
#attachment .file progress {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: calc(100% - 48px);
	height: 2px;
	margin: -2px 24px 0;
	color: #73d216; /* IE11 & Edge */
}
#attachment .file.error progress {
	color: #ef2929;
}
#attachment .file progress::-webkit-progress-value {
	background: #73d216; /* Chrome & Webkit */
}
#attachment .file.error progress::-webkit-progress-value {
	background: #ef2929; /* Chrome & Webkit */
}
#attachment .file progress::-webkit-progress-bar {
	background: #d5d5d5; /* Chrome & Webkit */
}
#attachment .file progress::-moz-progress-bar {
	background: #73d216; /* Firefox */
}
#attachment .file.error progress::-moz-progress-bar {
	background: #ef2929; /* Firefox */
}
@-moz-document url-prefix() { 
	#attachment .file progress {
		border: 0; /* Firefox */
	}
}

#reset {
	padding: 1px 4px 1px 26px;
	background-image: url(../img/group_key.png);
	background-repeat: no-repeat;
	background-position: 6px 1px;
	border-radius: 0 0 0 10px;
}
#erase {
	padding: 1px 4px 1px 23px;
	background-image: url(../img/email_edit.png);
	background-repeat: no-repeat;
	background-position: 3px 1px;
}
#submit {
	padding: 1px 4px 1px 23px;
	background-image: url(../img/email_go.png);
	background-repeat: no-repeat;
	background-position: 3px 1px;
	border-radius: 0 0 10px 0;
}

#dropbox {
	display: none;
	position: absolute;
	width: 128px;
	height: 128px;
	right: 32px;
	bottom: 32px;
	background: transparent url(../img/emblem_symbolic_link.png);
}
body.drag #dropbox {
	display: block;
}
#dropbox.hover {
	background: transparent url(../img/emblem_symbolic_link_hover.png);
}

[for="message"], #message, #attachment, #reset, #erase, #submit {
	visibility: hidden;
}
section.success ~ [for="message"], section.success ~ #message,
section.success ~ #attachment, section.success ~ #reset,
main.hasFile #erase, section.success ~ #message:valid ~ #erase,
main.hasFile #submit, section.success ~ #message:valid ~ #submit {
	visibility: visible;
}
@media all and (-ms-high-contrast:none) { /* IE11 hack */
	section.success ~ #erase, section.success ~ #submit { /* IE11 :valid does not work well */
		visibility: visible;
	}
	
	#attachment header input {
		text-indent: -9999999em; /* Needed on IE11 that shows a text caret on a transparent input... */
	}
}

@media only screen and (max-width: 1024px) {
	main {
		margin: 25px 10%;
		width: 80%;
	}
}

@media only screen and (max-width: 600px) {
	html {
		height: 100%;
	}
	
	body {
		background: #ffffff;
		height: 100%;
		margin: 0;
	}
	
	main {
		margin: 0;
		padding: 8px;
		box-sizing: border-box;
		width: 100%;
		height: 100%;
		border: 0;
		border-radius: 0;
		box-shadow: 0;
	}
	
	aside {
		float: none;
		width: auto;
		margin: 0;
		position: absolute;
		left: 10%;
		right: 10%;
		bottom: 8px;
		color: blue;
	}
}
