/* CSS Document  
'Plain' is Default 					>>> 3D Plain  <<<

Andrew Llewellyn 2015
*/

.clearfix:before,
.clearfix:after {
    content: " "; 
    display: table; 
}
.clearfix:after {
    clear: both;
}
.clearfix {
    *zoom: 1;
}	

* { margin: 0; padding: 0; }

						/* Roughly going down the page */
body {
	font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, sans-serif; 
	line-height: 3ex;
	background-color: #c9dfdf; 
	color:#333;
	text-align: center;
}

#header {
	width:100%;
	padding-top:0.5rem;
	margin-bottom: 0;
	padding-bottom: 0;
}

#logo {
	vertical-align: top; 
	padding:0 0.125rem 0.25rem 0.5rem;
	cursor:pointer;
}	

#main-heading {	
	color:#555;
	font-size:2.1em;
	line-height:3.2rem;
	margin-right:0.5rem;
}
.OXs{ 
	display:inline-block;
}

.help-button { 
	width:3rem; height:3rem; 
	margin:-0.063rem 0.75rem 0 0; 
}
.back-button { 
	width:1.75rem; height:1.75rem;
	padding:0.625rem 1.25rem 0 0.5rem;
}

#main {
	width: 85%;
	margin: 0 auto;
	text-align:left;
	padding: 0px 0 60px 0;
}	
									/* Above the board */
#top-info {	/* encloses scorebar and nxtmsg 100% wide */
	display:block;
	text-align:center;
}

#top-block { /* encloses scorebar and nxtmsg to the width required */
	display:inline-block;
	width:auto;
	border-radius: 6px;
}

.now-score { color:#f0a; }

#scorebar { 
	color:#aa00ff; 
	font-size:1.3em; 
	margin-bottom: 2px;
	padding: 6px 18px 6px 18px;
	border-radius: 4px;
}

#nxtmsg { 
	display:block;
	margin:0;
	padding: 6px 18px 6px 18px;
	border-radius: 4px;
}

#lastmade { font-weight: bold; }

.game-over { color:red;font-size:1.4em; }

.nxtcolor { color:blue; }  /* color of player names in next player msg */

.nexttoken { 
	font-size:1.5em;
	font-weight:bolder; 
	margin-left:8px; 
	vertical-align:middle;
}
									/*  --- Board --- */
#board {
	margin:24px auto 36px auto;
	padding: 12px 24px 12px 24px;
	background-color:#eee;
}

#board td {text-align:center;}

.gridrow { 	
	margin:0 auto;
	padding:0;
	vertical-align:top;	
}

.grid { 
	table-layout:fixed;
	box-sizing:border-box;
	width:9.375rem;
	margin:1em;
	border-spacing:0;
	font-family: 'Helvetica', 'Ariel', sans-serif;
	/* set size etc in grid td */
}	/* For each grid of 9 squares */

.grid td { 
	background-color:#eee;
	text-align:center;
	color:#080;
	font-size:2.6rem;
	width:3rem; height:3rem;
	overflow:hidden;
}	/* for each Square */

