body:not(.started) .on-screen-input-device
{
	display:none !important;
}


.on-screen-input-device
{
	font-size: var(--unit);
	display: none;
	position: absolute;
	z-index: 10;
	pointer-events: none;
	overflow: visible;
	user-select: none;
}
.on-screen-input-device *
{
	font-size: inherit;
}

.on-screen-input-device.enabled
{
	display: block;
	pointer-events: all;
}

.on-screen-input-device label
{
	pointer-events: none;
	z-index: 1;
	position: relative;
	white-space: pre;
}

.on-screen-input-device > .button.active
{
	cursor: pointer;
}


.on-screen-input-device .input-key
{
	text-transform: capitalize;
	border: 0.1em solid black;
	border-radius: 0.4em;
	min-width: 1em;
	display: inline-block;
	margin-left: 0.2em;
	padding: 0.1em 0.2em;
	background-color: #CCC;
	cursor: inherit;
}


.on-screen-input-device .input[data-input="gamepad"] .input-key
{
	width: 1.5em;
	border-radius: 0.75em;
	background-color: #DDF;
}


.on-screen-input-device .input-key.uncertain
{
	font-style: italic;
	background-color: rgba(204,204,204,0.7);
}

.mobile .on-screen-input-device .input-key
{
	display: none !important;
}


.on-screen-input-device .input
{
	position: relative;
}

.on-screen-input-device .input.with-icon::before
{
	cursor: inherit;
	content:"";
	display: block;
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	right: 0;
	background-image: var(--icon);
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
}


.on-screen-input-device .input.stick
{
	position: relative;
	font-size: inherit;
	width: 1em;
	height: 1em;
	overflow: visible;
	background-image: radial-gradient(lightgray, transparent 70%);
}

.on-screen-input-device .input.stick::before,
.on-screen-input-device .input.stick::after
{
	content: "";
	position: absolute;
	left:0; right:0; top:0; bottom:0;
	border: 0.1em solid black;
	box-sizing: border-box;
	z-index: -1;
	pointer-events: none;
}
.on-screen-input-device .input.stick::before
{
	border-radius: 25%/50%;
	border-top-color: transparent;
	border-bottom-color: transparent;
}
.on-screen-input-device .input.stick::after
{
	border-radius: 50%/25%;
	border-left-color: transparent;
	border-right-color: transparent;
}
.on-screen-input-device .input.stick[data-action-left][data-action-right]
{
	width: 10em;
}
.on-screen-input-device .input.stick[data-action-up][data-action-down]
{
	height: 10em;
}
.on-screen-input-device .input.stick > button.stick-button
{
	font-size: inherit;
	box-sizing: border-box;
	position: absolute;
	width: 4em;
	height: 4em;
	margin-left: -2em;
	margin-bottom: -2em;
	border-radius: 2em;
	left: calc( 50% + var(--x) * 50% );
	bottom: calc( 50% + var(--y) * 50% );
	border: 0.1em solid black;
}






.on-screen-input-device.mobile-control
{
	left: 1em;
	bottom: 1em;
	right: 1em;
}

.on-screen-input-device.mobile-control > .input
{
	position: absolute;
}

.on-screen-input-device.mobile-control span.input-key
{
	display: none !important;
}

.on-screen-input-device.mobile-control > .input.movement-stick
{
	left: 0;
	bottom: 0;
}
.on-screen-input-device.mobile-control > .input.movement-stick button.stick-button
{
	background-image: url('/Assets/Emojis/people/foot.png');
}

.on-screen-input-device.mobile-control > .input.camera-stick
{
	right: 0;
	bottom: 0;
}
.on-screen-input-device.mobile-control > .input.camera-stick button.stick-button
{
	background-image: url('/Assets/Emojis/people/eye.png');
}

.on-screen-input-device.mobile-control > .input.button
{
	width: 5em;
	height: 5em;
	border-radius: 2.5em;
	border: 0.1em solid black;
	box-sizing: border-box;
}

.on-screen-input-device.mobile-control > .input.button,
.on-screen-input-device.mobile-control > .input.stick button.stick-button
{
	background-position: center;
	background-repeat: no-repeat;
	background-size: 75%;
}


