:root {
    color-scheme: light dark;
}

body {
    font-family: Helvetica, Arial, sans-serif;
    font-size: 14px;
    margin: 0;
    overflow: hidden;
}

hr {
    border: 0;
    border-top: 1px solid #ccc;
}

button {
    position: relative;
}

input {
    vertical-align: middle;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
}

textarea {
    tab-size: 4;
    white-space: pre;
    word-wrap: normal;
    vertical-align: middle;
}

textarea.success {
    border-color: #8b8 !important;
}

textarea.fail {
    border-color: #f00 !important;
    background-color: rgba(255, 0, 0, 0.05);
}

textarea,
input {
    outline: none;
}

/* osx */

.Panel {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;

    /* No support for these yet */
    -o-user-select: none;
    user-select: none;
}

.TabbedPanel {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;

    /* No support for these yet */
    -o-user-select: none;
    user-select: none;
    position: relative;
    display: block;
    width: 100%;
}

.TabbedPanel .Tabs {
    position: relative;
    display: block;
    width: 100%;
    min-width: 300px;
}

.TabbedPanel .Tabs .Tab {
    padding: 10px;
    text-transform: uppercase;
}

.TabbedPanel .Panels {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-width: 300px;
}

::-webkit-scrollbar{
    background: #202c54;
    border-radius: 10px;
    width: 5px;
    height: 5px;;
  }

  ::-webkit-scrollbar-thumb{
    background: #2f5597;
    border-radius: 10px;
    width: 5px;
    height: 5px;
    box-shadow: inset 0 0 5px grey;
  }

/* Listbox */
.Listbox {
    color: #444;
    background-color: #fff;
    padding: 0;
    width: 100%;
    min-height: 140px;
    font-size: 12px;
    cursor: default;
    overflow: auto;
}

.Listbox .ListboxItem {
    padding: 6px;
    color: white;
    /* color: #666; */
    white-space: nowrap;
}

.Listbox .ListboxItem.active {
    background-color: rgba(0, 0, 0, 0.04);
}

/* CodeMirror */

.CodeMirror {

    position: absolute !important;
    top: 37px;
    width: 100% !important;
    height: calc(100% - 37px) !important;

}

.CodeMirror .errorLine {

    background: rgba(255, 0, 0, 0.25);

}

.CodeMirror .esprima-error {

    color: #f00;
    text-align: right;
    padding: 0 20px;

}

/* outliner */

#outliner .opener {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin: 0px 4px;
    vertical-align: top;
    text-align: center;
}

#outliner .opener.open:after {
    content: '−';
}

#outliner .opener.closed:after {
    content: '+';
}

#outliner .option {

    border: 1px solid transparent;

}

#outliner .option.drag {

    border: 1px dashed #999;

}

#outliner .option.dragTop {

    border-top: 1px dashed #999;

}

#outliner .option.dragBottom {

    border-bottom: 1px dashed #999;

}

#outliner .type {
    display: inline-block;
    width: 14px;
    height: 14px;
    color: #ddd;
    text-align: center;
}

#outliner .type:after {
    content: '●';
}

/* */

#outliner .Scene {
    color: #8888dd;
}

#outliner .Camera {
    color: #dd8888;
}

#outliner .Light {
    color: #dddd88;
}

/* */

#outliner .Object3D {
    color: #aaaaee;
}

#outliner .Mesh {
    color: #8888ee;
}

#outliner .Line {
    color: #88ee88;
}

#outliner .LineSegments {
    color: #88ee88;
}

#outliner .Points {
    color: #ee8888;
}

/* */

#outliner .Geometry {
    color: #aaeeaa;
}

#outliner .Material {
    color: #eeaaee;
}

/* */

#outliner .Script:after {
    content: '◎'
}

/*  */

button {
    color: #203864; /* Dark Blue */
    background-color: white;
    /* color: #555;
	background-color: #ddd; */
    border: 0px;
    margin: 0px;
    /* GNOME Web */
    padding: 5px 8px;
    font-size: 12px;
    text-transform: uppercase;
    cursor: pointer;
    outline: none;
    border-radius: 15%;
}

button:hover {
    background-color: #fff;
}

button.selected {
    background-color: #fff;
}

input,
textarea {
    border: 1px solid transparent;
    color: #444;
}

input.Number {
    color: #08f !important;
    font-size: 12px;
    border: 0px;
    padding: 2px;
}

