*,
*::before,
*::after {
	box-sizing: border-box;
}

body,
html
{
	margin: 0px;
	padding: 0px;
	font-family: verdana;
	font-size: 11px;
	background: silver;
	text-align: center;
}

h1
{
	font-family: arial;
	font-weight: bold;
	font-size:16px;
	text-align: center;
	
	padding: 0px 0px 5px 0px;
	border-bottom: 8px solid #0051BC;
	min-width: 1020px;
	margin: auto;
	
}
h2
{
	font-family: arial;
	font-weight: bold;
	font-size: 12px;
	text-align: center;
	margin: 0 px;
	padding: 0px;
	
}


#dashboard
{
	background: ivory;
	margin:  0 auto;
}
#dashboard input
{
	border: none;
	margin:auto;
}

#grid {
	margin: 3vw auto;
	padding: 0;
	display: grid;
	border: 1vw solid silver;
	grid-template: repeat(26, 5vw) / repeat(15, 5vw);
	width: 77vw;
	max-width: 100%; /* Ensures pitch width is responsive */
	position: relative; /* Makes the pitch the reference point for the overlay */
	margin-bottom: 50vh;
	z-index: 0;
}

#grid
{
	background: #3DC63D ;
}

#grid .square
{
	border: 1px solid #54D854;
	position: relative;
}
#grid .square.los_left
{
	border-bottom: 1px solid white;
}
#grid .square.los_right
{
	border-top: 1px solid white;
}

#grid .square.widezone_up
{
	border-right: 1px dashed white;
}
#grid .square.widezone_down
{
	border-left: 1px dashed white;
}

#grid .square.tdzone.red
{
	background: #EF1D26;
	border: 1px solid #FF3037;
}
#grid .square.tdzone.blue
{
	background: #0051BC;
	border: 1px solid #0266EA;
}

#grid .square.occupied
{
	background: #aa00f3;
}

#dugout
{
	position: fixed;
	bottom: 0;
	margin: auto;
	height: 10vh;
	width: 100%;
}
#dugout tr td
{
	text-align: center;
	color: white;
	font-weight: bold;
	text-transform: uppercase;
	background: #0051BC;
	opacity: 0.7;
}
#dugout tr td.reserve
{
	width: 30%;
}
#dugout tr td.ko
{
	width: 7%
}

#playertemplate
{
	display: none;
}

#ball
{
	margin: auto;
	text-align:center;
	z-index: 100;
	WIDTH: 3vw;
	HEIGHT: 3vw;
	border-radius: 0.8vw;
	background-image: url("../images/ball.png");
	background-size: cover;
	cursor: pointer;
	border:2px solid black;
	z-index: 2;
}

.square #ball
{
	position: absolute;
	bottom:0;
}


#ball.active
{
	border:2px solid white;
}

.player
{
	width: 4vw;
	height: 4vw;
	padding: 0;

	margin: auto;
	border: 1px solid black;
	border-radius: 1vw;
	cursor: pointer;
	overflow: hidden;
	z-index: 1;
}
.player.selected-player
{
	background: white;
}
.player.selected-player .info
{
	opacity: 1;
	z-index: 100;
}

.player.stun 
{
	border: 1px solid red;
}
.player.prone 
{
	border: 1px solid yellow;
}

.player.prone img,
.player.stun img
{
	-webkit-transform: rotate(90deg);
	-o-transform: rotate(90deg);
	-moz-transform: rotate(90deg);
}
.player.stun img
{
	-webkit-filter: brightness(40%);
	-o-filter: brightness(40%);
	-moz-filter: brightness(40%);
}

.player.up .upbutton,
.player.stun .stunbutton,
.player.prone .pronebutton
{
	color: yellow;
	font-weight: bold;
}


.player img.pixel
{
	height: 30px;
	margin: 0px 0px 0px 0px;
}

.player .info
{
	display: none;
	width: 227px;
	border: 8px solid white;
	position: fixed;
	bottom: 10vh;
	padding: 3px;
	text-transform: uppercase;
	opacity:0.5;

	z-index: 100;
}
.player .info.B
{
	left: 0;
	background: #0051BC;
}
.player .info.R
{
	right:0;
	background: #EF1D26;
}

.player .info .title
{
	background-repeat: no-repeat;
	background-position: 0px 3px;
	text-align: center;
	font-weight: bold;
	font-size: 12px;
	padding: 5px;
	color: yellow;
}
.player .info.R .title
{
	background-repeat: no-repeat;
	background-position: 0px 3px;
}

.player .info .carac
{
	width: 34px;
	height: 40px;
	background: white;
	padding: 5px;
	margin-left: 6px;
	margin-bottom: 5px;
	font-weight:bold;
	
	text-align: center;
	float:left;
}

.player .info .carac .caractitle
{
	margin: 0 0 3px 0;
	padding: 3px;
	
	color: yellow;
	font-size: 8px;
}
.player .info.B .carac .caractitle
{
	background: #EF1D26;
}
.player .info.R .carac .caractitle
{
	background: #0051BC;
}
.player .info .carac.skills
{
	display:table;
	width: 194px;
}
.player .info .addedskills
{
	color: #737373;
}

.player .info .cost
{
	font-weight:bold;
	color: yellow;
	text-align:center;
}

.player .buttons
{
	text-align:center;
	height: 30px;
	width: 100%;
	display:table;
	border-top: 1px solid #0051BC;
	margin-top: 10px;
	cursor: pointer;
}
.player .buttons .buttontitle
{
	padding-top:3px;
	color: #C9C7C7;
}
.player .buttons input
{
	background: none;
	border: none;
}

.vestiaire
{
	margin: 0;
	padding: 0;
	width: 10vw;
	max-height: 50vh;
	border: 8px solid white;
	position: fixed;
	top: 0;
	overflow-y: scroll;
	overflow-x: hidden;
}
.vestiaire .rosterList{
	margin: 1vw 0;
}

.vestiaire .player{
	margin-top: 1vw;
}

#vestiaireB
{
	left: 0;
	background: #0051BC;
}
#vestiaireR
{
	right: 0;
	background: #EF1D26;
}

#canvas{
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	left: 0;
	z-index:100;
}

#panel button{
	margin: 3px;
	width: 50px;
	height: 50px;
	background: white;
	border-radius: 25%;
	border: 2px solid white;
	font-size: 2em;
}
#panel button.blue{
	background: #0266EA;
}

#panel button.red{
	background: #d02031;
}

@media screen and (min-width: 1024px) {
	#grid {
		border: 5px solid silver;
		width: 635px;
		max-width: 610px; /* Limits pitch size to 600px when screen is wider than 1024px */
		grid-template: repeat(26, 40px ) / repeat(15,40px)
	}

	.player{
		width: 35px;
		height: 35px;
		border-radius: 3px;
	}
	.vestiaire{
		width: 130px;
	}
	.bench {
		display : grid;
		grid-template-columns: 45px 45px;
		grid-template-rows: auto;
	}

	#ball
	{
		border-radius: 7px;
		WIDTH: 25px;
		HEIGHT: 25px;
	}
}