:root {
	--theme-loaded: "classic.css";
}

.jspaint {
	background: #c0c0c0;
}
body,
.canvas-area {
	background: #7b7b7b;
}
.canvas-area {
	border: 1px inset;
}
.canvas-area > canvas {
	background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACAQMAAABIeJ9nAAAABlBMVEW9vb3///8EwsWUAAAADElEQVQI12NoYHAAAAHEAMFJRSpJAAAAAElFTkSuQmCC") repeat;
	/* 16px is a common grid size, but that gives 8px grid cells, and our max zoom is 8x */
	/*background-size: 16px;*/
	background-size: 8px;
}

@media (resolution: 1x), (resolution: 2x), (min-resolution: 3x) {
	* {
		image-rendering: crisp-edges;
		image-rendering: pixelated;
		image-rendering: -moz-crisp-edges;
	}
}
.disable-aa-for-things-at-main-canvas-scale .main-canvas,
.disable-aa-for-things-at-main-canvas-scale .selection canvas {
	image-rendering: crisp-edges;
	image-rendering: pixelated;
	image-rendering: -moz-crisp-edges;
}

.selection:after,
.textbox:after {
	content: '';
	position: absolute;
	left: 0px;
	top: 0px;
	right: 0px;
	bottom: 0px;
	outline: 1px dashed black;
	box-shadow: 0 0 0 1px white;
}
.handle {
	background: #000080;
}
.useless-handle {
	background: #fff;
	box-shadow: 1px 1px 0 #000080 inset;
}
.resize-ghost {
	outline: 1px dotted black;
	/*outline: 1px dotted invert;*/
	/* I want this to be inverty, but in chrome this makes it invisible */
}

.menus *,
.menu-popup * {
	font-family: 'Segoe UI', sans-serif;
	font-size: 12px;
}
.menu-container {
	margin-bottom: 1px;
}
.menu-button {
	padding: 2px 5px;
	position: relative;
	outline: 0;
}
.menu-button:hover {
	box-shadow: 1px 1px 0 white inset, -1px -1px 0 #707070 inset;
}
.menu-button:active,
.menu-button.active {
	box-shadow: 1px 1px 0 #707070 inset, -1px -1px 0 white inset;
	top: 1px;
	left: 1px;
}
.menu-popup:not(.something-else) { /* CSS specifity hack */
	display: block;
	padding: 2px;
	background: #c0c0c0;
	border-top: 1px solid #c0c0c0;
	border-left: 1px solid #c0c0c0;
	border-right: 1px solid #000;
	border-bottom: 1px solid #000;
	box-shadow: 1px 1px 0 white inset, -1px -1px 0 #707070 inset;
}
.menu-item {
	padding: 1px 3px;
	margin: 2px;
}
.menu-item[disabled] {
	text-shadow: 0.8px 0.8px 0px #fff;
}
.menu-item:focus,
.menu-item.active {
	background: #007;
	color: #fff;
	text-shadow: none;
	outline: 0;
}
.menu-item[disabled] {
	color: #808080;
}
.menu-hr {
	border: 0;
	border-top: 1px solid #808080;
	border-bottom: 1px solid #ffffff;
	margin: 0px 2px;
}
.menu-hotkey {
	text-decoration: underline;
}

.status-area {
	font-family: 'Segoe UI', sans-serif;
	font-size: 12px;
	padding: 3px 2px;
	padding-top: 4px;
	border-top: 1px solid #7b7b7b;
	outline: 1px solid #7b7b7b;
	outline-offset: 1px;
}

.window-content button {
	margin: 3px;
	padding: 3px;
	box-sizing: border-box;
	-moz-box-sizing: border-box;
	border: 0;
	border-right: 1px solid black;
	border-bottom: 1px solid black;
	position: relative;
	background: transparent;
	outline: 0;
}
.window-content button:before {
	content: " ";
	position: absolute;
	z-index: 1;
	top: 0px;
	left: 0px;
	right: 0px;
	bottom: 0px;
	border-top: 1px solid white;
	border-left: 1px solid white;
	border-right: 1px solid #7b7b7b;
	border-bottom: 1px solid #7b7b7b;
}
.window-content button:hover:active:not([disabled]),
.window-content button.pressed,
.tool:hover:active,
.tool.selected {
	padding-bottom: 2px;
	top: 0px;
	left: 0px;
	right: 0px;
	bottom: 0px;
	border-top: 1px solid black;
	border-left: 1px solid black;
	border-right: 1px solid white;
	border-bottom: 1px solid white;
}
.window-content button:hover:active:not([disabled]):before,
.window-content button.pressed:before,
.tool:hover:active:before,
.tool.selected:before {
	top: 0px;
	left: 0px;
	right: 0px;
	bottom: 0px;
	border-top: 1px solid #7b7b7b;
	border-left: 1px solid #7b7b7b;
	border-right: 1px solid #bdbdbd;
	border-bottom: 1px solid #bdbdbd;
}

