html, body, main {
	height: 100%;
}
body {
	margin: 0;
	font-family: helvetica, arial, sans-serif;
}

button {
	cursor: pointer;
	border: none;
	border-radius: 5px;
	background: white;
	box-shadow: 1px 1px 1px orangered;
}

#viewport {
	height: 100%;
	width: 100%;
}

#palettes {
	top: 10px;
	bottom: 10px;
	width: 220px;
	position: absolute;
	left: 10px;
}

@media screen and (max-height: 500px) {
	#palettes {
		top: 5px;
		bottom: 5px;
		/*left: 5px;*/
	}
}

#palettes .palette-block {
	box-sizing: border-box;
	background-color: orange;
	border-radius: 5px;
}

#bricks-palette, #brick-and-colors-panel, #tools-panel {
	/*padding: 0 0 10px 10px;*/
}

#bricks-palette, #brick-and-colors-panel {
	/*margin-top: 10px;*/
}

#bricks-palette {
	padding: 5px;
	width: 100%;
	position: absolute;
	top: 178px;
	bottom: 10px;
}

#bricks-palette .list {
	overflow: auto;
	height: 100%;
	margin: 0;
	padding: 0;
}

#bricks-palette .list-item {
	box-sizing: border-box;
	display: inline-block;
	height: 60px;
	width: 60px;
	margin: 5px;
	background-color: #fff;
	cursor: pointer;
	border-radius: 4px;
	padding: 5px;
}

@media screen and (max-height: 500px) {
	#bricks-palette {
		max-height: none;
		bottom: 5px;
	}

	#bricks-palette .list {
		max-height: none;
		height: 100%;
	}
}

@media screen and (max-width: 800px) {
	#bricks-palette {
		width: 150px;
	}
}

.icon canvas, .current-brick .icon canvas {
	vertical-align: middle;
	max-height: 100%;
	max-width: 100%;
}

#bricks-palette .list-item .icon {
	background-size: contain;
	background-position: 50% 50%;
	background-repeat: no-repeat;
	white-space: nowrap;
	text-align: center;
	height: 100%;
	width: 100%;
}

#brick-and-colors-panel {
	width: 150px;
	position: relative;
	padding: 10px;
	display: grid;
	grid-template-columns: auto 40px;
	grid-column-gap: 10px;
	margin-top: 10px;
}
#brick-and-colors-panel .colors-group {
	display: inline-block;
	text-align: right;
}

#brick-and-colors-panel .main-color, #brick-and-colors-panel .base-color {
	position: relative;
	height: 40px;
	width: 40px;
	border-radius: 4px;
	cursor: pointer;
	border: 1px solid white;
	display: inline-block;
}
#brick-and-colors-panel .base-color {
	height: 20px;
	width: 20px;
}
#brick-and-colors-panel .current-brick {
	height: 90px;
	background-color: white;
	border-radius: 4px;
	display: inline-block;
}

#brick-and-colors-panel .main-color:hover, #brick-and-colors-panel .base-color:hover {
	border: 1px solid black;
}

@media screen and (max-height: 500px) {
	#brick-and-colors-panel {
		/*padding: 5px;*/
		/*margin-top: 0;*/
	}
}

.colors-popup ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.colors-popup li {
	height: 40px;
	width: 40px;
	margin: 2px;
	border-radius: 4px;
	border: 1px solid black;
	cursor: pointer;
	display: inline-block;
}

.colors-popup li.active {
	border: 1px solid white;
}

.current-brick .item {
	position: relative;
	width: 100%;
	height: 100%;
}
.current-brick .icon {
	height: 100%;
}
.current-brick .brick-name {
	position: absolute;
	bottom: 0;
	text-overflow: ellipsis;
	width: 100%;
	white-space: nowrap;
	overflow: hidden;
}

#tools-panel {
	width: fit-content;
	padding: 10px;
}
#tools-panel .button {
	cursor: pointer;
	border-radius: 4px;
	display: inline-block;
	font-size: 0;
}
#tools-panel .button svg {
	fill: white;
}
#tools-panel .button.active {
	background-color: white;
}
#tools-panel .button.active svg {
	fill: orange;
}

.right-controls {
	position: absolute;
	bottom: 10px;
	right: 10px;
}

.right-controls#brush-level-control {
	bottom: 119px;
}
.right-controls#rulers-visible {
	bottom: 10px;
	right: 78px;
}
.right-controls#align-to-center {
	bottom: 10px;
	right: 144px;
}

.right-controls .control-button, .right-controls .control-header {
	user-select: none;
	font-size: 2em;
	font-weight: bolder;
	color: white;
	cursor: pointer;
	text-align: center;
	padding: 16px;
	line-height: 16px;
	background-color: orange;
	width: 24px;
}

