/* http://meyerweb.com/eric/tools/css/reset/    v2.0 | 20110126   License: none (public domain)*/html, body, div, span, applet, object, iframe,h1, h2, h3, h4, h5, h6, p, blockquote, pre,a, abbr, acronym, address, big, cite, code,del, dfn, em, img, ins, kbd, q, s, samp,small, strike, strong, sub, sup, tt, var,b, u, i, center,dl, dt, dd, ol, ul, li,fieldset, form, label, legend,table, caption, tbody, tfoot, thead, tr, th, td,article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary,time, mark, audio, video {	margin: 0;	padding: 0;	border: 0;	font-size: 100%;	font: inherit;	vertical-align: baseline;}/* HTML5 display-role reset for older browsers */article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {	display: block;}body {	line-height: 1;}ol, ul {	list-style: none;}blockquote, q {	quotes: none;}blockquote:before, blockquote:after,q:before, q:after {	content: '';	content: none;}table {	border-collapse: collapse;	border-spacing: 0;}

/* LAYOUT */
html,body, .wrapper {
	height: 100%;
	min-height: 100%;
}

body {
	background-color: #282828;
	font-family: Arial, sans-serif;
	font-size: 14px;
	color: #ddd;
}

.wrapper {
	overflow-y: hidden;
}

.hidden {
	display: none;
}

h3 {
	font-size: 16px;
	font-weight: bolder;
	margin-top: 32px;
}

p {
	margin-top: 8px;
}

b {
	font-weight: bolder;
}

p b {
	color: #eee;
}

/* BUTTONS / UI */

hr {
	width: 2px;
	height: 80%;
	border: none;
	background-color: #474747;
	margin: auto 16px;
	display: inline-block;
	vertical-align: middle;
}

form label {
	display: block;
	margin-bottom: 8px;
}

select {
    background-color: #666;
    color: #cdcdcd;
    border: 1px solid #484848;
    padding: 4px 8px;
}

input[type=text] {
    background-color: #505050;
    border: 1px solid #666;
    padding: 10px 15px;
    margin-bottom: 20px;
    width: 70%;
    border-radius: 5px;
    color: #eee;
}

input.error {
	background-color: #605050;
	border-color: #766;
}

.error-text {
	display: none;
	font-style: italic;
	color: #e46b6b;
}

.error .error-text {
	display: block;
}

.btn {
	background-color: #535353;
	color: #dddddd;
	border-radius: 3px;
	padding: 10px 15px;
	border: 1px solid #535353;
	text-align: center;
	cursor: pointer;
	vertical-align: top;
}

.btn:hover {
	background-color: #474747;
	border: 1px solid #636363;
}

.btn:focus {
	outline: none;
}

.btn:active, .btn.active, .btn.checked {
	outline: none;
	background-color: #383838;
	border: 1px solid #636363;
}

.btn.btn-danger {
	background-color: #544444;
	border-color: #673e3e;
}

.btn.btn-danger:hover {
	background-color: #513838;
}

.btn.btn-danger:active {
	background-color: #533232;
}

.btn-dropdown {
	height: 36px;
	overflow: hidden;
	display: inline-block;
	box-sizing: border-box;
}

.btn-dropdown .dropdown {
	margin: 9px -16px -16px;
	background-color: #535353;
	position: relative;
	z-index: 999;
}

.btn-dropdown.opened {
	overflow: visible;
}

.app-btn-clear {
	position: relative;
	padding-left: 32px;
}

.app-btn-clear span {
	display: block;
	position: absolute;
	left: 8px;
	top: 8px;
	width: 16px;
	height: 16px;
	border: 1px solid #673e3e;
	background-color: #000;
}

.app-sort-group{
	font-size: 0;
	margin-top: 16px;
}

.radio-group .btn {
	display: inline-block;
	font-size: 10px;
}

.app-sort-group .btn {
	border: 1px solid #636363;
}

.app-sort-group .btn:nth-child(2) {
	border-right: none;
}

.app-sort-group .btn:last-child {
	border-left: none;
}

.radio-group input[type="radio"]{
	display: none;
}

.radio-group input:checked + label {
	background-color: #383838;
}

