/* override browser default */
html,
body {
  margin: 0;
  padding: 0;

  font-size: 20px;
}

button {
	font-family: monospace;
	font-size: 20px;
	background-color: #000;
	color: #FFF;
	border: 1px solid #FFF;
}

button:hover {
	background-color: #FFF;
	color: #000;
}

/* use viewport-relative units to cover page fully */
body {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* include border and padding in element width and height */
* {
  box-sizing: border-box;
}

a {
	color: #FFF;
}

#ui {
  height: 100vh;
  width: 100vw;

  max-width: 100vw;
  max-height: 100vh;
  
  overflow: hidden;
}

#app {
	width: 100vw;
	height: 100vh;
	display: grid;
	grid-template: 'header header' auto
				    'sidebar main' 1fr /
					 auto 1fr;
}

#header {
	max-width: 100vw;
	grid-area: header;
	background-color: #000;
	border-bottom: 1px solid #FFF;
	flex-wrap: wrap;
	display: flex;
	align-items: center;
}

.header-right {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin-left: auto;
}

#sidebar {
	max-height: calc(100vh - 40px);
	grid-area: sidebar;
	background-color: #000;
	border-right: 1px solid #FFF;
	display: flex;
	flex-direction: column;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
}

.sidebar-top {
	margin-bottom: auto;
}

.sidebar-middle {
	display: flex;
	flex-wrap: wrap;
	flex-flow: column wrap;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.sidebar-bottom {
	margin-top: auto;
}

#main {
	grid-area: main;
}

#toolbox {
	display: flex;
}

#shapes {
	display: flex;
}

#palette {
	margin-left: 20px;
}

.tool-button {
	padding: 10px;
	border: 1px solid rgba(0,0,0,0);
	background-color: #FFF;
}

.tool-button i {
	width: 20px;
	height: 20px;
	color: #000;
}

.tool-button.active,
.tool-button:hover,
.tool-button:active {
	background-color: #000;
	border: 1px solid #FFF;
}

.tool-button.active i,
.tool-button:hover i,
.tool-button:active i {
	color: #FFF;
}

.tool-button.disabled {
	background-color: #FFF!important;
}

.tool-button.disabled i { 
	color: #ccc!important;
}

.vertical-slider {
	height: 180px;
	width: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

input[type="range"].range
{
     cursor: pointer;
	 width: 160px !important;
	 height: 24px;
     -webkit-appearance: none;
     z-index: 2;
     border: 1px solid #fff;
     background-color: #000;
}

/*customised range slider icon*/ input[type="range"].range::-webkit-slider-thumb
{
	-webkit-appearance: none;
	width: 24px;
	height: 24px;
	background-color: #FFF;
}

/* set range from 1 - 0 vertically (highest on top) */ .vertical
{
	-webkit-transform:rotate(270deg);
	-moz-transform:rotate(270deg);
	-o-transform:rotate(270deg);
	-ms-transform:rotate(270deg);
	transform:rotate(270deg);
}

#brush-options {
	display: flex;
	flex-direction: column;
	padding: 20px 0;
}

label {
	font-family: monospace;
	color: #FFF;
	text-align: center;
}

.dropdown {
	overflow: visible;
	z-index: 10;
	position: relative;
}

.dropdown-button {
	padding: 8px 12px;
}

.dropdown-list {
	position: absolute;
	z-index: 10;
	color: #FFF;
	background-color: #000;
	border: 1px solid #FFF;
	min-width: 200px;
	padding: 10px;
}

.dropdown-list ul {
	margin: 0;
	padding: 0;
}

.dropdown-item {
	width: 100%;
}

.dropdown-item-button {
	width: 100%;
	background-color: transparent;
	color: #FFF;
	border: none;
}

.dropdown-item-button:hover {
	background-color: #FFF;
	color: #000;
}

.modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0,0,0,0.5);
	z-index: 100;
}

.modal {
	position: absolute;
	z-index: 200;
	padding: 40px;
	font-family: monospace;
	border: 1px solid #FFF;
	background-color: #000;
	color: #FFF;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.modal div {
	margin-bottom: 12px;
}

.modal button {
	padding: 8px;
}

input[type=number] {
	background-color: #000;
	padding: 4px;
	font-size: 18px;
	color: #FFF;
	border: 1px solid #FFF;
	box-shadow: none;
	font-family: monospace;
}

.h-gap {
	width: 20px;
}

.modal h1 {
	margin-bottom: 1em;
	font-size: 24px;
}

.modal p {
	margin-bottom: 0.5em;
}

.modal ul {
	list-style: disc;
	padding-left: 40px;
}

.modal li {
	margin-bottom: 1em;
}

.setting {
	margin-bottom: 1em;
}

.setting-label {
	font-size: 24px;
}

blockquote {
	padding-left: 24px;
	border-left: 2px solid #FFF;
	margin: 1em 0;
}

canvas {
	image-rendering: optimizeSpeed;
}