.right-controls .control-header svg {
	fill: white;
	opacity: 0.5;
}

.right-controls#brush-level-control .control-header {
	display: flex;
	align-items: center;
	position: relative;
	height: 32px;
	vertical-align: middle;
	justify-content: center;
}

.right-controls#brush-level-control .control-header span {
	font-size: 24px;
	text-shadow: rgba(0,0,0,0.4) 2px 2px 0px;
}

.right-controls#brush-level-control .control-header svg {
	display: none;
	position: absolute;
}

.right-controls#align-to-center .control-button,
.right-controls#rulers-visible .control-button,
.right-controls#brush-level-control .control-button,
.right-controls#brush-level-control .control-header,
.right-controls.menu-toggler .control-button,
.right-controls.save-scene .control-button
{
	width: auto;
	padding: 9px;
}
.right-controls svg {
	fill: white;
	height: 36px;
	width: 36px;
}

.right-controls .control-button:hover {
	background-color: darkorange;
}

.right-controls .control-button:first-of-type, .right-controls .control-header {
	border-radius: 5px 5px 0 0;
}
.right-controls .control-button:last-of-type {
	border-radius: 0 0 5px 5px;
}

.right-controls#align-to-center .control-button,
.right-controls#rulers-visible .control-button,
.right-controls#welcome-page .control-button,
.right-controls.save-scene .control-button
{
	border-radius: 5px;
}

.right-controls.active#rulers-visible .control-button {
	border: 3px solid white;
	margin: -3px;
}

#load-progress {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: orange !important;
	border: none !important;
	margin-left: 0 !important;
	padding: 10px;
	border-radius: 5px;
	font-size: 24px;
	font-family: monospace;
	font-weight: bold;
	color: white;
	text-shadow: rgba(0,0,0,0.4) 2px 2px 0px;
	box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
}

.right-controls.menu-toggler {
	top: 0;
}

.right-controls.save-scene {
	top: 65px;
}

.menu-toggler .opened-icon {
	display: none;
}
.menu-toggler .closed-icon {
	display: block;
}

.menu-visible .menu-toggler .opened-icon {
	display: block;
}

.menu-visible .menu-toggler .closed-icon {
	display: none;
}

#welcome-page {
	z-index: 903;
	box-sizing: border-box;
	padding: 20px;
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%,-50%);
	background: rgb(255,165,0);
	background: linear-gradient(180deg, rgba(255,177,0,1) 0%, rgba(255,165,0,1) 35%, rgba(255,147,0,1) 100%);
	border-radius: 5px;
	box-shadow: 3px 3px 5px rgba(0,0,0,0.5);
	max-height: 100vh;
	overflow: auto;
}

#welcome-page .menu-toggler {
	display: none;
	position: absolute;
	top: 5px;
	right: 5px;
	cursor: pointer;
	font-size: 32px;
	color: white;
	text-shadow: 2px 1px 1px orangered;
	height: 20px;
	width: 20px;
	line-height: 20px;
}

body.scene-ui-visible #welcome-page .menu-toggler {
	display: block;
}

#welcome-page .menu-toggler:hover {
	text-shadow: 3px 2px 1px orangered;
}

.menu-visible #welcome-page {
	display: block;
}

.welcome-files-table {
	display: grid;
	grid-template-columns: 270px 270px;
}

.welcome-page-blocker {
	z-index: 902;
	display: none;
	position: absolute;
	top: 0;
	bottom: 0;
	right: 0;
	left: 0;
	background: #000000;
	opacity: 0.75;
}
body.scene-ui-visible.menu-visible .welcome-page-blocker {
	display: block;
}

.files-list .file, .files-list .create-new-file {
	color: black;
	position: relative;
	background-color: white;
	border-radius: 5px;
	cursor: pointer;
	height: 100px;
	width: 200px;
	overflow: hidden;
	margin-bottom: 10px;
	box-shadow: 1px 1px 1px orangered;
}

.files-list .file.updating {
	opacity: 0.5;
	pointer-events: none;
}

.files-list .file:hover, .files-list .create-new-file:hover {
	box-shadow: 2px 2px 1px orangered;
}

.files-list .file .name {
	position: absolute;
	bottom: 0;
	background: rgba(0,0,0,0.75);
	color: white;
	padding: 5px;
	width: 100%;
	box-sizing: border-box;
}
.files-list .file .thumbnail {
	position: absolute;
	width: 100%;
	height: 100%;
	background-position: center center;
	background-repeat: no-repeat;
	overflow: hidden;
}
.files-list .file .edit-button {
	position: absolute;
	bottom: 5px;
	right: 5px;
}

.files-list .file .delete-button {
	position: absolute;
	top: 5px;
	right: 5px;
}