.on-screen-input-device.mobile-control > .input.teleport-button
{
	left: 0;
	bottom: 15em;
	background-image: url('/Assets/Emojis/symbols/shuffle-tracks-button.png');
}
.on-screen-input-device.mobile-control > .input.run-button
{
	right: 0;
	bottom: 15em;
	background-image: url('/Assets/Emojis/symbols/fast-forward-button.png');
}
.on-screen-input-device.mobile-control > .input.jump-button
{
	right: 6em;
	bottom: 15em;
	background-image: url('/Assets/Emojis/symbols/right-arrow-curving-up.png');
}

/*
Belt
*/

.on-screen-input-device.belt
{
	box-sizing: border-box;
	font-size: var(--unit);
	
	width: 40em;
	max-width: 60vw;
	left: 0;
	margin-left: auto;
	right: 0;
	margin-right: auto;

	bottom: 0px;
	height: 4em;
	margin-bottom: -4.5em;
	
	overflow: hidden;
	display: flex;
	flex-flow: row nowrap;
	align-items: stretch;
	justify-content: space-between;
	border: 0.2em solid steelblue;
	padding: 0.1em;
  background-image: linear-gradient(0deg, lightblue, transparent, lightblue);
	border-bottom-width: 0px;
	border-top-left-radius: 0.5em;
	border-top-right-radius: 0.5em;
	transition-property: margin-bottom;
	transition-duration: 100ms;
}

.on-screen-input-device.belt.enabled
{
	margin-bottom: 0px;
}



