/* roboto-300 - latin */
@font-face {
	font-family: "Roboto";
	font-style: normal;
	font-weight: 300;
	src: local(""), url("./fonts/roboto-v30-latin-300.woff2") format("woff2"),
		url("./fonts/roboto-v30-latin-300.woff") format("woff");
}
/* roboto-regular - latin */
@font-face {
	font-family: "Roboto";
	font-style: normal;
	font-weight: 400;
	src: local(""), url("./fonts/roboto-v30-latin-regular.woff2") format("woff2"),
		url("./fonts/roboto-v30-latin-regular.woff") format("woff");
}
/* roboto-500 - latin */
@font-face {
	font-family: "Roboto";
	font-style: normal;
	font-weight: 500;
	src: local(""), url("./fonts/roboto-v30-latin-500.woff2") format("woff2"),
		url("./fonts/roboto-v30-latin-500.woff") format("woff");
}
/* roboto-700 - latin */
@font-face {
	font-family: "Roboto";
	font-style: normal;
	font-weight: 700;
	src: local(""), url("./fonts/roboto-v30-latin-700.woff2") format("woff2"),
		url("./fonts/roboto-v30-latin-700.woff") format("woff");
}
/* roboto-900 - latin */
@font-face {
	font-family: "Roboto";
	font-style: normal;
	font-weight: 900;
	src: local(""), url("./fonts/roboto-v30-latin-900.woff2") format("woff2"),
		url("./fonts/roboto-v30-latin-900.woff") format("woff");
}

*,
html {
	font-family: "Roboto", sans-serif !important;
	box-shadow: none;
}

input {
	height: 25px;
	width: 100%;
	padding: 0 7px;
	margin: 0;
	border: 0;
	background-color: #161924 !important;
	color: #fff;
	border: none;
	border-radius: 6px;
	box-sizing: border-box;

	&.input-large {
		padding: 4px 12px;
		height: 40px;
		font-size: 14px;
	}

	&:disabled {
		opacity: 0.8;
	}

	&:focus {
		outline: 2px solid #037fff;
	}
}

textarea {
	width: 100%;
	height: 100%;
	min-height: 50px;
	box-sizing: border-box;
	resize: none;
	width: 100%;
	padding: 7px;
	margin: 0;
	border: 0;
	background-color: #161924 !important;
	color: #fff;
	border: none;
	border-radius: 6px;
	box-sizing: border-box;

	&:disabled {
		opacity: 0.8;
	}

	&:focus {
		outline: 2px solid #037fff;
	}
}

.btn {
	background-color: #1f2633 !important;
	border: none;
	border-radius: 6px;
	box-sizing: border-box;
	color: #fff;
	padding: 6px;
	display: flex;
	align-items: center;
	justify-content: center;

	&.btn-dark {
		background: #161924 !important;
	}

	&.btn-danger {
		background: #241212 !important;
	}

	&.btn-success {
		background: #111e13 !important;
	}

	&.btn-lg {
		padding: 9px 14px;
	}

	&:hover {
		opacity: 0.7;
	}

	&:disabled {
		opacity: 0.4;
	}
}

.custom-checkbox {
	display: flex;
	position: relative;
	padding-left: 27px;
	cursor: pointer;
	font-size: 13px;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	color: #fff;
	align-items: center;
	justify-content: flex-start;
	height: 18px;

	input {
		position: absolute;
		opacity: 0;
		cursor: pointer;
		height: 0;
		width: 0;
	}

	.checkmark {
		position: absolute;
		top: 0;
		left: 0;
		height: 18px;
		width: 18px;
		background-color: #eee;
		border-radius: 3px;

		&:after {
			content: "";
			position: absolute;
			display: none;
			left: 6px;
			top: 2px;
			width: 3px;
			height: 8px;
			border: solid white;
			border-width: 0 3px 3px 0;
			-webkit-transform: rotate(45deg);
			-ms-transform: rotate(45deg);
			transform: rotate(45deg);
		}
	}

	&:hover input ~ .checkmark {
		background-color: #fff;
	}

	input:checked ~ .checkmark {
		background-color: #037fff;

		&:after {
			display: block;
		}
	}
}

.alert {
	padding: 12px 13px;
	color: #fff;
	background: rgba(255, 138, 138, 0.22);
	border-left: 3px solid rgba(255, 45, 45, 0.8);
	border-radius: 4px;
	font-weight: 500;

	&.alert-success {
		background: rgba(142, 255, 138, 0.22);
		border-left: 3px solid rgba(45, 255, 73, 0.8);
	}
}

