@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:wght@400;700&display=swap');

/*
	
+---------+----------------------------+
| z-index |            item            |
+---------+----------------------------+
|       2 | #credits                   |
|       2 | #config_buttons            |
|       5 | #config_sidebar            |
|      10 | #logo_brand                |
|      10 | #titolo                    |
|      10 | #ar_model_viewer_container |
|      25 | .window                    |
|     997 | #notifications             |
|     998 | .alertification            |
|     999 | #loader                    |
+---------+----------------------------+

+-------------+-------+---------+-------------------------------+
| background  | color | opacity |             item              |
+-------------+-------+---------+-------------------------------+
| white       | #333  |       1 | body                          |
| #dddddd     | _     |       1 | #configurator                 |
| 127,127,127 | _     |     0.1 | .closex                       |
| 0,0,0       | white |     0.5 | #loader                       |
| white       | #333  |       1 | #config_sidebar               |
| white       | _     |       1 | #config_sidebar .panel p span |
| #dddddd     | _     |       1 | #ar_model_viewer_container    |
+-------------+-------+---------+-------------------------------+

Screen sizes:	
iPad w1080
tablet w1024
smartphone w768
	
*/

:root {
	
	/* COLORS */
	--maincolor: #ff0000;
	--secondarycolor: #ffff00;
	--fontcolor: #f8f8f8;
	--backcolor: #333;
	
	/* FONTS */
	--regularsize: 300;
	--boldsize: 600;
	
	/* APPEAL */
	--borderradius: 3px;

}

* {
	margin: 0;
	padding: 0;
	outline: 0;
	-webkit-box-sizing: border-box !important;
	    box-sizing: border-box !important;
	-webkit-touch-callout: none; /* iOS Safari */
		-webkit-user-select: none; /* Safari */
			-khtml-user-select: none; /* Konqueror HTML */
				-moz-user-select: none; /* Firefox */
					-ms-user-select: none; /* Internet Explorer/Edge */
						user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */
}

.clearfix:after {
	clear:both;
	content:".";
	display:block;
	height:0;
	line-height:0;
	visibility:hidden;
}

.hidden {
	display:none;
}

img {
	display:block;
	max-width:100%;
	max-height:100%;
	margin:auto;
}
	
html, body {
	height:100%;
	color: var(--fontcolor);
	font-family: 'Titillium Web', sans-serif;
	font-size: 16px;
	line-height: 1.25em;
}

@media (max-width: 767px) {
	html, body {
		font-size: 14px;
	}
}

#configurator, #config_graphics, #config_render, canvas {
	width: 100%;
	height: 100%;
	overflow: hidden;
	position: relative;
}

#configurator {
	background-color: var(--backcolor);
	transition: background 1s ease;
}

#config_graphics {
	position:absolute;
	transition: all 1s ease;
	top:0;
	left:0;
}

#config_render {
	width:100vw;
	height: 100vh;
	position:absolute;
	top:50%;
	left:50%;
	transform: translate(-50%,-50%);
	cursor: grab;
}

@media (max-width: 1024px) {

	.configuring #config_graphics {
		height: 50%;
		top: 0%;
	}

}

@media (min-width: 1025px) {

	.configuring #config_graphics {
		width: 67%;
		left:33%;
	}

}

@media (min-width: 1920px) {

	.configuring #config_graphics {
		width:75%;
		left:25%;
	}

}

h1, h2, h3 {
	display:block;
	font-weight:bold;
	margin:0 0 0.5em;
	flex-basis: 100%;
}

p {
	margin:0 0 0.5em;
}

b,strong {
	font-weight:bold;
}

h1 {
	font-size: 1.3em;
}

h2 {
	font-size: 1.2em;
}

h3 {
	font-size: 1.1em;
	font-weight: normal;
}

a, .link {
	color: inherit;
	display:inline-block;
	cursor: pointer;
	text-decoration: underline;
}

progress {
	display:block;
	margin:5px 0;
}

.disabled {
	opacity: 0.25 !important;
	display: none !important;
}

.button {
	cursor: pointer;
	text-transform: uppercase;
	display: inline-block;
	padding: 0.5em 1em;
	margin: 0.2em;
	background-color: rgba(255,255,255,0.9);
	border: solid 1px white;
	color:black;
	transition: all 0.25s ease;
	text-transform: uppercase;
	text-decoration: none;
	text-align: center;
	border-radius: calc(16px + 1em);
	box-shadow: 0 0 3px 0 rgba(0,0,0,0.5);
}

