html {
	font-family: 'Open Sans';
	font-size: 80%; /*let users choose their own font size, but decrease this size a little bit as most browsers have default font size set to 16px*/
}
body {
	margin: 0;
	padding: 10px;
}
body.loading, body.loading * {
	cursor: wait !important;
}
h1 {
	margin: 5px 0;
}
h3 {
	margin: 5px 0;
}
small {
	color: #888;
}

/* forms */
label > span {
	float: left;
	width: 160px;
	padding-top: 2px;
}
input {
	border: 1px solid #aaa;
}
input[disabled] {
	opacity: 0.8;
	cursor: not-allowed;
	background-color: #efefef;
	border: 1px solid #efefef;
}
button, a.button {
	display: inline-block;
	height: 24px;
	box-sizing: border-box;
	font-family: 'Open Sans';
	color: black;
	padding: 1px 8px;
	border: 1px solid #888;
	border-radius: 5px;
	background-color: #eee;
	cursor: pointer;
}
a.button {
	text-decoration: none;
	line-height: 20px;
	vertical-align: bottom;
}
button:hover:not([disabled]), a.button:hover:not([disabled]) {
	border: 1px solid #111;
	background-color: #444;
	color: #ddd;
}
button[disabled], a.button[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}
button.loading::after, a.button.loading::after {
	content: url("../images/loading.png");
	margin-left: 2px;
	vertical-align: sub;
}

/* modals windows */
#modal_overlay {
	position: fixed;
	display: none;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10;
	background-color: #eee;
	opacity: 0.9;
}
.modal {
	display: none;
	position: fixed;
	height: 240px;
	width: 600px;
	top: 10%;
	left: calc(50% - 300px);
	z-index: 11;
	padding: 10px;
	background-color: white;
	border: 1px solid #aaa;
	border-radius: 5px;
}
.modal > h2 {
	margin: 0 0 15px 0;
}
.modal > menu {
	position: absolute;
	width: 100%;
	left: 0;
	bottom: 0;
	margin: 0;
	padding: 10px;
	text-align: right;
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
}

/* custom overlay elements */
#notification {
	position: fixed;
	bottom: 20px;
	display: none;
	max-width: 300px;
	left: 10px;
	z-index: 998;
	border-radius: 5px;
	background-color: #ddd;
	border: 2px solid #555;
	color: #555;
	padding: 5px;
}
#notification_icon {
	float: left;
	width: 26px;
	height: 26px;
	margin-right: 4px;
}
#notification_title {
	vertical-align: middle;
}

#tasks {
	position: fixed;
	bottom: 20px;
	width: 280px;
	right: 10px;
	z-index: 999;
}
#tasks > div {
	border-radius: 5px;
	background-color: #ddd;
	border: 2px solid #555;
	color: #555;
	padding: 5px;
}

#error {
	position: fixed;
	display: none;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1000;
	padding: 8px;
	background-color: #b94a48;
	color: white;
}

#commit_info {
	white-space: nowrap;
	font-size: 10px;
	color: #888;
}

/* generic classes */
.tooltip {
	display: none;
	position: fixed;
	z-index: 1000;
	padding: 2px;
	background-color: white;
	border: 1px solid #aaa;
	border-radius: 5px;
}

.error {
	padding: 2px 8px;
	margin: 2px 0;
	border-radius: 5px;
	background-color: #f2dede;
	border: 1px solid #eed3d7;
	color: #b94a48;
}
.error:empty {
	display: none;
}

.sha1 {
	font-family: 'Inconsolata';
	color: #111;
}

.environment {
	margin-left: 5px;
	color: #ccc;
	font-size: 0.6rem;
	padding: 1px 3px;
	border-radius: 2px;
	vertical-align: middle;
}
.environment.dev {
	background-color: #7c9ab9;
}
.environment.test {
	background-color: #7c9ab9;
}
.environment.demo {
	background-color: #5c7a99;
}
.environment.val {
	background-color: #3d5266;
}
.environment.prod {
	background-color: #1f2933;
}

.console {
	font-family: 'Inconsolata';
	color: #0f0;
	clear: both;
	overflow-y: scroll;
	background-color: black;
	padding: 0.2rem;
	line-height: 1rem;
}

