*{
	box-sizing: border-box;
}

img{
	max-width: 100%;
}

body {
    font-family: sans-serif;

    height: 100vh;
    margin: 0;
	background: #494949;
}
body.home{
    place-content: center;	
	display: grid;
    grid-template-columns: repeat(8, 50px);
    grid-template-rows: repeat(8, 50px);
}


input.input{
	padding: 5px;
}

#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    color: white;
    padding: 10px;
	user-select: none;
    display: none;
}

#header-toggle {
	position: fixed;
    cursor: pointer;
    font-size: 3.5rem;
    display: none;
	z-index: 99;
	right: auto;
	left: 10px;
}

#header.mobile-menu-open{
	display: inline-block;
}

#app-grid{
    display: grid;
    place-content: center;	
}

#app {
    display: grid;
    grid-template-columns: repeat(8, 50px);
    grid-template-rows: repeat(8, 50px);
}
.game #app{
    border: 4px solid #8c6b6b;
	box-shadow: 0px 0px 15px black;
	border-radius: 4px;
}
.home #app{
	border: 1px solid;
	width: 400px;
	height: 400px;

	display: flex;
	justify-content: center;
	align-items: center;
}
.game .square.white{
	text-shadow: 0px 0px 3px black;
}

.square.light{
	background: lightgrey;
}
.square.dark{
	background: grey;
}
.square{
	text-align: center;
	padding-top: 10px;
	user-select: none;
	font-size: 2rem;
	border: 2px solid transparent;
}
.square:hover{
	border: 2px solid #545454;
}

#alert-contain{
	position:fixed;
	z-index: 999999;
	bottom: 50px;
	left: 20px;
	text-align: left;
	width: 70%;
	pointer-events: none;
	padding-top: 10px;
}
.alert-wrap{
	transition: .5s;
}
.alert-msg{
	position: relative;
	background: rgba(0, 0, 0, .9);
	color: lightgrey;
	font-size: 13px;
	display: inline-block;
	margin: 1px 0;
	padding: 8px 40px 7px 20px;
/* 	border: 1px solid grey; */
    pointer-events: initial;
    font-weight: bold;
	padding-right: 50px;
/* 	box-shadow: 0px 0px 5px black; */
}
.alert-msg a{
	color: lightblue;
}
.alert-msg pre{
	max-height: 80vh;
    overflow-y: auto;
}
.alert-msg span{
	color: orange
}
.alert-icon, 
.alert-close{
	height: 100%;
	width: 30px;

	display: flex;
	justify-content: center;
	align-items: center;
}

.alert-icon{
	position: absolute;
	top: 0px;
	left: 0px;
	width: 12px;
}

.alert-close,
.modal-close{
	position: absolute;
	right: 0px;
	top: 0px;
	pointer-events: initial;
	cursor: pointer;
	padding: 2px 5px 0px 5px;
	font-size: 1.5rem;
	background: lightgrey;
	border-radius: 0 7px 0 0 ;
}
.alert-close:hover{
	background: rgba(250, 50, 55, .4);
}
.alert-icon{
	background: lightgrey;
}
.alert-icon.type-success{
	background: rgba(100, 245, 100, .7);
}
.alert-icon.type-error,
.alert-icon.type-warning{
	background: red;
}
.hal .alert-icon{
	background: rgb(255 235 0)
}

.ghost-piece{
	position: absolute;
	pointer-events: none; 
	font-size: 2rem;
}

.button{
	background: #b8b8b8;
	border: 1px solid black;
	color: black;
	padding: 10px 20px;
	display: inline-block;
	width: auto;
	max-width: auto;
	text-align: center;
	vertical-align: top;
	user-select: none;
	cursor: pointer;
	
}
.button:active{
	background: grey;
}
.button.selected{
	background: lightgreen;
}
a.button{
	text-decoration: none;
}

#create-game{
	position: absolute;
}

#auth{
	background: grey;
	max-width: 210px;
	padding: 10px;
	position: fixed;
	right: 20px;
	top: 20px;
}

.auth-view{
	display: none;
}
.auth-view.selected{
	display: inline-block;
}
#auth .input{
	margin: 5px 0;
}
#forgot{
	margin: 10px 0;
	text-align: right;
	cursor: pointer;
}
#forgot:hover{
	color: #3a3a3a;
}
#current-user{
	background: #3a3737;
	color: white;
	padding: 5px;
	margin-bottom: 30px;
}

#logout{
	text-align: right;
}
#logout input{
	display: inline-block;
	
}

#logo{
	position: fixed;
	top: 0;
	left: 0;
	padding: 20px;
	color: lightgrey;
	max-width: 200px;
}

.square.white{
	color: white;
}

#turn-status{
	border: 1px solid;
	background: white;
    color: black;

	display: inline-block;
	margin: 10px 0;
	padding: 20px;
	left: 20px;
	margin-top: 20px;
	margin-left: 20px;
	/* position: absolute; */
}

.user-portrait img{
	max-width: 100px;
}

#change-profile{
	padding: 5px;
	font-size: .9rem;
	color: black;
}

.profile-box{
	cursor: pointer;
	display: inline-block;
	border: 1px solid grey;
	margin: 10px;
	text-align: center;
}
.profile-box:hover{
	background: rgba(0, 0, 0, .2);
}

.profile-box img{
	/* border: 2px solid; */
	max-width: 80px;
	height: 80px;
}

#back-home{
	position: fixed;
	bottom: 20px;
	left: 20px;
}

.home #player-status,
.home #turn-status {
    display: none;
}

#player-status{
	padding-top: 100px;
	padding-left: 10px;
	padding-right: 10px;
	position: relative;
	/* border: 1px solid; */
}

.player-wrap{
	position:absolute;
	top: 100px;
}
.player-wrap:nth-of-type(2){
	right: 10px;
}

.history-wrap{
	display: inline-block;
	width: 300px;
	margin-top: 20px;
}
.piece-history-row{
	display: inline-block;
	width: 300px;
}
.piece-history{
	position: relative;
	display: inline-block;
	width: 30px;
	vertical-align: top;
	height: 30px;
}
.piece-history{
	background: grey;
	text-align: center;
	padding-top: 8px;
	
}
.piece-history-row:nth-of-type(odd) .piece-history:nth-of-type(odd){
	background: lightgrey;
}
.piece-history-row:nth-of-type(even) .piece-history:nth-of-type(even){
	background: lightgrey;
}
.piece-history:nth-of-type(odd){
}
.piece-history-count{
	position: absolute;
	top: 0;
	right: 0;
	font-size: .7rem;
}
@media (max-width: 800px) {
    #header{
	    background: #333;
	}
	#header-toggle {
        display: block;
        position: fixed;
        top: 10px;
		left: auto;
        right: 10px;
        z-index: 1000;
    }

    #header-content {
        /* display: none; */
    }

    header.mobile-menu-open #header-content {
        display: block;
    }
	#logo{
		max-width: 140px;
	}

	.game #header{
		padding-top: 100px;
	}
	#auth{
		position: relative;
	}
	
}
