/*
 * Terpstra Keyboard WebApp
 * http://terpstrakeyboard.com/play-it-now/keys.htm
 */

* {
	margin: 0;
	padding: 0;
}

html {
	height: 100%;
	background-color: #000000;
	font-family: "Raleway", "HelveticaNeue", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
	font-weight: 400;
	line-height: 1.6;
	color: #222222;
}

body {
	height: 100%;
	display: flex;
	flex-direction: row;
}

#configuration {
	max-width: 64em;
	margin: auto;
	padding: 1.0em 1.0em;
	background-color: #FFFFFF;
	background-image: url("Pattern3D_06.png");
	background-repeat: repeat;
	z-index: 1;
}

h1 {
	text-align: center;
	font-size: 200%;
	font-weight: 300;
	line-height: 1.25;
	letter-spacing: -0.028em;
}

@media (min-width: 40em) {
	h1 {
		font-size: 237.8%;
		letter-spacing: -0.024em;
	}
}

a {
	color: #1EAEDB;
}

a:hover {
	color: #0FA0CE;
}

h1 a, label a {
	color: inherit;
	text-decoration: none;
}

form {
	margin-top: 3.0em;
	margin-bottom: 3.0em;
}

#configuration .grid {
	margin-bottom: 1.5em;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	column-gap: 4%;
}

#configuration .grid > *:nth-child(3), #configuration .grid > *:nth-child(4) {
	margin-bottom: 2.5em;
}

@media (min-width: 40em) {
	#configuration {
		padding: 2em clamp(1em, calc(1em + (100vw - 40em) * 0.1), 4em);
		border: 0.1em solid #D1D1D1;
		border-radius: 3em;
	}
	
	#configuration .grid {
		grid-template-columns: repeat(4, 1fr);
		column-gap: 2.5%;
		row-gap: 1.5em;
	}
	
	#configuration .grid > *:nth-child(3), #configuration .grid > *:nth-child(4) {
		margin-bottom: 0em;
	}
}

label {
	display: block;
}

label:not(:has(> div)), label > div {
	font-size: 84.1%;
	font-weight: 600;
	margin-bottom: 0.333em;
}

/**
 * Known limitation: by default, Chrome and Safari on OS X allow very limited
 * styling of `select`, unless a `border` property is set.
 * 
 * 1. Correct color not being inherited.
 *    Known issue: affects color of disabled elements.
 * 2. Correct font properties not being inherited.
 */
button,
input,
optgroup,
select,
textarea {
	font: inherit;  /* 2 */
	color: inherit;  /* 1 */
}

input[type=number],
input[type=text],
textarea,
select {
	box-sizing: border-box;
	width: 100%;
	height: 2.53em;
	margin-bottom: 1em;
	padding: 0.4em 0.67em;
	background-color: #FFFFFF;
	border: 0.067em solid #D1D1D1;
	border-radius: 0.267em;
	box-shadow: none;
}

input[type=number] {
	text-align: right;
}

textarea {
	height: 21.2em;
	padding-top: 0.4em;
	padding-bottom: 0.4em;
}

.iosscrollable {
	-webkit-overflow-scrolling: touch;
}

input[type=number]:focus,
input[type=text]:focus,
textarea:focus,
select:focus {
	border-color: #33C3F0;
	outline: 0;
}

div.radio-group {
	display: table;
}

div.radio-group > label {
	display: table-row;
}

div.radio-group > label > * {
	display: table-cell;
}

div.radio-group > label > span {
	padding-left: 0.6em;
	padding-bottom: 0.3em;
	font-weight: normal;
}

button {
	display: block;
	max-width: 100%;
	margin-right: auto;
	margin-left: auto;
	padding: 0 2.74em;
	background-color: #FFFFFF;
	border: 0.09em solid #BBBBBB;
	border-radius: 0.37em;
	font-size: 84.1%;
	font-weight: 600;
	line-height: 3.47em;
	color: #555555;
	letter-spacing: 0.091em;
	text-transform: uppercase;
	cursor: pointer;
}

button:hover,
button:focus {
	border-color: #888888;
	color: #333333;
}

footer {
	font-size: 84.1%;
}

#keyboard {
	position: fixed;
	left: 0;
	top: 0;
}

#piano.inactive #keyboard {
	opacity: 0.3;
}

#backButton {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	margin-top: auto;
	margin-bottom: auto;
	padding: 0.53em;
	background-color: #FFFFFF;
	border: 0.13em solid #A0A0A0;
	border-radius: 50%;
}

#piano.inactive #backButton {
	display: none;
}
