/*
 * HTML5 Boilerplate
 *
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html,
button,
input,
select,
textarea {
	color: #222;
}

body {
	font-size: 1em;
	line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight: h5bp.com/i
 * These selection declarations have to be separate.
 * Customize the background color to match your design.
 */

::-moz-selection {
	background: #eee;
	color: #222;
	text-shadow: none;
}

::selection {
	background: #eee;
	color: #222;
	text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
	display: block;
	margin: 1em 0;
	padding: 0;
	height: 1px;
	border: 0;
	border-top: 1px solid #ccc;
}

/*
 * Remove the gap between images and the bottom of their containers: h5bp.com/i/440
 */

img {
	vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
	margin: 0;
	padding: 0;
	border: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
	resize: vertical;
}

label {
	cursor: pointer;
}

/* ==========================================================================
   Chrome Frame prompt
   ========================================================================== */

.chromeframe {
	margin: 0.2em 0;
	padding: 0.2em 0;
	background: #ccc;
	color: #000;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

pre,
code { font-family: Monaco, Menlo, "Andale Mono", "lucida console", "Courier New", monospace; }

.console { position: fixed; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; width: 100%; background: #222; }

.response { display: none; overflow: auto; margin: 0; padding: 0; max-height: 40%; color: #fff; list-style: none; text-shadow: 1px 1px 0 #000; }
.response .muted,
.response .divider { color: #666; }

.response .output { overflow: auto; margin: 0; padding: 1.4em; max-height: 40%; color: #fff; text-shadow: 1px 1px 0 #000; }
.response .output .output_holder { margin: 0; }
.response .output .error { margin-top: 1em; background: #A04545; }
.response .output .error:first-child { margin: 0; }
.response .output .error span { display: inline-block; padding: 1em; }
.response .output .error span.file { display: block; padding: 0.7em 1em; background: rgba(255, 255, 255, 0.1); font-size: .85em; }
.response .output .error span.line { background: rgba(0,0,0,.1); }

.response .queries { width: 100%; border-collapse: separate; }
.response .queries td {
	padding: 1em; vertical-align: top;
	border-top: 1px solid rgba(255,255,255,.05); border-bottom: 1px solid rgba(0,0,0,.3);
	border-right: 1px solid rgba(255,255,255,.05); border-left: 1px solid rgba(0,0,0,.3);
}
.response .queries tr:first-child td { border-top: 0; }
.response .queries tr:last-child td { border-bottom: 0; }
.response .queries td:first-child { border-left: 0; }
.response .queries td:last-child { border-right: 0; }
.response .queries .time { width: 100px; color: #888; text-align: right; font-weight: bold; font-size: .8em; line-height: 2.2em; }
.response .queries .query { color: #80A76A; font-family: Monaco, Menlo, "Andale Mono", "lucida console", "Courier New", monospace; }

.controlbar {
	z-index: 100;
	width: 100%;
	height: 50px;
	border-bottom: 2px solid #1e1e1e;
	background: #2e2e2e;
	display: -webkit-box;
	display: -opera-box;
	display: -moz-box;
	display: -ms-box;
	display: box;
}
.no-flexbox .controlbar { position: relative; }
.controlbar .controls {
	display: -webkit-box;
	display: -opera-box;
	display: -moz-box;
	display: -ms-box;
	display: box;
	-webkit-box-pack: justify;
	-moz-box-pack: justify;
	-ms-box-pack: justify;
	box-pack: justify;
	overflow: hidden;
	margin: 0;
	padding: 0;
	height: 100%;
	-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
	-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
	color: #777;
	list-style: none;
	text-shadow: 1px 1px rgba(0,0,0,.4);
	font-size: .8em;
	-webkit-box-flex: 1;
	-opera-box-flex: 1;
	-moz-box-flex: 1;
	-ms-box-flex: 1;
	box-flex: 1;
}
.no-flexbox .controlbar .controls { margin: 0 200px 0 0; }

.controlbar .controls li {
	overflow: hidden;
	padding: 0 1.4em;
	height: 100%;
	border-right: 1px solid #232323;
	border-left: 1px solid rgba(255, 255, 255, .05);
	background-clip: border-box;
	white-space: nowrap;
	line-height: 50px;
	-webkit-box-flex: 1;
	-opera-box-flex: 1;
	-moz-box-flex: 1;
	-ms-box-flex: 1;
	box-flex: 1;
}
.no-flexbox .controlbar .controls li { float: left; }

.controlbar .controls li.help { cursor: help; }
.controlbar .controls li.stretch { -webkit-box-flex: 4; -moz-box-flex: 4; -ms-box-flex: 4; box-flex: 4; }
.controlbar .controls li.error { color: #DB613B; }
.controlbar .controls li.loading { width: 100%; background: url('../img/loading.gif') no-repeat center center; }
.controlbar .controls li.center { text-align: center; }
.controlbar .controls li:first-child { border-left: 0; }
.controlbar .controls li.last-of-type,
.controlbar .controls li:last-child { border-right-width: 3px; }

.controlbar .controls li span { color: #aaa; font-weight: bold; }
.controlbar .controls li .title { margin-right: 5px; color: inherit; font-weight: normal; font-style: italic; }
.controlbar .controls li .divider { display: inline-block; margin: 0 6px; font-weight: normal; }
.controlbar .controls li .slash {   }

.controlbar .controls li.button:hover,
.controlbar .controls li.button.active { background: rgba(255,255,255,.05); cursor: pointer; }
.controlbar .controls li.button.active { background: #222; }
.csstransforms .controlbar .controls li.button.active { position: relative; overflow: hidden; background: rgba(255,255,255,.04); }
.csstransforms .controlbar .controls li.button.active:hover { background: rgba(255,255,255,.08); }
.csstransforms .controlbar .controls li.button.active:before {
	position: absolute;
	top: -12px;
	left: 50%;
	display: block;
	margin-left: -10px;
	width: 20px;
	height: 20px;
	background: #222;
	-webkit-box-shadow: 1px 1px 0 rgba(255,255,255,.08);
	-moz-box-shadow: 1px 1px 0 rgba(255,255,255,.08);
	box-shadow: 1px 1px 0 rgba(255,255,255,.08);
	content: '';
	-webkit-transform: rotate(45deg);
	-moz-transform: rotate(45deg);
	-ms-transform: rotate(45deg);
	-o-transform: rotate(45deg);
	transform: rotate(45deg);
}
/*.csstransforms .controlbar .controls li.last-button { border-right-width: 3px; }*/

.no-localstorage .controlbar .controls li.remember { display: none; }
.controlbar .controls li.remember .button { padding: 10px 10px 10px 0; color: #666; font-weight: normal; cursor: pointer; }
.controlbar .controls li.remember .button.checked { color: #4D8867; }
.controlbar .controls li.remember .button:before {
	display: inline-block;
	overflow: hidden;
	margin-right: 10px;
	padding: 0;
	width: 16px;
	height: 16px;
	border-radius: 2px;
	background: rgba(0,0,0,.3);
	-webkit-box-shadow: inset 0 2px 1px rgba(0,0,0,.2), 0 0 0 1px rgba(255,255,255,.03), 0 1px 0 rgba(255,255,255,.11);
	-moz-box-shadow: inset 0 2px 1px rgba(0,0,0,.2), 0 0 0 1px rgba(255,255,255,.03), 0 1px 0 rgba(255,255,255,.11);
	box-shadow: inset 0 2px 1px rgba(0,0,0,.2), 0 0 0 1px rgba(255,255,255,.03), 0 1px 0 rgba(255,255,255,.11);
	color: #4D8867;
	content: "\2713";
	vertical-align: text-bottom;
	text-align: center;
	text-indent: 100%;
	text-shadow: none;
	font-size: 14px;
	line-height: 16px;
}
.controlbar .controls li.remember .button.checked:before {
	-webkit-box-shadow: inset 0 2px 1px rgba(0, 0, 0, .2), 0 0 10px 2px rgba(26, 121, 68, 0.60), 0 0 0 1px rgba(255,255,255,.1), 0 1px 0 rgba(255, 255, 255, .11);
	-moz-box-shadow: inset 0 2px 1px rgba(0, 0, 0, .2), 0 0 10px 2px rgba(26, 121, 68, 0.60), 0 0 0 1px rgba(255,255,255,.1), 0 1px 0 rgba(255, 255, 255, .11);
	box-shadow: inset 0 2px 1px rgba(0, 0, 0, .2), 0 0 10px 2px rgba(26, 121, 68, 0.60), 0 0 0 1px rgba(255,255,255,.1), 0 1px 0 rgba(255, 255, 255, .11);
	text-indent: 0;
}

.controlbar .execute {
	width: 200px;
	height: 100%;
	border: 0;
	background: #444;
	-webkit-box-shadow: inset 1px 1px 0 rgba(255,255,255,.1);
	-moz-box-shadow: inset 1px 1px 0 rgba(255,255,255,.1);
	box-shadow: inset 1px 1px 0 rgba(255,255,255,.1);
	color: #111;
	text-align: center;
	text-transform: uppercase;
	text-shadow: 1px 1px 0 rgba(255,255,255,.1);
	font-size: 1.1em;
	line-height: 50px;
	cursor: pointer;
}
.no-flexbox .controlbar .execute { position: absolute; top: 0; right: 0; min-width: 200px; }
.controlbar .execute:hover { background: #EB4D09; color: #fff; text-shadow: 1px 1px 1px rgba(0,0,0,.5); }

.editor { position: absolute; right: 0; bottom: 0; left: 0; overflow: hidden; width: 100%; }
.editor .CodeMirror .CodeMirror-lines { margin-left: 10px; padding: 1.4em 1em 1.4em .2em; }
.editor .CodeMirror .CodeMirror-gutter-text { padding: 1.4em .2em 1.4em 1.4em; }
.code { min-height: 200px; }

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Image replacement
 */

.ir {
	overflow: hidden;
	/* IE 6/7 fallback */
	border: 0;
	background-color: transparent;
	*text-indent: -9999px;
}

.ir:before {
	display: block;
	width: 0;
	height: 100%;
	content: "";
}

/*
 * Hide from both screenreaders and browsers: h5bp.com/u
 */

.hidden {
	display: none !important;
	visibility: hidden;
}

/*
 * Hide only visually, but have it available for screenreaders: h5bp.com/v
 */

.visuallyhidden {
	position: absolute;
	overflow: hidden;
	clip: rect(0 0 0 0);
	margin: -1px;
	padding: 0;
	width: 1px;
	height: 1px;
	border: 0;
}

/*
 * Extends the .visuallyhidden class to allow the element to be focusable
 * when navigated to via the keyboard: h5bp.com/p
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
	position: static;
	overflow: visible;
	clip: auto;
	margin: 0;
	width: auto;
	height: auto;
}

/*
 * Hide visually and from screenreaders, but maintain layout
 */

.invisible {
	visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix:before,
.clearfix:after {
	display: table; /* 2 */
	content: " "; /* 1 */
}

.clearfix:after {
	clear: both;
}

/*
 * For IE 6/7 only
 * Include this rule to trigger hasLayout and contain floats.
 */

.clearfix {
	*zoom: 1;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   Theses examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
	/* Style adjustments for viewports that meet the condition */
}

@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
	   only screen and (min-resolution: 144dpi) {
	/* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid required HTTP connection: h5bp.com/r
   ========================================================================== */

@media print {
	* {
		background: transparent !important;
		box-shadow: none !important;
		color: #000 !important; /* Black prints faster: h5bp.com/s */
		text-shadow: none !important;
	}

	a,
	a:visited {
		text-decoration: underline;
	}

	a[href]:after {
		content: " (" attr(href) ")";
	}

	abbr[title]:after {
		content: " (" attr(title) ")";
	}

	/*
	 * Don't show links for images, or javascript/internal links
	 */

	.ir a:after,
	a[href^="javascript:"]:after,
	a[href^="#"]:after {
		content: "";
	}

	pre,
	blockquote {
		border: 1px solid #999;
		page-break-inside: avoid;
	}

	thead {
		display: table-header-group; /* h5bp.com/t */
	}

	tr,
	img {
		page-break-inside: avoid;
	}

	img {
		max-width: 100% !important;
	}

	@page {
		margin: 0.5cm;
	}

	p,
	h2,
	h3 {
		orphans: 3;
		widows: 3;
	}

	h2,
	h3 {
		page-break-after: avoid;
	}
}
