html, body { 
	margin: 0; 
	padding: 0; 
	height: 100%; 
	width: 100%; 
	overflow: hidden;
	overflow-y: scroll;
	z-index: 10;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

*::-webkit-scrollbar {
  display: none;
}

body {
	background: #303030 url('/static/chess/images/chess.png') no-repeat center center;
	background-size: cover;
	background-color: black;
	display: flex;
	flex-flow: column nowrap;
}

main {
	width: 100%;
	display: flex;
	flex: 1 1 auto;
	flex-flow: column nowrap;
}

footer a {
	color: #fff;
	text-decoration: none;
}

footer a:hover {
	display: inline-block;
	color: #fff;
	background-color: rgba(100, 100, 100, 0.8);
}

footer a:visited {
	color: #fff;
}

.admin_panel {
	display: block;
	position: absolute;
	border: 1px solid white;
	z-index: 10;
	padding: 2em;
	background: white url('/static/chess/images/form_background.png') no-repeat top left;
	background-size: 100% 100%;
	border-radius: 1em;
	width: 500px;
	left: 40%;
	left: calc(50% - 250px);
	top: 5em;
	color: black;
}

form p {
	display: flex;
	flex-direction: row;
	width: 100%;
	line-height: 100%;
	vertical-align: middle;
	padding-top: 0.5em;
}

form button {
	background: white;
	color: black;
}

form p input[type=text],
form p input[type=email],
form p input[type=password] {
	display: block;
	position: relative;
	flex: 1 0 auto;
	margin-left: 1em;
	background-color: #ddd;
	color: black;
	padding: 0.5em;
	margin-top: -0.5em;
	border-radius: 0.2em;
	border: 1px solid #444;
}

form p input[type=text]:focus,
form p input[type=password]:focus {
	display: block;
	position: relative;
	flex: 1 0 auto;
	margin-left: 1em;
	background-color: #ccc;
	color: black;
	padding: 0.5em;
	margin-top: -0.5em;
	border-radius: 0.2em;
	border: 1px solid #222;
}

.admin_panel .table {
	width: 100%;
}

.admin_panel .table input[type=text],
.admin_panel .table input[type=password] {
	width: 100%;
}

#chess_container {
	display: block; 
	width: 100%;
	flex: 1 1 auto;;
}

header {
	display: flex;
	position: fixed;
	top: 0px;
	left: 0px;
	right: 0px;
}

.navigator {
	display: block;
	width: 100%;
	background-color: black;
	padding: 0.5em 1em;
	margin: 0px;
	flex: 0 0 none;
}

.navigator a {
	color: white;
	text-decoration: none;
}

.navigator a:visited {
	color: white;
}

.navigator a:hover {
	color: #ffd;
}

@keyframes pick_opponent_anim {
  0% { opacity: 0.0; }
  15% { opacity: 1.0; }
  75% { opacity: 1.0; }
  100% { opacity: 0.0; }
}

#pick_opponent {
	background: transparent url('/static/chess/images/left_arrow.png') no-repeat left center;
	background-size: auto 1em;
	padding-left: 2.5em;
	padding-bottom: 0.1em;
	position: absolute;
	top: 1.5em;
	left: 6em;	
	color: #f3ea0a;
	font-weight: bold;
	font-size: 2em;
	vertical-align: middle;
	opacity: 0.0;
  	animation-name: pick_opponent_anim;
  	animation-duration: 5s;
  	animation-iteration-count: 1;
}

@keyframes click_piece_anim {
  0% { opacity: 0.0; }
  50% { opacity: 0.0; }
  60% { opacity: 1.0; }
  90% { opacity: 1.0; }
  100% { opacity: 0.0; }
}

#click_piece {
	background-color: rgba(0, 0, 0, 0.3);
	position: absolute;
	top: 1.5em;
	left: 6em;	
	color: #80f30a;
	font-weight: bold;
	font-size: 2em;
	vertical-align: middle;
	opacity: 0.0;
  	animation-name: click_piece_anim;
  	animation-duration: 12s;
  	animation-iteration-count: 1;
}