.gtm { border-left:3px solid #111; border-right:3px solid #111;}
.gml { border-top:3px solid #111; border-bottom:3px solid #111;}
.gmm { border: 3px solid #111;	margin:0;}
.gmr { border-top:3px solid #111; border-bottom:3px solid #111;}
.gbm { border-left:3px solid #111; border-right:3px solid #111;}

#black-square { background-color:#333; }

#board #lastclicked { color:#ff00aa;font-weight:bolder; font-size:1.125em; }

#board .line-part { font-weight: bold; color: red; }

									/* End of board */
#movesdisp { 	/* This is the #squares taken msg  below the board */
	display:inline-block;
	margin:0px auto;
	padding:8px 0 0 0;
	border-radius: 6px;
	text-align:center; 
	font-size:0.75em; 
	line-height:1.5em;
} 

#rescore_msg {	/* link to Re-Score */
	font-size:0.9em;
	padding:2px 2px 8px 2px;
}

									/* New Game Form */
#new-form {
	display:inline-block;
	margin:32px auto 32px auto;
	text-align:left;
	background-color:#CAFFCA;
	padding:0.75rem 1.75rem;
	border: 8px ridge #def;
}

div.newformtop {
	line-height:2.4ex; 
	margin:8px 0 18px 0;
}
div.newformtop:after {     
	content: '';
    display: block;
    clear: both; 
}

#see_styles_btn a {
	display:inline-block;
	padding: 0.125rem 0.75rem 0.125rem 0.75rem;
	background-color: white;
	background:linear-gradient(to bottom, #fff 20%, #efefef 100%);
	color: #333;
	text-decoration: none;
	border: 1px solid #ccc;
	border-radius: 10px;
	font-size: 1rem;
	cursor: pointer;
}
#see_styles_btn a:hover {
	background:linear-gradient(to bottom, #fff 20%, #ccc 100%);
	background-color:#fff;
	color: #000;
}

#new-form p { margin-bottom:8px; }

.newformline { line-height:2.4ex; }

#new-form input[type=text] {
    font-size:1rem;
	-webkit-box-shadow: 0 3px 0 #ccc, 0 -1px #fff inset;
    box-shadow: 0 3px 0 #ccc, 0 -1px #fff inset;
}

#new-form form select {
	color:Black;
    padding:1px 6px;
    margin: 0;
    font-size:1rem; 
    -webkit-border-radius:4px;
    border-radius:4px;
    -webkit-box-shadow: 0 3px 0 #ccc, 0 -1px #fff inset;
    box-shadow: 0 3px 0 #ccc, 0 -1px #fff inset;
	border: 2px solid transparent;
    outline:none;
    display: inline-block;
    -webkit-appearance:none;
    appearance:none;
    cursor:pointer;
}
#new-form form select:focus { border: 2px solid #5AA5D8; }

#new-form form #select-token {  
	vertical-align:middle;
	font-size:2rem; line-height:2rem;
	padding:0 8px 0 9px;
}
#new-form > form > div.newformtop > span.floatleft.first > select{
	font-size:1rem; 			/* Style pop-up menu */
	padding:0 0.375rem;
}

.skin-choice { float:right; }

#new-form .vs {
	display:block;
	width:8rem;
	margin:-6px auto 8px auto;
}

.new-form-bottom { line-height: 2.4ex;}

input[type=checkbox]{
    width:1.5em; height:1.5em;
	vertical-align: middle;
}

									/* End of New Game Form */
#up-arrow {  /* color is the color of a link */
	float:right;
	margin:12px 12px 40px 12px;
	font-size:2em; 
}
#up-arrow a:link { color:#00e; }
#up-arrow a:visited { color:#00e; }
#up-arrow a:hover { color:#0a0; }
#up-arrow a:active { color:red; }

#footer {
	position:fixed; 
	width:100%; 
	bottom:0;
	height:1.5rem;
	background-color: rgba(255,255,255,0.2) ;	
}
.footer_left { 
	float:left;
	position: relative;
	top: 50%;
	transform: translateY(-50%);
}
.footer_right { 
	float:right;
	position: relative;
	top: 50%;
	transform: translateY(-50%);
}
.print-footer { 
	page-break-inside: avoid;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 0.4em;
	width:80%; margin:0 auto;
	color:#222;
	overflow-wrap: break-word;
  	word-wrap: break-word;
}

