:root {
	--li-padding: 6px;
	--controls-width: 40ch;
	--controls-padding: 1rem;
}
body {
	margin: 0;
	padding: 0;
	max-height: 100%;
	position: relative;
	display: flex;
	width : 100%;	
	height : 100vh;
	height : 100dvh;
}

/* @media (pointer: coarse) { */
	/* body{ */
		/* font-size: 16px; */
	/* } */
/* } */

#ar_controls {
	position: absolute;
	width: var(--controls-width);
	z-index: 2;
	max-height: 100%;
	margin: 0;
	padding: var(--controls-padding);
	background-color: transparent;
	/* -webkit-backdrop-filter: blur(4px); */
	/* backdrop-filter: blur(4px); */
	left: calc(-1*var(--controls-width) - (2 * var(--controls-padding)));
	transition: left .2s linear;
}
svg, img{
	width: 100%;
	height: 100%;
	object-fit: contain;
}
li.button.exposed {
	width: fit-content;
	left: calc(100% + 2*var(--controls-padding));
	transition: left .2s linear;
}

#menu {
	position: relative;
	width: 3rem;
	height: 3rem;
	padding: 0;
	background: #37373777/*#777b*/;
	border: none;
}
#ar_controls #menu:hover {
	background-color: #444f;
}
#menu > svg {
	transform-origin: center;
	fill: #fff;
}
#menu .line {
	transform-origin: center;
	transition: y .2s .2s, opacity 0s .2s, rotate .2s;
}
#menu[aria-expanded="true"] .line {
	transition: y .2s, opacity 0s .2s, rotate .2s .2s;
}
#menu[aria-expanded="true"] .line {
	y: 45;
}
#menu[aria-expanded="true"] .line.top {
	rotate: .125turn;
}
#menu[aria-expanded="true"] .line.middle {
	opacity: 0;
}
#menu[aria-expanded="true"] .line.bottom {
	rotate: -.125turn;
}
@-moz-document url-prefix() {
	#menu .line {
		transform-origin: center;
		transition: transform .2s .2s, opacity 0s .2s, rotate .2s;
	}
	#menu[aria-expanded="true"] .line {
		transition: transform .2s, opacity 0s .2s, rotate .2s .2s;
	}

	#menu[aria-expanded="true"] .line.top {
		rotate: .125turn;
		transform: translateY(20px);
	}
	#menu[aria-expanded="true"] .line.middle {
		opacity: 0;
	}
	#menu[aria-expanded="true"] .line.bottom {
		rotate: -.125turn;
		transform: translateY(-20px);
	}
}

li {
	position: relative;
	left: 0;	
	list-style: none;
	background-color: #37373777;
	padding: var(--li-padding);
	width: var(--li-width);
	margin-bottom: 0.5rem;
}
#ar_controls.expanded{
	left: 0;
}
menu#ar_controls>li.button {
	background-color: transparent;
	transition: left .2s linear;
	padding: 0;
}

#ar_controls > LI:hover{
	/* background-color: #ccccccff; */
}	

#ar_controls button:hover{
	cursor: pointer;
	background-color: #555f;
}

#selfie:checked{
	
}
#notification-area {
	display: flex;
	position: fixed;
	z-index: 2;
	flex-direction: column;
	right: 0px;
	bottom: 0px;
}
.notification {
	background-color: #37373777;
	border-radius: 0.7rem;
	font-size: 1.2rem;
	padding: 0.5rem;
	/* margin-bottom: 2rem; */
	margin-bottom: 0.2rem;
	text-align: center;
	animation: fade 1s 9s linear 1;
	transition: margin 0.5s ease-out;
	/* transform: translateY(100%); */
}
#notification-area.modal>.notification {
	animation: none;
}
#notification-area.modal {
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
}
.notification.slide{
	margin-bottom: 0.2rem;
}
@keyframes lift {
	/* from { */
		/* transform: translateY(50px); */
	/* } */
	100% {
		transform: translateY(0%);
	}
}
@keyframes fade {
	from {
		opacity: 1;
	}
	to {
		opacity: 0;
	}
}

#loading-screen {
	display: flex;
	flex-direction: column;
	position: absolute;
	background-color: black;
	width: 100%;
	height: 100%;
	z-index: 1;
	justify-content: center;
	align-items: center;
}
#loading-icon {
	appearance: none;
	display: flex;
	overflow: hidden;
	width: 60px;
	height: 60px;
	border: 2px solid gray;
	border-radius: 50%;
	border-bottom-color: transparent;
	transform: rotateZ(0deg);
	animation: spin 0.8s linear infinite;
	justify-content: center;
	align-items: center;
	background: transparent;
}

#reload-button {
	width: 50px;
	height: 50px;
	border: 0px;
	border-radius: 50%;
	background-color: transparent;
	transform: translateY(-150%);
	opacity: 0;
	transition: all 0.5s ease-out;
}
#reload-button:hover {
	background-color: #ffffff44;
}
@keyframes spin {
	0% {
		transform: rotateZ(0deg);
	}
	50% {
		transform: rotateZ(180deg);
	}
	100% {
		transform: rotateZ(360deg);
	}
}