select {
    color: #666;
    background-color: #ddd;
    border: 0px;
    text-transform: uppercase;
    cursor: pointer;
    outline: none;
}

select:hover {
    background-color: #fff;
}

/* UI */

#resizer {
    position: absolute;
    top: 32px;
    right: 295px;
    width: 5px;
    bottom: 0px;
    /* background-color: rgba(255,0,0,0.5); */
    cursor: col-resize;
}

#viewport {
    position: absolute;
    top: 32px;
    left: 0;
    right: 300px;
    bottom: 0;
}

#viewport #info {
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

#script {
    position: absolute;
    top: 32px;
    left: 0;
    right: 300px;
    bottom: 0;
    opacity: 0.9;
}

#player {
    position: absolute;
    top: 32px;
    left: 0;
    right: 300px;
    bottom: 0;
}

#menubar {
    position: absolute;
    width: 100%;
    height: 32px;
    background: #eee;
    padding: 0;
    margin: 0;
    right: 0;
    top: 0;
    background-color: #203864; /* Dark Blue */
    font-family: "Exo", Verdana, Tahoma;
}

#menubar .menu {
    float: left;
    cursor: pointer;
    padding-right: 8px;
}

#menubar .menu.right {
    float: right;
    cursor: auto;
    padding-right: 0;
    text-align: right;
}

#menubar .menu .title {
    display: inline-block;
    color: #ffffff;
    margin: 0;
    padding: 8px;
    line-height: 16px;
    /* display: inline-block;
    color: #888;
    margin: 0;
    padding: 8px;
    line-height: 16px; */
}

#menubar .menu .options {
    position: fixed;
    display: none;
    padding: 5px 0;
    background: #eee;
    width: 150px;
    max-height: calc(100% - 80px);
    overflow: auto;
}

#menubar .menu:hover .options {
    display: block;
}

#menubar .menu .options hr {
    border-color: #ddd;
}

#menubar .menu .options .option {
	color: #666;
	background-color: white;
	padding: 5px 10px;
	margin: 0 !important;
}

#menubar .menu .options .HorizontalRule {
	color: #666;
	background-color: white;
	padding: 5px 10px;
	margin: 0 !important;
}

#menubar .menu .options .option:hover {
    color: #fff;
    background-color: #08f;
}

#menubar .menu .options .option:active {
    color: #666;
    background: transparent;
}

#menubar .menu .options .inactive {
    color: #bbb;
    background-color: transparent;
    padding: 5px 10px;
    margin: 0 !important;
}

#sidebar {
    position: absolute;
    right: 0;
    top: 32px;
    bottom: 0;
    width: 300px;
    background: #2f5597; /* Light Blue */
    overflow: auto;
    /* position: absolute;
    right: 0;
    top: 32px;
    bottom: 0;
    width: 300px;
    background: #eee;
    overflow: auto; */
}

#sidebar .Panel {
    background-color: #2f5597; /* Light Blue */
    color: white;
    padding: 10px;
    border-top: 1px solid white;
    /* color: #888;
    padding: 10px;
    border-top: 1px solid #ccc; */
}

#sidebar .Panel.collapsed {
    margin-bottom: 0;
}

#sidebar .Row {
    display: flex;
    align-items: center;
    min-height: 24px;
    margin-bottom: 10px;
}

#sidebar canvas {
	vertical-align: middle;
}

#tabs {
    background-color: #ddd;
    border-top: 1px solid #ccc;
}

#tabs span {
    color: #aaa;
    border-right: 1px solid white;
    padding: 10px;
    /* color: #aaa;
    border-right: 1px solid #ccc;
    padding: 10px; */
}

#tabs span.selected {
    color: #888;
    background-color: white;
    /* color: #888;
    background-color: #eee; */
}

#toolbar {
    position: absolute;
    left: 10px;
    top: 42px;
    width: 32px;
    background: white;
    text-align: center;
    border-top-right-radius: 15%;
    border-top-left-radius: 15%;
    border-bottom-right-radius: 5%;
    border-bottom-left-radius: 5%;
    /* position: absolute;
    left: 10px;
    top: 42px;
    width: 32px;
    background: #eee;
    text-align: center; */
}

#toolbar button,
#toolbar input {
    height: 32px;
}

#toolbar button img {
    width: 16px;
    opacity: 0.5;
}

#screenshot {
    position: absolute;
    width: 32px;
    background: white;
    bottom: 1.5rem;
    right: 60%;
    border: 1px solid white;
    border-radius: 15%;

}