.text-toolbar-button-group button:not(:first-child) {
	margin-left: 0;
}
.text-toolbar-button-group button:not(:last-child) {
	margin-right: 0;
}

.tool-options {
	border: 1px solid white;
	border-top-color: #7b7b7b;
	border-left-color: #7b7b7b;
}
.tool {
	margin: 0;
	padding: 0;
	width: 25px;
	height: 25px;
	border: 0;
	border-right: 1px solid black;
	border-bottom: 1px solid black;
	background: transparent;
	outline: 0;
}
.tool:before {
	content: " ";
	position: absolute;
	z-index: 1;
	top: 0px;
	left: 0px;
	right: 0px;
	bottom: 0px;
	border-top: 1px solid white;
	border-left: 1px solid white;
	border-right: 1px solid #7b7b7b;
	border-bottom: 1px solid #7b7b7b;
}
.tool:hover:active {
	padding: 1px;
	background: transparent !important;
}

.tool.selected,
button.selected,
.current-colors {
	background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACAQMAAABIeJ9nAAAABlBMVEW9vb3///8EwsWUAAAADElEQVQI12NoYHAAAAHEAMFJRSpJAAAAAElFTkSuQmCC") repeat;
}

.tools {
	height: 200px;
	width: 50px;
}


.current-colors {
	box-sizing: border-box;
	-moz-box-sizing: border-box;
}
.color-selection {
	box-sizing: border-box;
	-moz-box-sizing: border-box;
	border-top: 1px solid #fff;
	border-left: 1px solid #fff;
	border-right: 1px solid #7B7B7B;
	border-bottom: 1px solid #7B7B7B;
}
.color-selection:after {
	content: '';
	position: absolute;
	left: 0px;
	top: 0px;
	right: 0px;
	bottom: 0px;
	border: 1px solid #bbb;
}
.current-colors,
.color-button {
	border-top: 1px solid #7B7B7B;
	border-left: 1px solid #7B7B7B;
	border-right: 1px solid #BBBBBB;
	border-bottom: 1px solid #BBBBBB;
	/*box-shadow: 1px 1px 0px black inset;*/
}
.swatch:before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
}
.color-selection:before {
	left: 1px;
	top: 1px;
	right: 1px;
	bottom: 1px;
}
.color-button:before,
.current-colors:before,
.swatch.pattern:before {
	border-left: 1px solid black;
	border-top: 1px solid black;
}
.swatch.pattern:before {
	border-right: 1px solid black;
	border-bottom: 1px solid black;
}
.current-colors:after,
.color-button:after {
	content: '';
	position: absolute;
	left: -1px;
	top: -1px;
	right: -2px;
	bottom: -2px;
	border-right: 1px solid white;
	border-bottom: 1px solid white;
}


.component-ghost.dock {
	outline: 1px solid black;
	/*outline: 1px solid invert;*/
}
.component-ghost:not(.dock) {
	outline: 1px dotted black;
	/*outline: 1px dotted invert;*/
}
.component-ghost:not(.dock):after,
.component-ghost:not(.dock):before {
	content: '';
	position: absolute; left: 0; right: 0; top: 0; bottom: 0;
	outline: 1px dotted black;
	/*outline: 1px dotted invert;*/
}
.component-ghost:not(.dock):after {
	outline-offset: 1px;
}
.component-ghost:not(.dock):before {
	outline-offset: 2px;
}