.on-screen-input-device.belt > .button
{
	min-width: 4em;
	flex: 1 1 20%;
	overflow: hidden;
	position: relative;
	display: flex;
	flex-flow: column nowrap;
	align-items: center;
	border-radius: 0.4em;
	background-color: transparent;
	background-image: linear-gradient(0deg, #DDD, transparent, #DDD);
}

.on-screen-input-device.belt > .button.active:hover
{
	background-image: linear-gradient(0deg, #DDF, #FFF, #DDF);
	border-color: darkblue;
}

.on-screen-input-device.belt > .button.menu
{
	background-color: rgba(221,255,255,0.7);
}

/* no label <=> no item in slot */
.on-screen-input-device.belt > .button.quick-slot:not(.with-label) .input-key
{
	display: none !important;
}

.on-screen-input-device.belt > .button .input-key
{
	order: -1;
	align-self: flex-end;
	margin: 0;
	padding-top: 0;
	padding-bottom: 0;
}

.on-screen-input-device.belt > .button.with-icon::before
{
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-image: var(--icon);
	background-repeat: no-repeat;
	background-position: left center;
	background-size: contain;
}




/*
Hands
*/

.on-screen-input-device.hand
{
	top:0px;
	width:1em;
	height:1em;
	overflow: visible;
	border: 1em solid #AAA;
	transition-property: width, height, border-color;
	background-image: radial-gradient(#CCC, transparent);
}
.on-screen-input-device.hand.enabled.active
{
	width: 8em;
	height: 8em;
}


.on-screen-input-device.hand.with-icon::before
{
	content: "";
	position: absolute;
	top: 25%;
	width: 50%;
	height: 50%;
	background-image: var(--icon);
	background-repeat: no-repeat;
	background-size: contain;
	background-position: center;
}

.on-screen-input-device.hand.with-icon.with-label::before
{
	content: attr(data-label);
	display: flex;
	flex-flow: column nowrap;
	align-items: center;
	justify-content: center;
}

.on-screen-input-device.left-hand.with-icon::before
{
	left: 25%;
}
.on-screen-input-device.right-hand.with-icon::before
{
	right: 25%;
}

.on-screen-input-device.left-hand
{
	border-top-width: 0px;
	border-left-width: 0px;
	border-bottom-right-radius: 8em;
}

.on-screen-input-device.right-hand
{
	border-top-width: 0px;
	border-right-width: 0px;
	border-bottom-left-radius: 8em;
}


.on-screen-input-device.hand > .button
{
	width: 0.75em;
	height: 0.75em;
	border-radius: 100%;
	position: absolute;
	border: 0em solid black;
	transition-property: width, height, border-width, border-color;
	transition-duration: 100ms;
	white-space: nowrap;
	overflow: visible;
	background-image: radial-gradient(transparent, #DDD);
}
.on-screen-input-device.hand > .button.active:hover
{
	background-image: radial-gradient(#FFF, #DDF);
	border-color: darkblue;
}


.on-screen-input-device.hand > .button.with-icon::before,
.on-screen-input-device.hand > .button.inspect::before
{
	cursor: inherit;
	content:"";
	display: block;
	position: absolute;
	left: 10%;
	top: 10%;
	bottom: 10%;
	right: 10%;
	background-image: var(--icon);
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
	opacity: 0.5;
}

.on-screen-input-device.hand.enabled.active > .button
{
	border-width : 0.5em;
	height: 6em;
	width: 6em;
}


.on-screen-input-device.hand > .button > span.input-key
{
	font-size: 1.5em;
	position: absolute;
	z-index: 1;
}

.on-screen-input-device.left-hand > .button.first
{
	left : 100%;
	top: 0em;
}
.on-screen-input-device.left-hand > .button.first > span.input-key
{
	left: 0%;
	margin-left: -0.8em;
	top: 0%;
	margin-top: -0.3em;
}
.on-screen-input-device.left-hand > .button.second
{
	left : 62%;
	top: 62%;
}
.on-screen-input-device.left-hand > .button.second > span.input-key
{
	left: 20%;
	margin-left: -1em;
	top: 20%;
	margin-top: -1em;
}
.on-screen-input-device.left-hand > .button.third
{
	left : 0em;
	top: 100%;
}
.on-screen-input-device.left-hand > .button.third > span.input-key
{
	left: 0%;
	margin-left: -0.3em;
	top: 0%;
	margin-top: -0.8em;
}




.on-screen-input-device.right-hand > .button.first
{
	right : 100%;
	top: 0em;
}
.on-screen-input-device.right-hand > .button.first > span.input-key
{
	right: 0%;
	margin-right: -0.8em;
	top: 0%;
	margin-top: -0.3em;
}
.on-screen-input-device.right-hand > .button.second
{
	right : 62%;
	top: 62%;
}
.on-screen-input-device.right-hand > .button.second > span.input-key
{
	right: 20%;
	margin-right: -1em;
	top: 20%;
	margin-top: -1em;
}
.on-screen-input-device.right-hand > .button.third
{
	right : 0em;
	top: 100%;
}
.on-screen-input-device.right-hand > .button.third > span.input-key
{
	right: 0%;
	margin-right: -0.3em;
	top: 0%;
	margin-top: -0.8em;
}



.on-screen-input-device.hand.enabled.active > .button.inspect
{
	--icon : url("/Assets/Emojis/objects/magnifying-glass-tilted-left.png");
	width: 4em;
	height: 4em;
	opacity: 0.8;
	border-color: gray;
}

.on-screen-input-device.hand > .button.inspect::before
{
	opacity: 1;
}

.on-screen-input-device.hand > .button.inspect:disabled,
.on-screen-input-device.hand > .button.inspect > label
{
	display: none;
}

.on-screen-input-device.left-hand > .button.inspect
{
	left: 0;
	top: 0;
	margin-left:-1em;
	margin-top:-1em;
}

.on-screen-input-device.right-hand > .button.inspect
{
	right: 0;
	top: 0;
	margin-right:-1em;
	margin-top:-1em;
}


@keyframes feedbackKeyframes {
  0% { 
		border-color: black;
		background-color: transparent;
	}
  100% { 
		border-color: lightcyan;
		background-color: black;
	}
}


.on-screen-input-device.feedback,
.on-screen-input-device .input.feedback,
.on-screen-input-device .input.feedback .input-key
{
	animation-name: feedbackKeyframes;
  animation-duration: 200ms;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}


.on-screen-input-device.left-hand
{
	left:0px;
}


.on-screen-input-device.right-hand
{
	right:0px;
}





.on-screen-input-device .button.ui.emotes
{
	--icon: url('/Assets/Emojis/people/person-raising-hand.png')
}










.on-screen-input-device.menu
{
	flex-flow: row wrap;
	position: relative; /* in top-toolbar */
	flex: 1 1 auto;
}

.on-screen-input-device.menu.enabled
{
	display: flex;
}

.on-screen-input-device.menu > button
{
	width: 3em;
	height: 3em;
	overflow: visible;
}
.on-screen-input-device.menu > button > label
{
	display: none;
}
.on-screen-input-device.menu > button:hover > label
{
	overflow: visible;
	display: block;
	position: absolute;
	left: 0; top: 0;
	white-space: nowrap;
	text-shadow: 0px 0px 0.2em white;
}