:root {
	--ctr-color: rgb(205, 205, 205);
	--ctr-hover: rgb(255, 255, 55);
	--ctr-active: rgb(250, 255, 255);
	--schadow: -0.2vw 0.2vw 0.4vw rgb(0, 0, 0);
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html,
body {
	width: 100%;
	font-family: Tahoma, Arial, Verdana, sans-serif;
	font-size: 16px;
	line-height: 1.8;
}

header {
	height: 5vh;
	min-height: 20px;
}

.container {
	position: relative;
	margin: 0px auto;
	padding: 0px;
	width: 100%;
	max-width: calc(1920/616 * 90vh - 5px);
	height: clamp(308px, 90vh, 90vw);
	font-size: 10px;
	background: url(images/bg.jpg);
	background-size: cover;
	background-repeat: repeat-x;
	border: 1px solid black;
}

@media screen and (max-height: 308px) {
	.container {
		width: calc(1920px / 2 - 5px);
		max-width: none;
	}
}

canvas {
	opacity: 1.0;
	width: 100%;
	height: 100%;
}

.controls {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: row;
}

.controls-buttons-area {
	margin-left: 2vh;
	width: 42vh;
	height: 100%;
	display: flex;
	font-size: 11px;
	flex-direction: column;
	justify-content: center;
}

@media screen and (max-height: 308px) {
	.controls-buttons-area {
		width: 140px;
		font-size: 10px;
	}
}

.mouse-area {
	width: 100%;
	height: 100%;
}

/**************** стили блоков кнопок *************************/
.control_decor_house,
.control_decor_door,
.control_motion {
	margin-top: 3vh;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
}

/**************** общие стили кнопок *************************/
:is(.decor_house, .slider, .move_center) {
	height: 9vh;
	width: 9vh;
	min-height: 30px;
	min-width: 30px;
	display: flex;
	justify-content: center;
	align-items: center;
	border: 0.5vh solid var(--ctr-color);
	border-radius: 50%;
	cursor: pointer;
	box-shadow: var(--schadow);
}


:is(.decor_house, .slider, .move_center):hover {
	border: 0.5vh solid var(--ctr-hover);
	outline: 0.3vh solid var(--ctr-hover);
}

/****************** кнопки дом (background) ****************************/
.decor_house {
	appearance: none;
	position: relative;
	font-size: 5vh;
	font-weight: 100;
	color: var(--ctr-active);
	text-shadow: var(--schadow);
}

.decor_house[data-selected]::before {
	content: "✔";
	/*content: "\2714";*/
}

.decor_house:hover::after {
	position: absolute;
	left: 1vh;
	top: -5vh;
	content: attr(data-text);
	z-index: 1;
	font-size: 2.5vh;
	color: white;
	text-shadow: var(--schadow);
}

.decor_house:active {
	border: 0.2vmax solid var(--ctr-active);
}

/******************* дверь ***************************/
.slider {
	justify-content: left;
	background-color: #444;
	overflow: hidden;
}

.slider-line {
	display: flex;
	transition: all ease 1s;
}

.slider-item {
	height: 8vh;
	width: 8vh;
	min-height: 30px;
	min-width: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.slider-item img {
	height: 70%;
}

/* примерная область двери в сцене (TODO лучше сделать пиксельный поиск двери через canvas) */
.door_area {
	position: absolute;
	top: 52%;
	left: 87vh;
	width: 18vh;
	height: 33%;
	cursor: pointer;
	background-color: white;
	opacity: 0;
	visibility: visible;
}

/******************* повороты ***************************/
.move_center {
	background-color: #444;
}

.move_center img {
	width: 70%;
}

/********************* svg стрелки ****************************/
.arrow {
	width: 20%;
	max-width: 40px;
	min-width: 25px;
	cursor: pointer;
}

svg {
	fill: none;
	stroke: var(--ctr-color);
	stroke-width: 0.2em;
	stroke-linecap: round;
	stroke-linejoin: round;
	filter: drop-shadow(0px 0px 0.3em black);
	transition: stroke 0.4s ease-in-out;
}

svg:hover polyline {
	stroke: var(--ctr-hover);
}

svg:active polyline {
	stroke: var(--ctr-active);
}

/**************** подписи к группам кнопок *************************/
.control_decor_title,
.control_door_title,
.control_motion_title {
	display: box;
	margin: 2vh auto;
	padding: 0 1em 0;
	width: fit-content;
	border-radius: 0.6em;
	font-size: 0.9em;
	line-height: 1.2em;
	font-weight: 600;
	color: black;
	background-color: var(--ctr-color);
	box-shadow: var(--schadow);
}

/*********************** индикатор загрузки **********************************/
.load_spinner {
	position: absolute;
	top: 1;
	left: 1;
	/*	transform: translate(-50%, -50%);*/
	height: 9vh;
	width: 9vh;
	border: 0.5vh solid #444;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	/*backdrop-filter: blur(5px);*/
	visibility: hidden;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

/************* вертикальный режим ****************/
@media screen and (orientation: portrait) {
	.controls-buttons-area {
		display: none;
	}

	.door_area {
		position: absolute;
		top: 50%;
		left: 65vw;
		width: 16vw;
		height: 33%;
	}
}