#screenshot button {
    text-align: center;
    height: 32px;
}

#screenshot button img {
    padding-top: 0.1rem;
    padding-left: 0.05rem;
    width: 16px;
    opacity: 0.5;
}

.Outliner {
    color: #444;
    background-color: #fff;
    padding: 0;
    width: 100%;
    height: 140px;
    font-size: 12px;
    cursor: default;
    overflow: auto;
    resize: vertical;
    outline: none !important;
}

.Outliner .option {
    padding: 4px;
    color: #666;
    white-space: nowrap;
}

.Outliner .option:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.Outliner .option.active {
    background-color: rgba(0, 0, 0, 0.04);
}


.TabbedPanel .Tabs {
    background-color: #203864;/* Dark Blue */
    border-top: 1px solid white;
    /* background-color: #ddd;
    border-top: 1px solid #ccc; */
}

.TabbedPanel .Tab {
    background-color: #203864;/* Dark Blue */
    color: white;
    border-right: 1px solid white;
    /* color: #aaa;
    border-right: 1px solid #ccc; */
}

.TabbedPanel .Tab.selected {
    color: white;
    background-color: #2f5597; /* Light Blue */
    /* color: #888;
    background-color: #eee; */
}

.Listbox {
    color: white;
    background-color: #fff;
    /* color: #444;
    background-color: #fff; */
}

.Panel {
    color: #203864;
    /* Dark Blue */
    ;
    /* color: #888; */
}

/* */

@media all and (max-width: 600px) {

    #resizer {
        display: none;
    }

    #menubar .menu .options {
        max-height: calc(100% - 372px);
    }

    #menubar .menu.right {
        display: none;
    }

    #viewport {
        left: 0;
        right: 0;
        top: 32px;
        height: calc(100% - 352px);
    }

    #script {
        left: 0;
        right: 0;
        top: 32px;
        height: calc(100% - 352px);
    }

    #player {
        left: 0;
        right: 0;
        top: 32px;
        height: calc(100% - 352px);
    }

    #sidebar {
        left: 0;
        width: 100%;
        top: calc(100% - 320px);
        bottom: 0;
    }

}

/* DARK MODE */

@media (prefers-color-scheme: dark) {
	button {
		color: white;
		background-color: #222;
	}

	button:hover {
		color: #ccc;
		background-color: #444;
	}

	button.selected {
		color: #fff;
		background-color: #08f;
	}

	input,
	textarea {
		background-color: #222;
		border: 1px solid transparent;
		color: white;
	}

	select {
		color: #aaa;
		background-color: #222;
	}

	select:hover {
		color: #ccc;
		background-color: #444;
	}

	/* UI */

	#menubar {
		background: #111;
	}

	#menubar .menu .options {
		background: #111;
	}

	#menubar .menu .options hr {
		border-color: #222;
	}

	#menubar .menu .options .option {
		color: #888;
		background-color: white;
	}

	#menubar .menu .options .inactive {
		color: #444;
		background-color: white;
	}

	#sidebar {
		background-color: #111;
	}

	#sidebar .Panel {
		border-top: 1px solid #222;
	}

	#sidebar .Panel.Material canvas {
		border: solid 1px #5a5a5a;
	}

	#tabs {
		background-color: #1b1b1b;
		border-top: 1px solid #222;
	}

	#tabs span {
		color: #555;
		border-right: 1px solid #222;
	}

	#tabs span.selected {
		background-color: #111;
	}

	#toolbar {
		background-color: #111;
	}

	#toolbar img {
		filter: invert(1);
	}

	.Outliner {
		color: #888;
		background: #222;
	}

	.Outliner .option:hover {
		background-color: rgba(21, 60, 94, 0.5);
	}

	.Outliner .option.active {
		background-color: rgba(21, 60, 94, 1);
	}

	.TabbedPanel .Tabs {
		background-color: #1b1b1b;
		border-top: 1px solid #222;
	}

	.TabbedPanel .Tab {
		color: #555;
		border-right: 1px solid #222;
	}

	.TabbedPanel .Tab.selected {
		color: #888;
		background-color: #111;
	}

	.Listbox {
		color: #888;
		background: #222;
	}

	.Listbox .ListboxItem:hover {
		background-color: rgba(21, 60, 94, 0.5);
	}

	.Listbox .ListboxItem.active {
		background-color: rgba(21, 60, 94, 1);
	}
}