.cpu { color:#0088cc;font-size:0.5em; margin:0 12px; }
.cpu a { color:#0088cc;}
.cpu a:hover { color:#00aaff; text-decoration:none; }

.copyright { font-size:0.8em; margin-top:16px; }

															/*  About (setup)  */
.caution_about { display:inline-block;float:left;text-align:left; }
.caution_msg { font-size:0.8em;line-height:1.1em; }

															/*  Rules  */
.rules {
	display:block;
	max-width:92vw;
	line-height:1.3em;
	padding:1px 1.25em 2px 1.25em;
}
.rules ul { margin-bottom:1em;}

.slintro { text-align:left; margin-left:2em; max-width:90vw;}

#rules-scoring-lines { 
	box-sizing:border-box;
	margin:0 1.25em; padding:6px; 
}

.ruleblock { 
	--fs: 16px;
	font-size:var(--fs); 	/* not based on rem */
	--fsFactor:1.5; 		/* font-size multiplier for rulesgrid tables */
	clear:both;
	display:inline-flex;
	flex-wrap: wrap;
	max-width:80vw;
	margin-left:1.75em;
}
.ruleblock h2,h3 { text-align:left;}

.rule-text { padding-top:0.25em; flex:1;}
#rules-scoring-lines > div:nth-child(3) > div.rule-text, 
#rules-scoring-lines > div:nth-child(5) > div.rule-text { min-width:45%; }

.rule-diagram { margin:0 auto; }
#rules-scoring-lines > div:nth-child(1) > div.rule-diagram 
{ width:var(calc((var(--fs) * var(--fsFactor) * 1.34))); }
#rules-scoring-lines > div:nth-child(3) > div.rule-diagram, 
#rules-scoring-lines > div:nth-child(5) > div.rule-diagram 
{ width:var(calc(((var(--fs) * var(--fsFactor) * 1.34)) * 3)); }

.rulesgridrow { margin:0 auto; padding-left:0.125em; }

.rulesgrid {
	table-layout:fixed;
	width:auto;
	margin:0 0.25em; padding:0;
	font-family: 'Andale Mono', 'Helvetica', 'Ariel', monospace;
/* 	font-family: 'Helvetica', 'Ariel', monospace; */
	font-size:calc(var(--fs) * var(--fsFactor));
	font-weight:normal;
}			/* Grid in the Rules section  */

.rulesgrid td {
	background-color:#eeeeee;
	text-align:center;
	width: calc((var(--fs) * var(--fsFactor)) * 1.125 );
	height: calc((var(--fs) * var(--fsFactor)) * 1.125 );
	border: 2px solid #eca;
}			/* for each Square in the rules section*/
.rulesgrid td.central { background:transparent;}
.lns-msg { color:red; margin-left:3rem; max-width:92vw; }
.rules-up-arrow { max-width:90vw; 	margin:0.5em 2em 3em 0;}

															/* General */
a { text-decoration: none; color:Blue;}
a:hover {color:#f0a;}

hr { border: 2px groove #ccc; margin-bottom: 4px; } 

h1 { 
	font-size: 2.2em; 
	line-height: 26px; 
	margin: 24px 0 32px 0; 
	text-align:center; 
	color: #0aa ;
	text-shadow: 2px 1px 2px #044;
	}
h2 { font-size: 1.3em; color:red; margin: 16px 0 16px 0; }
h3 { font-size: 1.1em; color:red; margin: 16px 0 16px 0; }
h4 { font-size: 1.1em; margin-bottom: 3px; color:black;}

p em { background-color:yellow; font-style:normal; }
ul, ol, dl { margin-bottom: 12px; }
ul, ol { margin-left: 2em; }

.nobr	{ white-space:nowrap; }

.smaller { font-size:0.6em; }
.bit-bigger {font-size:1.2em; }
.extralineheight { line-height:1.3em; }
.leftcol { float: left; }
.rightcol { float: right; }
.left { text-align: left; }
.right { text-align: right; }
.centre { text-align: center; }
.center { text-align: center; }
.bold { font-weight: bold; }
.red {color:red; }
.boldred { font-weight: bold; color: red; }
.bolderred { font-weight: bolder; color: red; }
.blue {color:blue; }
.iti	{ font-style:italic; }
.note	{ font-size: 90%; }
.banner { text-align: center; }
		
.clearfloat { clear: both; height: 1px; }

.error-msg { 
	display:inline-block; 
	margin-top:18px; 
	color:red; font-size:1.25em; 
}
.error-msg img { 
	vertical-align:middle; 
	margin:0 12px;
}

code {
	font-family: 'Lucida Console', 'Consolas', 'Ariel', 'Arial Unicode MS', monospace; 
	font-size:1.1em; 
}

span.floatleft { float:left;}
span.floatright { float:right;}

															/* 	Images */
img.floatleft {
	float: left;
	margin-right: 10px;
}
	
img.floatright {
	float: right;
	margin-left: 10px;
}
		
img.sub { vertical-align: text-top; }

img.top { vertical-align: top; }
	
img.txtb { vertical-align: text-bottom; }

img.middle { vertical-align: middle; }
	
img.center {
	display: block;
	margin-left: auto; 
	margin-right: auto; 
	margin-bottom:0px;
}

															/* Areas */
div.floatleft {
	float: left;
	margin-right: 12px;
}
div.floatright {
	float: right;
	margin-left: 12px;
}

.panel {
	background-color: #dedede;
	border-top: 1px solid #999;
	border-bottom: 1px solid #999;
	padding: 10px;
	margin: 0 auto 0 auto;
	padding:6px 24px 6px 24px; 
	font-size:0.8em;
	line-height:2ex;
}

.whitebox {
	border: 2px solid #999999;
	border-right: 4px solid #000000;
	border-bottom: 4px solid #000000;
	padding:10px;

	margin: 10px auto 30px auto;
}

															/* Buttons */
.new-game-button {
	margin:16px 0 8px 0;
	border:2px groove #7c93ba;
	cursor:pointer; 
	padding: 5px 25px;
	background-color:#6b6dbb; /*required for browsers that don't support gradients*/
	background: -webkit-gradient(linear, left top, left bottom, from(#88add7), to(#6b6dbb));
	background: -webkit-linear-gradient(top, #88add7, #6b6dbb);
	background: -o-linear-gradient(top, #88add7, #6b6dbb);
	background: linear-gradient(top, #88add7, #6b6dbb);
	/*style to the text inside the button*/
	font-family: Arial, sans-serif; 
	color:#fff;
	font-size:1.1em;
	letter-spacing:.1em;
	font-variant:small-caps;
	/*give the corners a small curve*/
	border-radius: 15px;
	/*add a drop shadow to the button*/
	-webkit-box-shadow: rgba(0, 0, 0, .75) 0 2px 6px;
	box-shadow: rgba(0, 0, 0, .75) 0 2px 6px;
}
.new-game-button:hover {
	color:#edebda;
	-webkit-box-shadow: rgba(0, 0, 0, .25) 0 1px 0px;
	box-shadow: rgba(0, 0, 0, .25) 0 1px 0px;
}

/* Play button only appears as part of #nxtmsg 
when computer doesn't play automatically */
#play-button {
    margin-left: 0.7em;
	padding: 5px 15px;
    background: #4479BA;
    color: #FFF;
    -webkit-border-radius: 4px;
   border-radius: 4px;
    border: solid 1px #20538D;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2);
    -webkit-transition-duration: 0.2s;
    transition-duration: 0.2s;
    -webkit-user-select:none;
    -ms-user-select:none;
    user-select:none;
/*     add a shadow */
    -webkit-box-shadow: rgba(0, 0, 0, .75) 0 2px 6px;
	box-shadow: rgba(0, 0, 0, .75) 0 2px 6px;
}	
#play-button:hover {
    background: #356094;
    border: solid 1px #2A4E77;
    text-decoration: none; 
	-webkit-box-shadow: rgba(0, 0, 0, .25) 0 1px 0px;
	box-shadow: rgba(0, 0, 0, .25) 0 1px 0px;
}
#play-button:active {
    -webkit-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.6);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.6);
    background: #2E5481;
    border: solid 1px #203E5F;
}
#play-button a:link { color:white; }
#play-button a:visited { color:white; }

#replay-button {
	display:inline-block;
	margin-left:18px;
	margin-top:-8px;
	font-size:4em;
	vertical-align: -8px;
}
															/* Print */
@media print{
	body{ background-color:#FFFFFF; background-image:none; color:#222 }
	.rule-left{ display:none; }
	.rule-right{ display:none; }
	.help-button{ display:none;}
	.back-button{ display:none;}
	#main{ width:95%;}
	hr {display:none;}
	#main-heading {font-size:1.6em;}	
	#movesdisp{ display:none !important;} 
	#rescore_msg {display:none;} 	
	#new-form{ display:none !important;}  
	#footer{ display:none;}  
	#cpu{ display:none;}  
	#up-arrow{ display:none;}
	#lastclicked { color:#080;font-weight:100; font-size:1em; }
	.line-part { font-weight: 100; color: #080; }
	.ruleblock { display:none; }
	.only-print { display:block !important;}
}

.only-print { display: none;}

/* 	End	*/