ul.versions {
	height: calc(100% - 85px);
	list-style-type: none;
	padding: 0;
	overflow : auto;
	background-color: #eee;
	border: 1px solid #ccc;
	border-radius: 2px;
}
ul.versions > li {
	padding: 5px 3px;
}
ul.versions > li:not(.disabled) {
	cursor: pointer;
}
ul.versions > li:not(.disabled):hover {
	background-color: #ddd;
}
ul.versions > li.selected {
	background-color: #ccc !important;
}
ul.versions > li > .reference {
	font-family: 'Inconsolata';
	color: #ccc;
	margin-right: 5px;
	padding: 1px 3px;
	border-radius: 2px;
	background-color: #7c9ab9;
}
ul.versions > li > .tag {
	background-color: #5c7a99;
}
ul.versions > li > .sha1 {
	background-color: #9cbad9;
}
ul.versions > li > .migrations {
	font-size: 0.6rem;
	padding: 1px 3px;
	border-radius: 2px;
	background-color: #ffb3ba;
	margin-right: 5px;
	margin-left: 5px;
}

ul.versions.scheme li {
	padding-left: 25px;
	cursor: auto !important;
	background-repeat: no-repeat;
	background-position: 5px 7px, 0 0;
}
ul.versions.scheme > li.done {
	background-image: url("../images/green_circle.png"), linear-gradient(to right, transparent 10px, #baffc9 10px, #baffc9 15px, transparent 15px);
}
ul.versions.scheme > li.todo {
	background-image: url("../images/red_circle.png"), linear-gradient(to right, transparent 10px, #ffb3ba 10px, #ffb3ba 15px, transparent 15px);
}
ul.versions.scheme > li:first-child {
	background-position: 5px 7px, 0 10px;
}
ul.versions.scheme > li:last-child {
	background-size: auto, auto 10px;
}
ul.versions.scheme > li > ul {
	list-style-type: none;
	margin-top: 5px;
	padding: 0;
}
ul.versions.scheme > li > ul > li.done {
	background: 0 2px url("../images/small_green_circle.png") no-repeat;
}
ul.versions.scheme > li > ul > li.todo {
	background: 0 2px url("../images/small_red_circle.png") no-repeat;
}

/* content */
#user {
	position: fixed;
	right: 10px;
	top: 10px;
}
#user_image {
	float: left;
	width: 32px;
	height: 32px;
	margin-right: 10px;
	margin-top: 2px;
	border-radius: 32px;
}
#version {
	position: fixed;
	right: 5px;
	bottom: 5px;
	font-size: 0.6rem;
	color: #aaa;
}

/* custom modal windows */
#application {
	height: 600px;
	width: 80%;
	left: calc(10%);
}
#application fieldset {
	float: left;
	margin: 0 20px 5px 0;
	padding: 10px 10px;
	border: 1px solid #ddd;
}
#application h3 {
	clear: both;
}
#restart {
	height: 150px;
}
#script {
	height: 450px;
}
#versions {
	height: 500px;
	width: 1000px;
	left: calc(50% - 500px);
}
#deploy {
	height: 680px;
	top: 2%;
}
#deploy_summary {
	clear: both;
	max-height: 170px;
}
#deploy_summary:empty {
	display: none;
}
#deploy .deploy_commit_pickers {
	display: block;
	margin: 2px 0 10px 160px;
}
#deploy .deploy_commit_pickers.disabled > a {
	opacity: 0.2;
	cursor: not-allowed;
}
#deploy .console {
	display: none;
	height: 150px;
}
#reset {
	top: 2%;
	height: 400px;
	width: 640px;
	left: calc(50% - 320px);
}
#restore {
	top: 2%;
	height: 400px;
}
#log {
	height: 600px;
	width: 80%;
	left: calc(10%);
}
#log .console {
	display: block;
	height: calc(100% - 6rem);
}
#administration {
	top: 1%;
	height: 630px;
}
#available_applications {
	list-style-type: none;
	height: 200px;
	padding: 0;
	overflow : auto;
	background-color: #eee;
	border: 1px solid #ccc;
	border-radius: 2px;
}
#available_applications li {
	padding: 5px 3px;
}
#available_applications li:not(.disabled) {
	cursor: pointer;
}
#available_applications li:hover {
	background-color: #ddd;
}

/* animations */
@keyframes fadein {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}
@keyframes fadeout {
	from {
		opacity: 1;
	}
	to {
		opacity: 0;
	}
}
.fadeout {
	animation-duration: 1s;
	animation-name: fadeout;
}
.fadein {
	animation-duration: 1s;
	animation-name: fadein;
}