.cell {
	display: inline-block;
	width: 31px;
	height: 31px;
	border: 1px solid #666;
}

.app-toolbox {
	float: right;
}

.app-tool {
	display: inline-block;
	width: 32px;
	height: 32px;
	padding: 6px;
	box-sizing: border-box;
}

.app-tool:before {
	content: "";
	display: block;
	width: 20px;
	height: 20px;
	background: url('/assets/images/sprite.png') no-repeat -9999px -9999px;
}

.app-tool-brush:before {
	background-position: 0 -20px;
}

.app-tool-select:before {
	background-position: -20px 0;
}

/* TABLE */

.workspace {
    float: left;
    width: 65%;
    height: 100%;
    min-height: 100%;
}

table.app-canvas {
	table-layout: fixed;
	width: 512px;
	height: 384px;
	cursor: url('/assets/images/check.cur'), default;
	background-color: #000;
	margin: 32px auto;
	border: 1px solid transparent;
}

table.app-canvas.color-pickup {
	cursor: help;
}

table.app-canvas.tool-select {
	cursor: crosshair;
}

table.app-canvas.snap {
	cursor: none;
}

table.app-canvas td {
	width: 16px;
	height: 16px;
	box-sizing: border-box;
}

table.app-canvas.snap td:hover {
	box-shadow: inset 0px 0px 0px 1px #fff;
}

table.app-canvas.grid {
	position: relative;
}

table.app-canvas.grid:after {
	content: "";
	position: absolute;
	left: 1px;
	top: 1px;
	width: 100%;
	height: 100%;
	background: url('/assets/images/grid.gif') left top;
	pointer-events: none;
	opacity: 0.5;
}

/* TOOLBAR */

.toolbar {
	width: 100%;
	height: 52px;
	padding: 8px 16px;
	background-color: #535353;
	box-sizing: border-box;
	border-bottom: 1px solid #383838;
}

/* WINDOWS */

.app-window {
	position: absolute;
	left: 64px;
	top: 64px;
	background-color: #535353;
	border: 1px solid #383838;
	padding: 2px;
	z-index: 999;
	-webkit-user-select: none; 
	-moz-user-select: none; 
	-ms-user-select:none; 
	-o-user-select:none;
	user-select:none;
}

.app-window-header {
	background-color: #424242;
	border-bottom: 1px solid #383838;
	height: 8px;
	margin: -2px;
	margin-bottom: 3px;
	cursor: move;
}

/* SIDEBAR */

.sidebar {
	float: right;
	background-color: #535353;
	padding: 16px;
	height: 100%;
	min-height: 100%;
	box-sizing: border-box;
	position: relative;
}

.sidebar:after {
	content: "";
	display: block;
	width: 100%;
	clear: both;
}

.sidebar-group {
	display: block;
	margin: 16px 0;
}

.app-hints {
	font-size: 12px;
	margin-top: 32px;
}

.app-position {
	font-size: 18px;
	line-height: 24px;
}

.app-credits {
	position: absolute;
	bottom: 16px;
	left: 16px;
	font-size: 10px;
	color: #aaa;
	width: 60%;
}

.app-credits a {
	color: #ccc;
}

.app-preview {
	float: right;
	clear: both;
	box-sizing: content-box;
	background-color: #000;
	width: 32px;
	height: 24px;
	-ms-interpolation-mode: nearest-neighbor;
	image-rendering: -webkit-optimize-contrast;
	image-rendering: -webkit-crisp-edges;
	image-rendering: -moz-crisp-edges;
	image-rendering: -o-crisp-edges;
	image-rendering: pixelated;
	cursor: url('/assets/images/zoom-big.cur'),default;
}

.app-mode {
	padding-top: 16px;
	padding-left: 32px;
	display: inline-block;
}

.input-group {
	display: inline-block;
	vertical-align: top;
	padding-top: 16px;
	padding-left: 16px;
}

.app-snap {
    display: block;
    padding-left: 0;
    padding-bottom: 16px;
}

.app-brushes {
	padding-top: 24px;
    padding-left: 24px;
    margin-bottom: 16px;
	float: left;
}

.app-brushes li {
	display: inline-block;
	position: relative;
	margin-left: -16px;
	z-index: 1;
}