#choose_piece {
	display: none;
	position: absolute;
	left: 45%;
	left: calc(50% - 5em);
	top: 6em;
	width: 10em;
	height: 4em;
	background-color: black;
	z-index: 10;
}

.opponent_list_container {
	display: flex;
	position: absolute;
	top: 100%;
	left: 0.5em;
	bottom: 20em;
	max-height: 50%;
	min-height: 12em;
	width: 10em;
	background-color: #202020;
	background-color: rgba(32,32,32,0.5);
	overflow-x: hidden;
	box-sizing: border-box;
	border: 1px solid black;
	box-sizing: border-box;
}

#message_panel {
	display: none;
	flex-flow: column nowrap;
	position: absolute;
	top: 100%;
	bottom: 10em;
	left: 10.5em;
	max-height: 75%;
	min-height: 12em;
	width: 15em;
	background-color: #202020;
	background-color: rgba(32,32,32,0.5);
	overflow: hidden;
	padding: 0.5em;
	opacity: 0.9;
	box-sizing: border-box;
	border: 1px solid black;
}

.messages_show {
	display: flex !important;
}

.message {
	border: 1px solid #442;
	width: 100%;
	box-sizing: border-box;
	margin: 0.5em 0.4em;
	padding: 0.5em;
	background-color: #666;
	border-radius: 0.3em;
	color: #ccc;
	overflow-x: hidden;
}

.sent_message {
	background-color: #444;
}

#messages_block {
	flex: 1 1 5.5em;
	max-height: 50%;
	max-height: calc(100% - 5.5em);
	overflow-y: scroll;
	overflow-x: hidden;
}

#send_message_block {
	flex: 0 0 6.5em;
	display: flex;
	flex-flow: column nowrap;
	width: 100%;
	height: 6.5em;
	min-height: 6.5em;
}

#send_message_text {
	width: 100%;
	flex: 1 1 auto;
	margin: 0.5em 0;
}

.send_message_controls {
	display: table;
	width: 100%;
	flex: none;
}

.send_message_controls > div {
	display: table-row;
}

.send_message_controls > div > div {
	display: table-cell;
}

.send_message_controls > div > div:last-child {
	text-align: right;
}

.send_message_controls > div > div:last-child > button {
	margin-right: 0;
}

#opponent_list {
	list-style-type: none;
	margin: 0;
	padding: 0;
}

.email_icon {
	display: none;
	margin-left: 0.5em;
	height: 1em;
	width: 1em;
	background: transparent url('/static/chess/images/message_symbol.png') no-repeat left center;
        background-size: 0.9em;
}

.email_available {
	display: inline-block;
}

.opponent_list_present_bubble {
	display: inline-block;
	padding-left: 1.5em;
	min-height: 1em;
	background: transparent url('/static/chess/images/not_present.png') no-repeat 0.1em 0.15em;
        background-size: 0.7em;
}

.opponent_list_was_present {
	background: transparent url('/static/chess/images/was_present.png') no-repeat 0.1em 0.15em;
        background-size: 0.7em;
}

.opponent_list_present {
	background: transparent url('/static/chess/images/present.png') no-repeat 0.1em 0.15em;
        background-size: 0.7em;
}

#opponent_list li {
	padding: 0.2em 0.5em;
}

.opponent_radio_button {
	display: none;
}      

.opponent_radio_button + label {
	color: #999;
}

.opponent_radio_button:checked + label {
	color: white;
}

#game_message {
	display: block;
	color: red;
	font-weight: bold;
	padding: 0.5em;
}

#computer_countdown {
	display: block;
	color: white;
	font-weight: bold;
	padding: 0.5em;
}

#game_state {
	color: white;
}

#warning {
	color: red;
	font-weight: bold;
}

.hide_button {
	display: none;
}

@keyframes flasher {
  0% { opacity: 1.0; }
  50% { opacity: 0.0; }
  100% { opacity: 1.0; }
}

.flash_message {
  animation-name: flasher;
  animation-duration: 0.2s;
  animation-iteration-count: 3;
}

footer {
	display: block;
	position: fixed;
	z-index: 1000000;
	bottom: 0;
	left: 0;
	right: 0;
}

.messages {
	display: block;
	color: white;
	padding: 0.5em 1em;
	list-style-type: none;
}