.button:hover {
	box-shadow: 0 0 6px 0 rgba(0,0,0,0.5);
}

@media (max-width: 767px) {
	
	.button {
		display:block;
	}
	
}

.toggle {
	display:block;
	position:relative;
	cursor: pointer;
	text-transform: uppercase;
	padding-left: 3em;
	margin: 0.2em;
}

.toggle:before {
	content: '';
	display: block;
	width: 2.2em;
	height: 1.2em;
	margin: 0 1em 0 0;
	background-color: rgba(127,127,127,0.1);
	border: solid 1px currentcolor;
	transition: all 0.25s ease;
	border-radius: calc(0.6em + 2px);
	position:absolute;
	top:50%;
	left:0;
	transform: translateY(-50%);
}

.toggle:after {
	content: '';
	display: block;
	width: 1em;
	height: 1em;
	background-color: currentcolor;
	opacity: 0.8;
	transition: all 0.25s ease;
	border-radius: 0.5em;
	position:absolute;
	top:50%;
	left: 0.2em;
	transform: translateY(-50%);
}

.toggle:hover:before {
	background-color: solid 1px rgba(127,127,127,0.25);
}

.toggle:hover:after {
	opacity: 1;
}

.toggle.active:before {
	background-color: rgba(127,127,127,0.5);
}
.toggle.active:after {
	left:calc( 2.2em - 1em );
	opacity: 1;
}

.closex, .closen {
	top:0;
	right:10px;
	position:absolute;
	font-size:20px;
	line-height: 30px;
	width:30px;
	height:30px;
	text-align: center;
	vertical-align: middle;
	cursor: pointer;
	transition: all 0.25s ease;
}

.closex:hover, .closen:hover {
	background-color: rgba(127,127,127,0.1);
}

.fas, .far, .fal, .fad, .fab {
	margin: 0 0.5em 0 0;
}

small {
	font-size: 0.66em;
}

/******************************* OVERLAY INFO */

#logo_brand {
	position:absolute;
	top:2vh;
	left:2vh;
	z-index:10;
}

#logo_brand img {
	max-width:80px;
	max-height:80px;
}

#comandi {
	position:absolute;
	top:calc(2vh + 80px);
	left:2vh;
	width:220px;
	z-index: 10;
	text-align: left;
	background-color: rgba(255,255,255,0.5);
	padding:1em 1em 0.5em;
	border-radius: 3px;
	color:black;
	font-size: 12px;
}

@media (max-width: 768px) {

	#comandi {
		display:none;
	}

	#legenda {
		top:calc(2vh + 80px) !important;
		left:2vh !important;
	}

}

#legenda {
	position:absolute;
	top: 2vh;
	right:2vh;
	width:220px;
	z-index: 10;
	text-align: left;
	background-color: rgba(255,255,255,0.5);
	padding:1em 1em 0.5em;
	border-radius: 3px;
	color:black;
	font-size: 12px;
}

#areaName {
	position:absolute;
	top:2vh;
	right:50%;
	transform: translateX(50%);
	z-index: 10;
	text-align: center;
	color:white;
	text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {

	#areaName {
		right:2vh;
		transform: translateX(0);
	}

}

#credits {
	position:absolute;
	bottom:2vh;
	left:2vh;
	z-index: 2;
	text-align: right;
	font-size: 12px;
	opacity:0.5;
	transition: all 0.25s ease;
	max-width:25vw;
}

#credits:hover {
	opacity:1;
}

@media (max-width: 768px) {

	#credits {
		display:none;
	}
	
}

#config_buttons {
	position:absolute;
	bottom:2vh;
	left:50%;
	transform: translateX(-50%);
	z-index: 2;
	text-align: center;
	max-width: 80%;
}

.configuring #panel_open {
	display:none;
}

#hover {
	font-size: 12px;
	position:fixed;
	color:white;
	text-shadow: 0 0 5px rgba(0,0,0,0.5);
	transform: translate( 20px, -50% );
}

@media (max-width: 768px) {

	#hover {
		display:none;
	}
	
}

/******************************* WINDOWS */

.window {
	display:block;
	position:absolute;
	top:200%;
	left:50%;
	padding:20px;
	transform: translate(-50%,0);
	z-index: 25;
	text-align: center;
	background-color: white;
	color: #333;
	box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
	width: 50%;
	border-radius: var(--borderradius);
	transition: all ease 1s;
}