.files-list .file .lesson-status {
	cursor: pointer;
	font-size: smaller;
	background-color: darkred;
	color: white;
	position: absolute;
	top: 5px;
	left: 5px;
	padding: 2px;
	border-radius: 3px;
}
.files-list .file .lesson-status.lesson-status-published {
	background-color: greenyellow;
	color: black;
}

.files-list .file .thumbnail>div {
	width: 300px;
	height: 150px;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	transition: all .2s;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.7142857142857143);
}

.files-list .file:hover .thumbnail>div {
	/* current thumbnail size is 350x140 while container size is 253x100 = approx 1.4 ratio */
	transform: translate(-50%, -50%) scale(1);
}


.files-list .create-new-file {
	text-align: center;
	vertical-align: middle;
	line-height: 100px;
	font-size: 32px;
	font-weight: bold;
}

.files-list[data-type="all"] .title {
	/*display: none;*/
}

.files-list[data-type="all"] {
	border-right: solid 1px #ff7800;
	margin-right: 15px;
}

.files-list[data-type="recent"] {
	display: none;
}

.sceneRecentVisible .files-list[data-type="recent"],
.sceneRecentVisible .files-list[data-type="all"] .title {
	display: block;
}

.steps-window-toggle, .steps-cam-window-toggle {
	display: none;
	right: 0;
	top: 189px;
	bottom: unset;
}

.steps-cam-window-toggle {
	top: 130px;
}

.steps-window-toggle .control-button, .steps-cam-window-toggle .control-button {
	font-size: 14px;
	width: auto;
	border-radius: 5px !important;
}

.lesson-edit-window {
	display: none;
	position: absolute;
	width: 200px;
	top: 10px;
	right: 75px;
	background-color: orange;
	border-radius: 5px;
	max-height: 98vh;
	overflow: auto;
}

body.lesson-edit-visible .lesson-edit-window {
	display: block;
}

ul.steps_list_ul {
	list-style: none;
	padding: 0;
}

#lesson-window, .lesson-camera-edit-window {
	/*width: 600px;*/
	/*height: 600px;*/
	position: absolute;
	top: 10px;
	right: 100px;
	background-color: orange;
	border-radius: 5px;
	padding: 2px;
    z-index: 100;
}

.lesson-camera-edit-window.hidden {
	visibility: hidden;
}

#lesson-window .close, .lesson-camera-edit-window .close {
	display: none;
}

#lesson-window .viewport, .lesson-camera-edit-window .viewport {
	position: relative;
	width: 300px;
	height: 150px;
}

.lesson-camera-edit-window .camera-rig-presets {
	position: absolute;
	top: 2px;
	left: 2px;
}
.lesson-camera-edit-window .camera-rig-presets button {
	margin: 1px;
}

#lesson-window .sizes > span, .lesson-camera-edit-window .sizes > span {
	cursor: pointer;
	box-sizing: border-box;
}

#lesson-window .sizes > span.selected, .lesson-camera-edit-window .sizes > span.selected {
	font-weight: bold;
}

#lesson-window.x2 .viewport, .lesson-camera-edit-window.x2 .viewport {
	width: 600px;
	height: 300px;
}

#lesson-window.x3 .viewport, .lesson-camera-edit-window.x3 .viewport {
	width: 900px;
	height: 450px;
}

#lesson-window .step-back, #lesson-window .step-forward, .lesson-camera-edit-window .step-back, .lesson-camera-edit-window .step-forward {
	user-select: none;
	display: inline-block;
	cursor: pointer;
}

#lesson-window.hidden {
	display: none;
}

#lesson-framing {
	position: absolute;
	top:0; left: 0;
	width: 100%;
	height: 100%;
	pointer-events:none;
	opacity: 0.75;
}

#lesson-framing.hidden {
	visibility: hidden;
}

/*
#camera-rig-preview {
	visibility: hidden;
	position: absolute;
	top: 10px;
	left: 170px;
	width: 166px;
	height: 84px;
	z-index: 99999;
	border: 1px solid black;
	overflow: hidden;
	background-color: gray;
}

body.lesson-edit-visible #camera-rig-preview {
	visibility: visible;
}

#camera-rig-preview.zoomed {
	width: 700px;
	height: 700px;
}

 */

.lesson-camera-edit-window .step-info-text,
.lesson-camera-edit-window .step-back,
.lesson-camera-edit-window .step-forward
{
	display: inline-block;
	height: 30px;
	line-height: 30px;
	width: 32%;
	text-align: center;
}

.lesson-camera-edit-window .save-camera {
	display: block;
	margin: 5px auto;
	height: 30px;
	cursor: pointer;
}

.camera-info {
	display: grid;
	grid-template-columns: 50% 50%;
	grid-gap: 5px;
	margin: 5px;
}

#main-camera-control {
	position: absolute;
	top: 10px;
	left: 200px;
}