.messages .success {
	color: green;
	font-weight: bold;
}

.messages .info {
	color: white;
	font-weight: bold;
}

.messages .error {
	color: red;
	font-weight: bold;
}

.messages .warning {
	color: yellow; 
	font-weight: bold;
}

.messages .info {
	color: white;
	font-weight: bold;
}

.footer {
	display: block;
	position: relative;
	background-color: black;
	color: #aaa;
	padding: 0.5em 1em;
}

button,
.button,
.button:visited,
input[type="submit"] {
        display: inline-block;
        padding: 3px 6px;
	font-size: 1em;
        background-color: #f7f7f7 !important;
        background-image: linear-gradient(to bottom, #c3c3c3, #f7f7f7, #f7f7f7, #c3c3c3) !important;
        border: 1px solid #afafaf;
	color: black !important;
	text-decoration: none;
	cursor: pointer;
          -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Old versions of Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Opera and Firefox */
}

input[type="submit"].page-link,
button.page-link {
        position: relative;
        display: block;
        padding: .5rem .75rem;
        margin-left: -1px !important;
        line-height: 1.25;
        color: #007bff;
        background: #fff;
        border: 1px solid #dee2e6;
}

.float-right {
	display: block;
	float: right;
}

.footer-powered-by {
	display: inline-block;
	color: #aaa;
	margin-left: 2em;
}

.footer-powered-by,
.footer-powered-by a,
.footer-powered-by a:visited,
.footer-powered-by a:hover {
	color: #aaa;
}

@keyframes error_message_animation {
  0%   {color: black; opacity: 0.0; background-color: transparent; }
  25%  {color: white; opacity: 1.0; background-color: black; }
  75%  {color: white; opacity: 1.0; background-color: black; }
  100% {color: black; opacity: 0.0; background-color: transparent; }
}

.error_message {
	display: block;
	position: absolute;
	right: 1em;
	top: 0.5em;
	padding-left: 1em;
	color: transparent;
	background-color: transparent;
  	animation-name: error_message_animation;
  	animation-duration: 4s;
}

.chess-nav-form {
	display: inline-block;
	margin: 0px;
	padding: 0px;
}

select {
   -webkit-appearance: none;
   -moz-appearance: none;
   appearance: none;    
   padding: 0.5em 2em 0.5em 0.5em;
   border-radius: 0px;
   background: #f7f7f7 url('/static/chess/images/dropdown.png') center right no-repeat; 
   background-size: 1.5em;
}

#computer_difficulty {
   display: none;
}

#computer_difficulty.computer_difficulty_show {
   display: inline-block;
}

#toggle_extra {
	display: none;
}

#toggle_extra_label {
	display: none;
	color: white;
	margin-left: 0.2em;
}

.toggle_extra_content {
	display: inline-block;
	margin: 0px;
	border: 0px;
}

#captcha_element {
	padding: 0.5em 0;
}

.adsbygoogle {
	position: fixed;
	bottom: 2em;
	right: 0px;;
	width: 160px;
	z-index: 10000;
	background-color: black;
	background-color: rgba(0, 0, 0, 0.4);
	background-image: url('/static/chess/images/Google_Ad_Space.png');
	background-position: center 5%;
	background-size: 40%;
	background-repeat: no-repeat;
}

@media (max-width: 800px) {
	.footer-powered-by {
		display: none;
	}

	#pick_opponent {
		background: transparent url('/static/chess/images/left_arrow.png') no-repeat left 0.3em;
		background-size: auto 1em;
	}

	.pick_opponent_text {
		font-size: 0.7em;
	}

	#toggle_extra_label {
		display: inline;
		display: inline-block;
	}

	.toggle_extra_content {
		display: none;
	}

	#toggle_extra:checked ~ .toggle_extra_content {
		display: block;
		position: fixed;
		top: 2.5em;
		left: 10.5em;
		line-height: 1.2em;
		background-color: black; 
		z-index: 1000;
	}

	#computer_difficulty {
		margin: 1em;
	}

	.admin_panel {
		left: 30px;
		right: 30px;
		width: auto;
	}

	#message_panel {
		left: 0px;
	}
}