@media (max-width: 768px) {

	.window {
		width: 80%;
	}

}

.window.open {
	display:block;
	top:50%;
	left:50%;
	transform: translate(-50%,-50%);
}

#place_detail{
	width:400px;
	max-width: 90vw;
	max-height: 90vh;
	overflow-y: auto;
	/* padding:165px 0 0; */
	background: rgba(255,255,255,0.95);
	border: solid 2px white;
}

@media (max-width: 768px) {

	#place_detail{
		width: 90vw;
		/* padding:115px 0 0; */
	}

}

#place_color {
	position: absolute;
	display: block;
	left:0;
	top:0;
	right:0;
	height: 40px;
	z-index: -1;
}

#place_image {
	/* position: absolute; */
	display: block;
	/* left:50%; */
	/* top:-105px; */
	width:250px;
	height:250px;
	max-height: 250px;
	border: solid 1px white;
	/* transform: translateX(-50%); */
	border-radius: 50%;
	background-image: url(images/null.jpg);
	background-size: cover;
	margin: 25px auto;
}

@media (max-width: 768px) {

	#place_image {
		/* position: absolute; */
		display: block;
		/* left:50%; */
		/* top:-55px; */
		width:150px;
		height:150px;
		max-height: 150px;
		border: solid 1px white;
		/* transform: translateX(-50%); */
		border-radius: 50%;
		background-image: url(images/null.jpg);
		background-size: cover;
		margin: 25px auto;
	}

}

#place_name {
	font-size: 1.5em;
	font-weight: bold;
	margin-bottom:15px;
	padding:0 20px;
}

#place_build {
	background-color: rgba(127,127,127,0.2);
	padding:15px 60px;
	margin:0;
	line-height: 40px;
	background-position: 20px center;
	background-repeat: no-repeat;
	background-size: auto 30px;
	background-image: url(images/icons/hard-hat-solid.svg);
}

#place_size {
	background-color: rgba(127,127,127,0.1);
	padding:15px 60px;
	margin:0;
	line-height: 40px;
	background-position: 20px center;
	background-repeat: no-repeat;
	background-size: auto 30px;
	background-image: url(images/icons/layer-group-solid.svg);
}

#place_usp {
	background-color: rgba(127,127,127,0.2);
	padding:15px 60px;
	margin:0;
	line-height: 40px;
	background-position: 20px center;
	background-repeat: no-repeat;
	background-size: auto 30px;
	background-image: url(images/icons/map-marker-alt-solid.svg);
}

#place_description {
	padding:15px 20px 0;
	font-style: italic;
}

#place_buttons {
	padding:15px 20px;
	margin:0;
}

/******************************* LOADER */

#loader {
	display:none;
	position: fixed;
	top:0;
	left:0;
	right:0;
	bottom:0;
	background-color: rgba(0,0,0,0.1);
	color:white;
	z-index: 999;
	text-align: center;
	cursor: wait;
}

#loader:before {
	content: '';
	position:absolute;
	top:50%;
	left:50%;
	width:10vh;
	height:10vh;
	transform: translate(-50%,-50%);
	background-image: url(images/sprite_loading.png);
	background-position: center center;
	background-repeat: no-repeat;
	background-size: contain;
	animation-name: rotate;
	animation-duration: 2s;
	animation-iteration-count: infinite;
	animation-timing-function: linear;
}

#loader #bytes {
	position:absolute;
	top:calc( 50% + 10vh );
	left:50%;
	width:50vw;
	transform: translate(-50%,-50%);
}

.loading #loader {
	display:block;
}

@-webkit-keyframes rotate {
    from {
        -webkit-transform: translate(-50%,-50%) rotate(0deg);
    }
    to { 
        -webkit-transform: translate(-50%,-50%) rotate(360deg);
    }
}

/******************************* CORNER INFO */

#corner_info {
	position: absolute;
	bottom: 10px;
	right: 10px;
	width: 250px;
	background-color: var(--backcolor);
	color: white;
	text-align: left;
	padding:20px;
	z-index: 5;
	overflow: hidden;
	box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
	display:none;
	line-height: 1.5em;
}

/******************************* SIDEBAR */

#config_sidebar {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 100%;
	/*background-color: white;*/
	color: white;
	text-align: left;
	transition: all 1s ease;
	z-index: 5;
	overflow: hidden;
	opacity: 0;
	/*box-shadow: 0px 0px 10px rgba(0,0,0,0.1);	*/
	display: flex;
	flex-direction: column;
}

