* {
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

html,
body {
	overflow: hidden;
}

#canvas,
#overlay,
.controls {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
}

#overlay {
	pointer-events: none;
}

.badge {
	display: inline-block;
	margin-top: -1px;
	margin-left: 5px;
	padding: 2px 4px;
	border-radius: 2px;
	font-weight: 500;
	font-size: 12px;
	color: white !important;

	&.prime {
		background: #0372EF;
	}

	&.beta {
		background: #388E3C;
	}
}

.controls {
	pointer-events: none;

	.notification {
		top: 30px;
		position: fixed;
		display: flex;
		justify-content: center;
		width: 100%;
		opacity: 0;

		p {
			display: inline-block;
			padding: 10px 24px;
			border-radius: 999px;
			background: #24292E;
			color: white;
			opacity: 0.95;
			user-select: none;
			pointer-events: none;
		}
	}

	.ad {
		position: fixed;
		width: 400px;
		height: 150px;
		border-radius: 4px;
		background: #EEE;
		bottom: 40px;
		right: 40px;
		pointer-events: all;
	}

	.hotbar {
		display: flex;
		position: fixed;
		left: calc(50% - 216px);
		bottom: 30px;
		pointer-events: all;
		z-index: -1;

		.color {
			margin: 6px;
			width: 60px;
			height: 60px;
			border-radius: 30px;
			background: #EEE;
			cursor: pointer;
			transition: transform 0.2s;
			transform: scale(0.9);

			&:not(.active):hover {
				transform: scale(1);
			}

			&.focus {
				transform: scale(1);
			}

			&.active {
				transform: scale(1.1);
			}
		}
	}

	.scale-modal {
		top: 40px;
		left: calc(50% - 200px);
		width: 400px;
		height: 60px;

		input[type="range"] {
			-webkit-appearance: none;
			width: calc(400px - 54px);
			margin-top: 21px;
			margin-left: 27px;
			height: 6px;
    		background: #EEEEEE;
    		border: none;
    		border-radius: 4px;

			&::-webkit-slider-runnable-track {
				-webkit-appearance: none;
			}

			&::-webkit-slider-thumb {
				-webkit-appearance: none;
				height: 20px;
				width: 20px;
				margin-top: -0px;
				background: #9E9E9E;
				border-radius: 10px;
				cursor: pointer;

				&:hover {
					background: #757575;
				}
			}
		}
	}

	.clear-modal {
		top: calc(50% - 75px);
		left: calc(50% - 200px);
		width: 400px;
		height: 150px;
		display: grid;
		padding: 30px 10px 10px 10px;

		.text-clear {
			font-size: 20px;
			width: 380px;
			height: px;
			text-align: center;
			align-items: center;
		}

		.align {
			display: flex;
			margin-top: auto;

			.btn-cancel {
				width: 185px;
				height: 50px;
				border: none;
				border-radius: 3px;
				background-color: #F5F5F5;
				font-size: 17px;

				&:hover {
						background-color: #E0E0E0;
				}
			}

			.btn-apply {
				width: 185px;
				height: 50px;
				border: none;
				border-radius: 3px;
				border-color: grey;
				background-color: #F5F5F5;
				margin-left: 10px;
				font-size: 17px;

				&:hover {
						background-color: #E0E0E0;
				}
			}
		}
	}

	.capture-modal {
		top: calc(50% - 250px);
		left: calc(50% - 200px);
		width: 400px;
		height: 500px;
		display: grid;

		.text-save {
			font-size: 20px;
			width: 380px;
			height: px;
			text-align: center;
			align-items: center;
			margin-top: 20px;
		}

		.preview {
			height: 250px;
 		 	background: #F5F5F5;
			border: 1px solid #f1f1f1;
			border-radius: 3px;
			margin-top: 20px;
			margin-left: 20px;
			margin-right: 20px;
		}

		.action-file {
			border-radius: 3px;
			border: 2px solid #f1f1f1;
			height: 50px;
			margin-top: 10px;
			margin-left: 20px;
			margin-right: 20px;
			padding: 0px 0px 0px 10px;
			font-size: 15px;
		}

		.align {
			display: flex;
			margin-top: auto;
			margin-bottom: 20px;

			.btn-cancel {
				width: 170px;
				height: 50px;
				border: none;
				border-radius: 3px;
				background-color: #F5F5F5;
				font-size: 17px;
				margin-left: 20px;

				&:hover {
						background-color: #E0E0E0;
				}
			}

			.btn-apply {
				width: 170px;
				height: 50px;
				border: none;
				border-radius: 3px;
				border-color: grey;
				background-color: #F5F5F5;
				margin-left: 20px;
				font-size: 17px;

				&:hover {
						background-color: #E0E0E0;
				}
			}
		}
	}

	.toolbar {
		top: 20px;
		left: 20px;
	}

	.actionbar {
		top: 20px;
		right: 20px;
	}

	.actionbar,
	.toolbar {
		display: flex;
		position: fixed;
		pointer-events: all;

		.action,
		.tool {
			width: 44px;
			height: 44px;
			padding: 10px;
			margin-left: 8px;
			border-radius: 22px;
			cursor: pointer;

			&:hover {
				background: rgba(#FAFAFA, 0.95);

				&.ripple {

					&:not(.active).ripple-active {
						background: lighten(rgba(#FAFAFA, 0.95), -2%);
					}

					&.active.ripple-active {
						background: lighten(rgba(#EEEEEE, 0.95), -2%);
					}
				}
			}

			&.active {
				background: rgba(#EEEEEE, 0.95);
			}

			i.ico {
				color: #424242;
			}
		}
	}
}

.colors-modal {
	flex-wrap: wrap;
	min-width: 410px;
	width: 410px;
	max-width: 410px;
	padding: 30px !important;
	top: calc(50% - 421px);
	left: calc(50% - 205px);
	display: flex;
	gap: 12px;

	.color {
		width: 60px;
		height: 60px;
		border-radius: 30px;
		background: #EEE;
		cursor: pointer;
		transition: transform 0.2s;
		transform: scale(0.9);

		&:not(.active):hover {
			transform: scale(1);
		}

		&.active {
			transform: scale(1.1);
		}

		&.focus {
			transform: scale(1);
		}
	}
}

.multiplayer-modal {
	top: 75px;
	right: 120px;
}

.account-modal {
	top: 75px;
	right: 70px;
}

.settings-modal {
	top: 75px;
	right: 20px;
}

.device-modal {
	top: 100px;
	right: 320px;
}

.language-modal {
	top: 100px;
	right: 860px;
}

.settings-modal {
	top: 75px;
	right: 20px;
}

.modal {
	width: 250px;
	position: fixed;
	background: white;
	border: 1px solid #F1F1F1;
	border-radius: 4px;
	padding: 6px 0;
	pointer-events: all;
	overflow: hidden;
	z-index: -1;
	display: flex;

	.main {
		width: 248px;
		min-width: 248px;7
		max-width: 248px;
	}

	ul.tab-list {
		width: 248px;
		min-width: 248px;
		max-width: 248px;
	}

	.header {
		display: flex;
		margin-bottom: 3px;

		.back {
			margin: 10px;
			margin-top: 15px;
			margin-right: 3px;
			width: 36px;
			height: 36px;
			border-radius: 18px;
			padding: 6px;
			padding-left: 5px;
			cursor: pointer;

			i.ico {
				color: #424242;
			}

			&:hover {
				background: #FAFAFA;
			}

			&.ripple {

				&.ripple-active {
					background: lighten(#FAFAFA, -2%);
				}
			}
		}

		.info {
			display: flex;
			flex-direction: column;
			margin-top: 15px;

			p {
				display: flex;
				align-items: center;
				font-weight: 500;
				color: #616161;
				user-select: none;
				pointer-events: none;
			}

			span {
				display: block;
				margin-top: 3px;
				font-size: 12px;
				color: #9E9E9E;
				user-select: none;
				pointer-events: none;
			}
		}
	}

	ul.item-list {

		.separator {
			margin: 6px 0;
			width: 100%;
			height: 1px;
			background: #F1F1F1;
		}

		li.caption {
			padding: 2px 15px;
			padding-top: 12px;
			list-style: none;

			p {
				color: #9E9E9E;
				user-select: none;
				pointer-events: none;
			}
		}

		li.item {
			display: flex;
			align-items: center;
			padding: 15px;
			cursor: pointer;

			&.empty {

				p {
					display: block;
					width: 100%;
					color: #9E9E9E;
					text-align: center;
					user-select: none;
					pointer-events: none;
				}
			}

			&:not(.active):not(.inactive) {

				&:hover {
					background: #FAFAFA;
				}

				&.ripple {

					&.ripple-active {
						background: lighten(#FAFAFA, -2%);
					}
				}
			}

			i.ico {
				color: #424242;
				user-select: none;
				pointer-events: none;
			}

			i.lang {
				display: flex;
				justify-content: center;
				align-items: center;
				font-style: normal;
				font-weight: 600;
				width: 24px;
				height: 24px;
				color: #424242;
				user-select: none;
				pointer-events: none;
			}

			.info {
				display: flex;
				flex-direction: column;
				margin-left: 10px;
				max-width: calc(100% - 24px - 10px);

				p {
					display: flex;
					align-items: center;
					font-weight: 500;
					color: #616161;
					user-select: none;
					pointer-events: none;
				}

				span {
					display: block;
					margin-top: 3px;
					font-size: 12px;
					color: #9E9E9E;
					user-select: none;
					pointer-events: none;
					white-space: nowrap;
					overflow: hidden;
					text-overflow: ellipsis;
				}
			}

			&.active {
				background: #EEEEEE;

				&.ripple {

					&.ripple-active {
						background: lighten(#EEEEEE, -2%);
					}
				}
			}

			&.inactive {

				i.ico {
					color: #9E9E9E;
				}

				.info {

					p {
						color: #9E9E9E;
					}
				}
			}
		}
	}
}

.tooltip {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;

	&:hover {

		&::before {
			opacity: 0.95;
			transition-delay: 0.6s;
		}

		&::after {
			opacity: 0.95;
			transition-delay: 0.6s;
		}
	}

	&::after {
		display: flex;
		opacity: 0;
		content: attr(data-title);
		justify-content: center;
		align-items: center;
		position: absolute;
		background: #24292E;
		color: white;
		min-height: 24px;
		padding: 0 12px;
		border-radius: 999px;
		font-size: 12px;
		top: auto;
		bottom: -70%;
		white-space: nowrap;
		z-index: 9999;
		pointer-events: none;
	}

	&.up {

		&::before {
			top: ~'calc(-90% + 26px)';
			bottom: auto;
			border-left: 6px solid transparent;
			border-right: 6px solid transparent;
			border-top: 6px solid #24292E;
			border-bottom: none;
		}

		&::after {
			top: -60%;
			bottom: auto;
		}
	}

	&.down {

		&::before {
			top: auto;
			bottom: ~'calc(-90% + 26px)';
			border-left: 6px solid transparent;
			border-right: 6px solid transparent;
			border-top: none;
			border-bottom: 6px solid #24292E;
		}

		&::after {
			top: auto;
			bottom: -60%;
		}
	}
}