.app-brushes li:first-child, .app-brushes li:last-child {
	top: -16px;
	z-index: 2;
}

.app-brush {
	position: relative;
}

.app-brushes .cell:after {
	content: ".";
	position: absolute;
	left: 5px;
	bottom: 5px;
	width: 8px;
	height: 8px;
	font-size: 10px;
}

.app-brushes .cell.brush-left:after {
	content: "L";
}

.app-brushes .cell.brush-center:after {
	content: "C";
}

.app-brushes .cell.brush-right:after {
	content: "R";
}

.app-palette {
	clear: left;
	width: 272px;
}

.app-palette[sort="hue"] {
	text-align: right;
}

.app-palette[sort="hue"][reverse] {
	text-align: left;
}

.app-palette[sort="hue"][reverse] li:nth-child(5) {
	margin-right: 96px;
}

.app-palette.all-colors[sort="hue"][reverse] li:nth-child(5) {
	margin-right: 0;
}

.app-palette[sort="rgb"] {
	width: 306px;
}

.app-sort-group {
    display: inline-block;
    vertical-align: middle;
    padding: 16px 0;
    margin-top: 0;
}

.app-reverse {
    padding: 16px;
    display: inline-block;
    vertical-align: middle;
}

/* DIALOG */

.app-dialog {
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0,0,0,0.75);
	z-index: 99999;
}

.dialog-content {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%,-50%);
	width: 100%;
	max-width: 512px;
	height: auto;
	background-color: #535353;
	padding: 16px;
}

.dialog-close {
	border: none;
	background-color: transparent;
	float: right;
	color: #fff;
	font-size: 16px;
	cursor: pointer;
}

.dialog-header {
	margin-bottom: 16px;
}

.dialog-footer {
	margin-top: 16px;
	text-align: right;
}

.dialog-title {
	font-size: 24px;
}

.rorg-compo {
	display: inline-block;
	vertical-align: middle;
}

.rorg-compo > * {
	display: none;
}

.rorg-compo.offline {
	display: none;
}

.rorg-compo.status .spinner {
	display: inline-block;
	vertical-align: middle;
	margin: 10px 0;
}

.rorg-compo.online .compo-info,
.rorg-compo.online .app-btn-send {
	display: inline-block;
}

.rorg-compo .compo-info {
	vertical-align: middle;
	padding: 13px 0;
	font-size: 12px;
	color: #ccc;
}

.rorg-compo .btn {
	border: 1px solid #666;
	margin-left: 10px;
}

@media screen and (max-width:992px){
	body {
		background-color: #535353;
	}

	.wrapper {
		overflow: auto;
	}

	.sidebar-group {
		margin-top: 32px;
	}

	.app-window {
		position: fixed;
	}

	.app-window-header {
		height: 16px;
	}

	.btn.app-tool-select {
		display: none;
	}

	.workspace, .sidebar {
		float: none;
		width: 100%;
		height: auto;
		min-height: 0;
	}

	.app-hints {
		display: none;
	}

	.workspace {
		overflow: auto;
		background-color: #282828;
	}

	.app-palette, .app-palette[sort="rgb"] {
		width: 100%;
	}

	.toolbar {
		height: auto;
		padding-top: 0;
	}

	.toolbar hr {
		display: none;
	}

	.toolbar .btn {
		border-color: #484848;
		margin-top: 8px;
	},

	.rorg-compo .compo-info {
		margin-top: 8px;
	}

	.brush-right, .brush-center {
		display: none;
	}

	.app-brushes {
		padding: 0;
	}

	.input-group, .app-mode {
		padding-top: 0;
	}

	.app-snap {
		display: none;
	}

	.app-brushes li {
		display: none;
		position: static;
		margin: 0;
		top: 0;
		left: 0;
		z-index: 999;
		width: 32px;
		height: 32px;
	}

	.app-brushes li:first-child {
		display: inline-block;
	}

	.app-palette[sort="hue"][reverse] li:nth-child(5) {
		margin: 0;
	}

	.app-credits {
		position: static;
		margin-top: 16px;
		padding: 16px;
		width: auto;
	}
}