.loading {
	padding: 20px 0;
	width: 100%;
	text-align: center;
	opacity: 0.6;
}

#viewport-container {
	background: none !important;
	pointer-events: none;
	* {
		background: none !important;
		pointer-events: none;
	}
}

.lm_item_container,
.lm_splitter,
.lm_header {
	pointer-events: auto;
}

.lm_splitter {
	opacity: 1 !important;
	background: rgba(22, 25, 36, 0.4) !important;
}

.lm_content {
	background: rgba(31, 38, 51, 0.92) !important;
	color: #8da1b6;
	height: 100%;
}

.glComponent {
	width: 100%;
	height: 100%;
	overflow: auto;
	display: flex;
	flex-direction: column;
}

.lm_goldenlayout {
	background-color: transparent !important;
}

.lm_header {
	background-color: rgba(22, 25, 36, 1) !important;
}

.lm_header > .lm_items:has(div.noHeader) {
	display: none;
}

#viewport {
	position: absolute;
	left: 0;
	top: 0;
	pointer-events: auto;
}

.datafont {
	font-family: sans-serif;
}

.tr {
	display: flex;
	width: 100%;
}

.th,
.td {
	flex: 1;
	text-overflow: ellipsis;
	overflow: hidden;
	direction: rtl;
	text-align: left;
	margin-right: 1vh;
}

.vue-recycle-scroller__slot .th:first-child,
.vue-recycle-scroller__item-view .td:first-child {
	flex: 1;
}

#toolbar {
	user-select: none;
	z-index: 1;
	left: 0;
	top: 0;
	width: 100vw;
	background-color: #161924;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: relative;
	height: 40px;
	opacity: 1;

	&.in-game {
		background-color: rgba(22, 25, 36, 0.6);
	}
}

.lm_header .lm_tab {
	box-shadow: none !important;
	padding: 0;
	height: 29px !important;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: 0 50px 0 10px !important;
	font-size: 12px !important;
	text-transform: uppercase;
	font-weight: 600;
	color: #7a8797 !important;
	border-top-right-radius: 6px;
	border-top-left-radius: 6px;
	background-color: transparent !important;

	&:hover,
	&.lm_active {
		background-color: #1f2633 !important;
		color: #929ead !important;
	}

	.lm_close_tab {
		top: 50%;
		right: 8px !important;
		transform: translateY(50%);
		background-image: url("../icons/editor/new/close.svg") !important;
		background-size: 8px !important;
	}
}

.lm_drag_handle:hover {
	background-color: #409eff;
}

input[type="search"]::-webkit-search-cancel-button {
	-webkit-appearance: searchfield-cancel-button;
}

.el-input__inner {
	border: none !important;
	color: #fff !important;
}

#toolbar {
	.el-input__inner {
		background: #1f2633 !important;
	}
}

.el-select-dropdown {
	background-color: #1f2633 !important;
	border-radius: 6px !important;
	border: none !important;

	.el-select-dropdown__item {
		color: #fff !important;

		&.hover,
		&:hover,
		&.selected {
			background: #037fff !important;
		}
	}
}

.el-popper[x-placement^="bottom"] .popper__arrow {
	border-bottom-color: #1f2633 !important;

	&::after {
		border-bottom-color: #1f2633 !important;
	}
}

.el-menu {
	background: #1f2633 !important;
	color: #fff !important;
	border: 0 !important;

	.el-submenu__title {
		border: 0 !important;
	}
}

.el-menu--popup {
	background: #1f2633 !important;
	border-radius: 6px !important;

	.el-menu-item {
		background: transparent !important;
		border-radius: 0 !important;

		&.hover,
		&:hover,
		&.selected {
			background: #037fff !important;
		}
	}
}

li.el-menu-item.separator {
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	height: 1px !important;
	margin: 5px 0;
}

.grid-container {
	display: grid;
	grid-gap: 1vh;
	padding: 1vh;
}

.grid-item {
	padding: 7px 0 10px;
	overflow: hidden;
	height: fit-content;
	text-align: center;

	.name {
		max-width: 90%;
		margin: 0 auto;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		height: 15px;
	}

	&:hover {
		background: #313848;
		border-radius: 0.5vh;
	}

	.Icon {
		margin-bottom: 8px;
	}
}