.configuring #config_sidebar {
	transform: none;
	opacity: 1;
}

@media (max-width: 1024px) {

	#config_sidebar {
		transform: translateY(100%);
		height: 50%;
	}

}
@media (min-width: 1025px) {

	#config_sidebar {
		transform: translateX(-100%);
		width: 33%;
	}
	
}
@media (min-width: 1920px) {

	#config_sidebar {
		transform: translateX(-100%);
		width: 25%;
	}
	
}

.scroll {
	overflow-y: auto;
	height:100%;
	margin-right:-17px;
	/*padding-right:17px;*/
}

#config_sidebar .panel, #config_sidebar .fixed_panel {
	padding:2vh;
	border-bottom: solid 1px rgba(127,127,127,0.25);
}

#config_sidebar .items {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	align-content: flex-start;
}

.subtitle {
	position: relative;
	cursor: pointer;
	display:block;
	flex-basis: 100%;
	margin-bottom:1em;
	padding-left:20px;
}

.subtitle:before {
	position: absolute;
	left:0;
	top:50%;
	display:block;
	content: '‣';
	transition: all 0.5s ease;
	opacity: 0.8;
	transform: translateY(-50%);
}

.subtitle:hover:before {
	opacity: 1;
}

.subtitle.selected:before {
	transform: translateY(-50%) rotate(90deg);
}

.subtitle + .subpanel {
	display:none;
	background-color: rgba(127,127,127,0.1);
}

.subtitle.selected + .subpanel {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	align-content: flex-start;
	width: calc(100% + 4vh);
	margin: 0 -2vh 1em;
	padding: 2vh 2vh calc(2vh - 0.5em);
}

.subtitle.selected + .subpanel:last-child {
	margin-bottom:-2vh;
}

.item {
	display: block;
	cursor: pointer;
	text-align: center;
	flex-basis: 50%;
	padding:0.5em;
	transition: all 0.25s ease;
	opacity: 0.8;
}

.item:hover {
	opacity: 1;
}

.item.selected {
	opacity: 1;
	font-weight: bold;
}

/* .item span {
	display: block;
	width:100%;
	padding-bottom:100%;
	transition: all 0.25s ease;
	border:solid 1px black;
	border-radius: 50%;
	border: solid 1px rgba(127,127,127,0.2);
	background-color: white;
	background-position: center center;
	background-size: contain;
	background-repeat: no-repeat;
	margin: 0 auto 5px;
} */

.item span {
	display: block;
	transition: all 0.25s ease;
	border:solid 1px black;
	background-color: white;
	margin: 0 auto 5px;
}

/* item list */

.items_list .item {
	flex-basis: 100%;
	width:100%;
	text-align: left;
}

.items_list .item span {
	display: inline-block;
	width:75px;
	height:75px;
	padding:0;
	margin: 0 10px 0 0;
	vertical-align: middle;
}

	/* in tablet tutti i toggle hanno span più piccolino */
	 
	@media (max-width: 1080px) {

		.items_list .item span {
			width:50px;
			height:50px;
		}
	
	}

	@media (max-width: 768px) {
	
		.items_list .item {
			flex-basis: 50%;
			width: 50%;
			text-align: left;
		}
	
	}

/* item thumbs */

.items_thumb .item {
	flex-basis: 75px;
	width: 75px;
}

	/* in tablet tutti i toggle hanno span più piccolino */

	@media (max-width: 768px) {
	
		.items_thumb .item {
			flex-basis: 50px;
			width: 50px;
		}
	
	}

/******************************* GOOGLE MODEL VIEWER */

#ar_model_viewer_container {
	position:fixed;
	top:0;
	left:0;
	right:0;
	bottom:0;
	background-color: #dddddd;
	z-index: 10;
}

model-viewer {
	width:100%;
	height:100%;
}

/******************************* NOTIFICATIONS & ALTERTIFICATIONS */

#notifications {
	position:absolute;
	bottom: 1vh;
	right: 1vh;
	z-index: 997;
	max-width: 33vw;
	max-height: 33vh;
	overflow: auto;
}

@media (max-width: 767px) {

	#notifications {
		max-width:66vw;
	}

}

.notification {
	position:relative;
	background-color: white;
	color: #333;
	padding:1em 2em;
	margin:0.5em 0 0;
	box-shadow: 0px 0px 5px rgba(0,0,0,0.2);
	border-radius: var(--borderradius);
}

/* CUSTOMS */