.window {
	background: #c0c0c0;
	border-top: 1px solid #dfdfdf;
	border-left: 1px solid #dfdfdf;
	border-right: 1px solid #000;
	border-bottom: 1px solid #000;
	padding: 2px;
}
.window:after {
	content: '';
	pointer-events: none;
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	border-top: 1px solid #fff;
	border-left: 1px solid #fff;
	border-right: 1px solid #7b7b7b;
	border-bottom: 1px solid #7b7b7b;
}
.window > * {
	margin: 1px;
}
.window-titlebar {
	background: #000080; /* fallback to standard color */
	background: -moz-linear-gradient(left, #000080 0%, #1084d0 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, right top, color-stop(0%, #000080), color-stop(100%, #1084d0)); /* Chrome, Safari4+ */
	background: -webkit-linear-gradient(left, #000080 0%, #1084d0 100%); /* Chrome10+, Safari5.1+ */
	background: -o-linear-gradient(left, #000080 0%, #1084d0 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(left, #000080 0%, #1084d0 100%); /* IE10+ */
	background: linear-gradient(to right, #000080 0%, #1084d0 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000080', endColorstr='#1084d0', GradientType=1 ); /* IE6-9 */

	color: white;
	font-family: 'Segoe UI', sans-serif;
	font-size: 12px;
}
.window-title {
	padding-left: 2px;
}
.window-close-button {
	width: 13px;
	height: 11px;
}
.window-titlebar button {
	margin: 2px;
}
.window-content {
	font-family: Arial, sans-serif;
	font-size: 16px;
}
button {
	padding: 0;
	vertical-align: middle;
	font-family: Arial, sans-serif;
	font-size: 12px;
	background: #c0c0c0;
	border-top: 1px solid #fff;
	border-left: 1px solid #fff;
	border-right: 1px solid #000;
	border-bottom: 1px solid #000;
	position: relative;
}
button:after {
	content: '';
	pointer-events: none;
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	border-top: 1px solid #dfdfdf;
	border-left: 1px solid #dfdfdf;
	border-right: 1px solid #808080;
	border-bottom: 1px solid #808080;
}
button:hover:active:not([disabled]),
button.pressed,
button.selected {
	border-top: 1px solid #000;
	border-left: 1px solid #000;
	border-right: 1px solid #fff;
	border-bottom: 1px solid #fff;
}
button:hover:active:not([disabled]):after,
button.pressed:after,
button.selected:after {
	border-top: 1px solid #808080;
	border-left: 1px solid #808080;
	border-right: 1px solid #dfdfdf;
	border-bottom: 1px solid #dfdfdf;
}
button:before {
	right: 0px;
	top: -3px;
}
button:hover:active:not([disabled]):before,
button.pressed:before {
	right: -1px;
	top: -2px;
}
button:focus {
	outline: 1px dotted black;
	outline-offset: -4px;
}

.help-window .item {
	font-family: 'Segoe UI', sans-serif;
	font-size: 12px;
	padding: 0 2px;
}
.help-window .item:hover {
	text-decoration: underline;
	color: #0000ff;
	cursor: pointer;
}
.help-window li:before {
	background-image: url("../../images/help-icons.png");
}
.help-window .item.selected {
	/* @TODO: separate into :focus */
	background-color: #0000aa;
	color: white;
	outline: 1px dotted #ffffaa;
	outline-offset: -1px;
}

input[type=text],
input[type=url] {
	/* TODO: fancy 3d inset border (might need a surrounding element because pseudo elements won't work with input) */
	/* I guess an image border could work; maybe I should be using (svg) image borders for stuff */
	/* (css inset border style doesn't look good and isn't consistent between browsers) */
	border: 1px solid gray;
	background: white;
	color: black;
}

::selection {
	background-color: #000080;
	color: white;
}

::-webkit-scrollbar,
::-webkit-scrollbar-thumb,
::-webkit-scrollbar-button {
	width: 16px;
	height: 16px;
}
::-webkit-scrollbar-thumb,
::-webkit-scrollbar-button {
	background: #c0c0c0;
	border-top: 1px solid #c0c0c0;
	border-left: 1px solid #c0c0c0;
	border-right: 1px solid #000;
	border-bottom: 1px solid #000;
	box-shadow: 1px 1px 0 white inset, -1px -1px 0 #707070 inset;
}
::-webkit-scrollbar-button:hover:active {
	border: 1px solid #7b7b7b;
	box-shadow: none;
}
::-webkit-scrollbar-corner {
	background: #c0c0c0;
}
::-webkit-scrollbar-button {
	background-position: center;
	background-repeat: no-repeat;
}
::-webkit-scrollbar-button {
	background-image: url("../../images/arrows.png");
}
::-webkit-scrollbar-button:horizontal:decrement:disabled {
	background-position: calc(-24px + 1px) 1px; /* left */
}
::-webkit-scrollbar-button:horizontal:increment:disabled {
	background-position: calc(-36px + 1px) 1px; /* right */
}
::-webkit-scrollbar-button:vertical:decrement:disabled {
	background-position: calc(-12px + 1px) 1px; /* up */
}
::-webkit-scrollbar-button:vertical:increment:disabled {
	background-position: calc(-0px + 1px) 1px; /* down */
}
::-webkit-scrollbar-button:horizontal:decrement {
	background-position: calc(-24px + 1px) calc(-12px + 1px); /* left */
}
::-webkit-scrollbar-button:horizontal:increment {
	background-position: calc(-36px + 1px) calc(-12px + 1px); /* right */
}
::-webkit-scrollbar-button:vertical:decrement {
	background-position: calc(-12px + 1px) calc(-12px + 1px); /* up */
}
::-webkit-scrollbar-button:vertical:increment {
	background-position: calc(-0px + 1px) calc(-12px + 1px); /* down */
}
::-webkit-scrollbar {
	background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACAQMAAABIeJ9nAAAABlBMVEW9vb3///8EwsWUAAAADElEQVQI12NoYHAAAAHEAMFJRSpJAAAAAElFTkSuQmCC) repeat;
}
::-webkit-scrollbar-track-piece:active {
	background: black;
}

/* turn off double buttons */
::-webkit-scrollbar-button:start:increment,
::-webkit-scrollbar-button:end:decrement {
	display: none;
}