.list-container {
	.vue-recycle-scroller__item-view {
		&.hover {
			.tr {
				background-color: #313848;
			}
		}

		.tr {
			height: 22px;
			align-items: center;
			display: flex;

			.Icon {
				margin: 0 7px;
				height: 17px;
				width: 17px;
			}
		}
	}
}

.tooltip {
	display: block !important;
	z-index: 10000;

	.tooltip-inner {
		background: black;
		color: white;
		border-radius: 16px;
		padding: 5px 10px 4px;
	}

	.tooltip-arrow {
		width: 0;
		height: 0;
		border-style: solid;
		position: absolute;
		margin: 5px;
		border-color: black;
		z-index: 1;
	}

	&[x-placement^="top"] {
		margin-bottom: 5px;

		.tooltip-arrow {
			border-width: 5px 5px 0 5px;
			border-left-color: transparent !important;
			border-right-color: transparent !important;
			border-bottom-color: transparent !important;
			bottom: -5px;
			left: calc(50% - 5px);
			margin-top: 0;
			margin-bottom: 0;
		}
	}

	&[x-placement^="bottom"] {
		margin-top: 5px;

		.tooltip-arrow {
			border-width: 0 5px 5px 5px;
			border-left-color: transparent !important;
			border-right-color: transparent !important;
			border-top-color: transparent !important;
			top: -5px;
			left: calc(50% - 5px);
			margin-top: 0;
			margin-bottom: 0;
		}
	}

	&[x-placement^="right"] {
		margin-left: 5px;

		.tooltip-arrow {
			border-width: 5px 5px 5px 0;
			border-left-color: transparent !important;
			border-top-color: transparent !important;
			border-bottom-color: transparent !important;
			left: -5px;
			top: calc(50% - 5px);
			margin-left: 0;
			margin-right: 0;
		}
	}

	&[x-placement^="left"] {
		margin-right: 5px;

		.tooltip-arrow {
			border-width: 5px 0 5px 5px;
			border-top-color: transparent !important;
			border-right-color: transparent !important;
			border-bottom-color: transparent !important;
			right: -5px;
			top: calc(50% - 5px);
			margin-left: 0;
			margin-right: 0;
		}
	}

	&.popover {
		$color: #f9f9f9;

		.popover-inner {
			background: $color;
			color: black;
			padding: 24px;
			border-radius: 5px;
			box-shadow: 0 5px 30px rgba(black, 0.1);
		}

		.popover-arrow {
			border-color: $color;
		}
	}

	&[aria-hidden="true"] {
		visibility: hidden;
		opacity: 0;
		transition: opacity 0.15s, visibility 0.15s;
	}

	&[aria-hidden="false"] {
		visibility: visible;
		opacity: 1;
		transition: opacity 0.15s;
	}
}

.ps .ps__rail-x:hover,
.ps .ps__rail-y:hover,
.ps .ps__rail-x:focus,
.ps .ps__rail-y:focus,
.ps .ps__rail-x.ps--clicking,
.ps .ps__rail-y.ps--clicking {
	background: transparent !important;
}

.lm_header .lm_tab .lm_title {
	display: flex !important;
	align-items: center;
}

.lm_tab .lm_title::before {
	content: "";
	display: inline-flex;
	margin-right: 7px;
	height: 17px;
	width: 17px;
	background: transparent;
	background-size: contain !important;
}

.lm_tab[title="History"] .lm_title::before {
	background: transparent url(../icons/editor/new/history.svg) 50% 50% no-repeat;
}

.lm_tab[title="Inspector"] .lm_title::before {
	background: transparent url(../icons/editor/new/eye-gray.svg) 50% 50% no-repeat;
}

.lm_tab[title="Viewport"] .lm_title::before {
	background: transparent url(../icons/editor/new/viewport.svg) 50% 50% no-repeat;
}

.lm_tab[title="Scene Instances"] .lm_title::before {
	background: transparent url(../icons/editor/new/tree.svg) 50% 50% no-repeat;
}

.lm_tab[title="Project"] .lm_title::before {
	background: transparent url(../icons/editor/new/project.svg) 50% 50% no-repeat;
}

.lm_tab[title="Project Data"] .lm_title::before {
	background: transparent url(../icons/editor/new/project-data.svg) 50% 50% no-repeat;
}

.lm_tab[title="Logs"] .lm_title::before {
	background: transparent url(../icons/editor/new/console.svg) 50% 50% no-repeat;
}
