.match {
	display: grid;
	gap: 4px;
	grid-template-columns: 1fr 1fr;
	height: calc(100vh - 2 * 10px);
	user-select: none;

	.side {
		position: relative;
		padding: 30px 50px 0;
		background-color: var(--ttgreen);

		.player {
			font-size: 40px;
			text-align: right;
			position: relative;

			&:after {
				content: '';
				position: absolute;
				left: -25px;
				top: 3px;
				display: none;
				width: 35px;
				height: 35px;
				background: radial-gradient(circle at 10px 10px, var(--ttorange), var(--ttorange), #000);
				border-radius: 50%;
				box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
			}
		}

		.points, .games {
			font-family: 'Ubuntu Mono';
		}

		.points {
			font-size: 200px;
			line-height: 150px;
			padding-left: 50px;
		}

		.games {
			font-size: 80px;
			margin-top: -30px;
			width: 50%;
		}

		.score-plus {
			position: absolute;
			right: 50px;
			margin-top: 15px;
		}

		&.side1:not(.switched), &.switched + .side {
			text-align: right;

			.points {
				padding-left: 0px;
				padding-right: 50px;
			}

			.games {
				width: 50%;
				margin-left: 50%;
			}

			.player {
				text-align: left;

				&:after {
					right: -35px;
					left: unset;
				}
			}

			.score-plus {
				left: 50px;
				right: unset;
			}
		}

		&.switched {
			order: 1;
		}
		&.serving .player:after {
			display: inline-block;
		}
	}

	.round-button {
		border-radius: 50%;
		display: inline-block;
		z-index: 1;
		width: 60px;
		height: 60px;
		line-height: 56px;
		vertical-align: top;
		font-size: 60px;
		font-weight: bold;
		text-align: center;
		background-color: white;
		color: var(--ttgreen);
		box-shadow: 2px 2px 8px #333;
		cursor: pointer;

		&#switch-sides {
			position: absolute;
			left: 50%;
			margin-left: -30px;
			font-size: 36px;
			line-height: 64px;
		}
	}

	#buttons {
		position: absolute;
		bottom: 30px;
		left: 30px;
		height: 60px;
		width: calc(100% - 60px);

		> div:first-child {
			position: absolute;
			left: 0;
		}
		> div ~ div {
			position: absolute;
			right: 0;

			.round-button {
				margin-left: 15px;
			}
		}

		.round-button {
			background-size: 60%;
			background-repeat: no-repeat;
			background-position: center;
		}

		#score-undo {
			display: none;
			background-image: url('/assets/icons/undo.svg');

			&.show {
				display: inline-block;
			}
		}
		#switch-sides {
			background-image: url('/assets/icons/switch-sides.svg');
		}
		#manage-users {
			background-image: url('/assets/icons/users.svg');
		}
		#toggle-fullscreen {
			background-image: url('/assets/icons/fullscreen.svg');
		}
		#toggle-options {
			background-image: url('/assets/icons/options.svg');
		}
	}

	.match-action {
		display: none;
	}

	#toggle-fullscreen {
		@media only screen and (min: 1280px) {
			display: none;
		}

		right: 110px;
		font-size: 40px;
		padding-top: 4px;
	}
}

.modal {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10;
	background-color: #000a;
	display: none;

	&.open {
		display: block;
	}
}

.modal-body {
	position: absolute;
	z-index: 1;
	top: 10%;
	left: 15%;
	width: 70%;
	min-height: 80%;
	padding: 10px;
	background-color: #fffe;
	border: 10px solid var(--ttorange);
	text-align: center;
	color: black;

	.button {
		display: inline-block;
		margin: 10px auto;
		padding: 10px;
		width: 200px;
		border: 2px solid black;
		background-color: white;
		cursor: pointer;
	}

	form {
		> label {
			display: block;
			margin: 12px auto;

			label {
				display: inline-block;
			}
		}

		input, select {
			margin-left: 15px;
			padding: 10px;
		}

		.error {
			margin: 10px 0;
			color: var(--ttred);
		}
	}

}

.modal-options {
	#end-match {
		margin-top: 60px;
	}
}

.modal-users {
	text-align: left;

	ul {
		margin: 20px 0;
		max-height: 80px;
		overflow-y: scroll;

		li {
			list-style-type: none;
		}
	}

	.user-names {
		margin: 20px 0;

		input {
			width: 40%;

		}

		input[type=hidden] + span {
			margin-left: 15px;
			visibility: hidden;
			filter: grayscale(1);
		}
		input[type=hidden][value]:not([value='']) + span {
			visibility: visible;
		}
	}
}
