* {
	box-sizing: border-box;
	margin: 0;
	font-synthesis: none !important;
}

html,
body {
	font-family: sans-serif;
	font-size: 20px;
	min-height: 100vh;
	background-color: gainsboro;
	overflow: hidden;
	font-family: 'Barlow', sans-serif;
	font-weight: 500;
	font-style: normal;
}

main {
	display: grid;
	grid-template-rows: 1fr 0fr;
	align-content: center;
	justify-items: center;
	gap: 2em;
	height: 100vh;
	transition: 0.5s grid-template-rows ease;
}

main.split {
	grid-template-rows: 1fr 1fr;
}

section {
	display: grid;
	align-content: center;
	justify-items: center;
	gap: 2em;
	height: 100%;
}

menu {
	all: unset;
	display: grid;
	grid-template-columns: repeat(3, min-content);
	grid-auto-flow: column;
	align-content: center;
	justify-content: space-between;
	width: 100%;
	height: 100%;
}

menu menu {
	display: grid;
	grid-template-columns: auto;
	align-content: stretch;
	gap: 1em;
}

menu button {
	all: unset;
	text-align: center;
	vertical-align: middle;
	margin: 0;
	padding: 0.5em 1.25em;
	background-color: gray;
	border-radius: 2em;
	cursor: pointer;
	color: white;
	text-transform: uppercase;
	font-size: 0.8em;
	white-space: nowrap;
}

menu button:hover {
	background-color: black;
}

menu button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background-color: darkgray;
}

menu a {
	all: unset;
	text-align: center;
	vertical-align: middle;
	margin: 0;
	padding: 0.5em 1.25em;
	background-color: gray;
	border-radius: 2em;
	cursor: pointer;
	color: white;
	text-transform: uppercase;
	font-size: 0.8em;
	white-space: nowrap;
	text-decoration: none;
}

menu a:hover {
	background-color: black;
}

/* Layer Selector Styles */
.layer-selector {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.layer-selector label {
    color: gray;
    font-size: 0.8em;
    text-transform: uppercase;
}

.layer-selector select {
    padding: 0.5em 1.25em;
    background-color: gray;
    border: none;
    border-radius: 2em;
    color: white;
    cursor: pointer;
    font-size: 0.8em;
    text-transform: uppercase;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7em center;
    background-size: 1em;
    padding-right: 2.5em;
    outline: none;
}

.layer-selector select:focus {
    background-color: black;
    box-shadow: 0 0 0 0px white;
}

.layer-selector select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mute Button Styles */
button.mute {
    background-color: #ff4444;
    transition: background-color 0.3s ease;
}

button.mute:hover {
    background-color: #cc0000;
}

button.mute.active {
    background-color: #cc0000;
}

button.mute.active:hover {
    background-color: #990000;
}

#binding-browser {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(10em, 1fr));
	grid-auto-rows: minmax(5em, auto);
	grid-auto-flow: row;
	align-content: start;
	justify-items: stretch;
	gap: 2px;
	padding: 2px;
	width: 100%;
	min-height: 100%;
	background-color: gray;
	overflow-y: auto;
	opacity: 0;
	transition: 0.5s 0.25s opacity ease;
}

main.split #binding-browser {
	opacity: 1;
	transition: 0.25s 0s opacity ease;
}

#binding-browser button {
	all: unset;
	text-align: center;
	vertical-align: middle;
	margin: 0;
	padding: 1em;
	background-color: gainsboro;
	border-radius: 4px;
	cursor: pointer;
	color: gray;
}

#binding-browser button:hover {
	background-color: lightgray;
}

input, select, button {
    font-family: inherit;
    font-size: inherit;
}

virtual-keyboard {
	--key-bg: gainsboro;
	--key-border-color: gray;
	--key-border-width: 6px;
	--key-border-radius: 7px;
	--key-glyph-color: gray;
	--key-bg-hover: lightgray;
	--key-bg-active: white;
	--key-glyph-color-active: gray;
	width: 68vw;
	height: auto;
}

.switch {
	display: grid;
	grid-template-columns: repeat(3, min-content);
	grid-auto-flow: column;
	align-items: center;
	gap: 0.5em;
	position: relative;
	color: white;
	margin: auto;
}

.switch label {
	width: 6em;
	white-space: nowrap;
	color: gray;
}

.switch label:first-child {
	text-align: right;
}

input:where([type="checkbox"][role="switch"]) {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	position: relative;
	font-size: 2rem;
	width: 2em;
	height: 1em;
	box-sizing: content-box;
	border: 1px solid;
	border-radius: 1em;
	vertical-align: text-bottom;
	margin: auto;
	color: inherit;
	cursor: pointer;
}

input:where([type="checkbox"][role="switch"])::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	transform: translate(0, -50%);
	box-sizing: border-box;
	width: 0.7em;
	height: 0.7em;
	margin: 0 0.15em;
	border: 1px solid;
	border-radius: 50%;
	background: currentcolor;
}

input:where([type="checkbox"][role="switch"]):checked::before {
	left: 1em;
}

[data-tooltip] {
	position: relative;
}

[data-tooltip]::after {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	content: attr(data-tooltip);
	left: 0;
	top: calc(100% + 10px);
	border-radius: 3px;
	background-color: white;
	z-index: 10;
	padding: 8px;
	width: auto;
	transform: translateY(-20px);
	transition: all 150ms cubic-bezier(.25, .8, .25, 1);
	color: black;
	text-transform: none;
}

[data-tooltip]:hover::after {
	opacity: 1;
	transform: translateY(0);
	transition-duration: 300ms;
}