input[type="range"] {
	appearance: none;
	position: relative;
	right: 2px;
	width: 100%;
	height: min-content;
	border: thin solid white;
	border-radius: 1em;
	box-sizing: border-box;
}
li.range::before {
	content: "";
	pointer-events: none;
	display: block;
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	box-sizing: border-box;
	z-index: 1;
	width: calc(100% - 1rem - var(--li-padding)*2);
	height: 10%;
	top: 47%;
	background-repeat: no-repeat;
	background-position: 0% center, 25% center, 50% center, 75% center, 100% center;
	background-size: 2px 100%, 2px 100%, 2px 100%, 2px 100%, 2px 100%;
	background-image: linear-gradient(black, black), linear-gradient(black, black), linear-gradient(black, black), linear-gradient(black, black), linear-gradient(black, black);
}
input[type="range"]::-webkit-slider-thumb {
	appearance: none;
	background-color: white;
	border: thin solid black;
	width: 1rem;
	height: 1rem;
	border-radius: 50%;
}
input[type="range"]::-moz-range-thumb {
	appearance: none;
	background-color: white;
	border: thin solid black;
	width: 1rem;
	height: 1rem;
	border-radius: 50%;
}

li.toggle {
	display: grid;
	grid-template-columns: auto min-content;
}
li.toggle>label {
	border-right: thin solid white;
}
input[type="checkbox"][role="switch"]{
	position: relative;
	appearance: none;
	box-sizing: content-box;
	width: 2rem;
	height: 1rem;
	border: thin solid white;
	border-radius: 1rem;
	background-color: transparent;
	margin-left: var(--li-padding);
}
input[type="checkbox"][role="switch"]::before{
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	transform: translate(0, -50%);
	/* box-sizing: border-box; */
	width: 0.7rem;
	height: 0.7rem;
	margin: 0 0.15rem;
	/* border: thin solid white; */
	border-radius: 50%;
	background-color: white;
	transition: left 0.2s;
}
input[type="checkbox"][role="switch"]:checked::before{
	left: 1rem;
	border: thin solid black;
}
input[type="checkbox"][role="switch"]:checked{
	background-color: white;
}
li.file {
	overflow-x: hidden;
}
li.file.exposed {
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	padding: 0;
	font-size: 24px;
	width: 70%;
	height: 50%;
	border: 0.5rem dashed white;
}
li.file.exposed::before {
	content: "Déposer une image ici";
	position: absolute;
	left: 50%;
	bottom: 20%;
	transform: translate(-50%);
	text-wrap: nowrap;
}
li.file.exposed::after{
	content: "Ou";
	position: absolute;
	left: 50%;
	bottom: 50%;
	transform: translate(-50%);
}
li.file.exposed>label {
	display: none;
}
li.file.exposed>input[type="file"]{
	display: block;
	position: absolute;
	left: 50%;
	transform: translateX(-25%);
}
li.file.exposed>input[type="file"]::file-selector-button{
	display: block;
}
input[type="file"]{
	appearance: none;
	font: inherit;
	margin-top: 0.7em;
}
input[type="file"]::file-selector-button {
	appearance: none;
	color: white;
	background: transparent;
	border: outset;
	border-radius: 7px;
}
input[type="file"]::file-selector-button:hover {
	cursor: pointer;
	background: #444f;
}
li>input[type="file"] + img{
	cursor: pointer;
	margin-top: 0.7em;
}
li>img[src=""] {
	display: none;
}
fieldset{
	border: 0;
	padding: 0;
}
legend {
	padding: 0;
}
input[type="radio"] {
	appearance: none;
	/* box-sizing: border-box; */
	border: medium solid gray;
	border-radius: 50%;
	width: 1.5rem;
	height: 1.5rem;
}
input[type="radio"]:checked {
	border: medium solid white;
}
li.radio input[value="RedFrame"] {
	background: #E8000F;
}
li.radio input[value="BlueFrame"] {
	background: #0018E7;
}
li.radio input[value="GreenFrame"] {
	background: #1FBC12;
}
li.radio input[value="YellowFrame"] {
	background: #F2C700;
}
#cam {
	appearance: none;
	position: absolute;
	width: 3rem;
	height: 3rem;
	top: 1em;
	right: 1em;
	margin: 0;
	background: transparent;
	border: thick solid white;
	border-radius: 50%;
}
#cam:checked {
	background: red;
}

canvas {
	background-color: black;
	padding : 0;
	margin: 0 auto;
	max-width: 100%;
	object-fit: contain;
}

canvas#tryon{
	transform : scaleX(-1);
}

@media screen and (width <= 800px) {
	#notification-area {
		left: 50%;
		transform: translateX(-50%);
	}
}
