:root {
  --key-color: #c3c3c3;
  --key-active-color: #000;
  --key-correct-color: #006164;
  --key-wrong-color: #db4325;
}

/* PRELOADING IMAGES FOR PRINT CONTENT */
body:after{
   position: absolute; width:0; height:0; overflow:hidden; z-index:-1;
   content: 
   	url( ../images/game/lines-choice.svg ) 
   	url( ../images/game/lines-correct.svg )
   	url( ../images/game/lines-wrong.svg )
   	url( ../images/game/lines-leaf-correct.svg )
   	url( ../images/game/lines-leaf-wrong.svg )
   	url( ../images/game/x-icon-white.svg )
   	url( ../images/game/check-icon-white.svg )
   ;
}

/* DRAGGABLE SPECIES IMAGE */
#drag-wrapper{
	display: block;
	position: relative;
	width: 320px;
	height: 248px;
	margin: 0 auto;
	outline: dotted 3px #ccc;
    outline-offset: -4px;
	border-radius: 1.5em;
	}
img#drag-item{
	position: absolute;
	border-radius: 1.5em;
  	cursor: grab;
	width: 320px;
	height: 248px;
	top: 0;
	left: 0;
	}
img#drag-item.swiping{
	cursor: grabbing;
	opacity: .7;
	}

img#drag-item.complete{
	animation: appear 1s ease-in-out;
	}
@keyframes appear{
	0% { opacity: 0; }
	100% { opacity: 1; }
}

/* NUMBER OF QUESTIONS FEEDBACK */
#question-number-feedback{
	color: #aaa;
	text-align: center;
	margin-top: 1em;
	padding-top: 1em;
	font-size: 1.25em;
	}

/* QUESTION */
#question{
	font-size: 1.55em;
	margin: 0 0 .25em 0;
	text-align: center;
	}

/* CHOICE ICONS */
#choice-icons-wrapper{
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	grid-gap: 2em;
	margin: .5em 0 2em 0;
	}
#choice-icons-wrapper.hidden{
	display: none;
	}	
#choice-icons-wrapper > div{
	width:  3.5em;
	height: 3.5em;
  border-radius: 50%;
  box-shadow: 0 0 5px 3px rgba(0, 0, 0, .1);
	cursor: pointer;
	}
#choose-no{
	background-position: center;
	background-image: url( '../images/game/x-icon-red.svg' );
	background-size: 60%;
	background-repeat: no-repeat;
	}
#choose-yes{
	background-position: center;
	background-image: url( '../images/game/check-icon-green.svg' );
	background-size: 60%;
	background-repeat: no-repeat;
	}				

/* Progress Feedback Wrapper */
#progress-feedback-wrapper{
	margin: 1em 0 2.5em 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	position: relative;
	}
#progress-feedback-wrapper div:nth-child(2){
	margin:  0 0 0 auto;
	}

#progress-species-identified{
	display: flex;
	flex-wrap: wrap;
	grid-gap: .25em;
	align-items: center;
	}	
#progress-species-identified div:not(:first-child){
	width: 1.5em;
	height: 1.5em;
	border-radius: 50%;
	background-color: #eee;
	color: #aaa;
	font-weight: bold;
	display: flex;
	align-items: center;
	justify-content: center;
	background-position: center;
	background-repeat: no-repeat;
	}
#progress-species-identified .wrong{
	background-image: url( '../images/game/x-icon-red.svg' );
	background-size: 60%;
	}
#progress-species-identified .correct{
	background-image: url( '../images/game/check-icon-green.svg' );
	background-size: 60%;
	}		

#timer-wrapper{
	color: #aaa;
	position: absolute;
	right: 1em;
	}



/* AB KEY ----------------------------------- */
#toggle-section + .split-button-wrapper button{
	margin-top: 2em;
	}
#ab-key .block{
	margin: 0 0 .75em 0;
	background-color: #fff;
	outline: 3px solid var( --key-color );
	display: grid;
	grid-template-columns: 1fr 10fr;
	justify-content: center;
	align-content: center;
	font-size: .95em;
	color: #939393;
	}
#ab-key .block:last-child{
	margin-bottom: 0;
	}	

#ab-key .block > div:first-child{
	grid-row: 1/3;
	background-color: var( --key-color );
	justify-content: center;
	align-content: center;
	display: grid;
	font-size: 1.25em;
	font-weight: bold;
	color: #fff;
	padding-right: .25em;
	}	

#ab-key .option{
	display: grid;
	grid-template-columns: 1.25fr 6fr 4fr;
	}
#ab-key .option:nth-child(2) {
	border-bottom: 2px dashed var( --key-color );
	}
#ab-key .option > div{
	padding: .5em .5em .3em .5em;
	display: flex;
  	align-items: center;
	}
#ab-key .option > div:last-child {
	border-left: 2px dashed var( --key-color );
	}

#ab-key .icon{
	justify-self: center;
	align-self: center;
	background-color: #e9e9e9;
	width: 1.5em;
	height: 1.5em;
	border-radius: 50%;
	background-repeat: no-repeat;
	padding: .5em;
	background-size: 70%;
	}

/* active --------- */
#ab-key .block.active { 
	outline-color: var( --key-active-color ); 
	color: #000;
	}
#ab-key .block.active > div:first-child { background-color: var( --key-active-color ); } /* number */

/* selected, correct --------- */
#ab-key .block.selected, #ab-key .block.correct { 
	outline-color: var( --key-correct-color ); 
	}
#ab-key .block.selected > div:first-child, #ab-key .block.correct > div:first-child { /* number */
	background-color: var( --key-correct-color ); 
	font-weight: bold;
	}	
#ab-key .option.selected, #ab-key .option.correct { 
	color: var( --key-correct-color ); 
	font-weight: bold;
	}
#ab-key .option.selected .icon, #ab-key .option.correct .icon { /* icon */
	background-position: 40% center;
	background-image: url( '../images/game/check-icon-white.svg' );
	background-color: var( --key-correct-color );
	}

/* wrong --------- */
#ab-key .block.wrong { 
	outline-color: var( --key-wrong-color ); 
	}		
#ab-key .block.wrong > div:first-child{	/* number */
	background-color: var( --key-wrong-color ); 
	font-weight: bold;
	}
#ab-key .option.wrong { 
	color: var( --key-wrong-color ); 
	font-weight: bold;
	}
#ab-key .option.wrong .icon{ /* icon */
	background-position: center;
	background-image: url( '../images/game/x-icon-white.svg' );
	background-color: var( --key-wrong-color );
	background-size: 55%;
	}	



/* TREE KEY ----------------------------------- */

/* LEVEL (nodes) */
#tree-key .level-wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin: 0 2em;
	position: relative;
    z-index: 400;
	}
#tree-key .level-wrapper.left {
	margin: 0 4em 0 0;
	}
#tree-key .level-wrapper.right {
	margin: 0 0 0 4em;
	}
#tree-key .level-wrapper > div{
	color: #bbb;
	margin: 0 .25em;
	padding: .75em .5em .5em .5em;
	text-align: center;
	border-radius: 1.25em;
	outline-width: 4px;
	outline-style: solid;
	outline-color: transparent;
	background-color: #fff;
	font-weight: bold;
	display: grid;
    align-content: center;
	}
#tree-key .level-wrapper > div.active {
	color: var( --key-active-color );
	outline-color: var( --key-active-color );
	}	
#tree-key .level-wrapper > div.selected, #tree-key .level-wrapper > div.correct{ 
	outline-color: var( --key-correct-color ); 
	color: var( --key-correct-color );
	}
#tree-key .level-wrapper > div.wrong{ 
	font-weight:  bold;
	outline-color: var( --key-wrong-color ); 
	color: var( --key-wrong-color );
	}
#tree-key .level-wrapper > div.empty { background-color: transparent; }	

/* LINES --------------- */
#tree-key .line-wrapper{
	height: 70px;
	background-size: cover;
	background-position: center;
	position: relative;
    z-index: 0;
	}

#tree-key .line-wrapper.center { margin: 0 5.5em; }	
#tree-key .line-wrapper.left { margin: 0 8em 0 3em; }
#tree-key .line-wrapper.right { margin: 0 3em 0 8em; }

/* Adjusting for 2 right blocks in a row */
#tree-key .level-wrapper.right ~ .line-wrapper.right:not(.leaf){ margin: 0 1em 0 10em; } 
#tree-key .level-wrapper.left ~ .line-wrapper.left:not(.leaf){ margin: 0 10em 0 1em; } 	

#tree-key .line-wrapper.choice { background-image: url('../images/game/lines-choice.svg'); }
#tree-key .line-wrapper.selected, #tree-key .line-wrapper.correct { background-image: url('../images/game/lines-correct.svg'); }
#tree-key .line-wrapper.wrong { background-image: url('../images/game/lines-wrong.svg'); }

/* flips background */
#tree-key .line-wrapper.side-right { transform: scaleX(-1); }		

/* LEAVES */
#tree-key .line-wrapper.leaf.selected, #tree-key .line-wrapper.leaf.correct{ background-image: url('../images/game/lines-leaf-correct.svg'); }
#tree-key .line-wrapper.leaf.wrong { background-image: url('../images/game/lines-leaf-wrong.svg'); }

/* height of leaf lines*/
#tree-key .line-wrapper.leaf { height: 35px; }



/* ROUND COMPLETE ----------------------------------- */
.top-caption{
	margin: 1.5em 0 .25em 0;
	}
#continue-section{
	border-top: dotted 2px #ccc;
    margin-top: 4em;
    padding: 1em 0 0 0;
	}
#continue-section + .button-wrapper{
	padding: 1em 0 0 0;
	}	
#feedback-wrapper{
	display: grid;
	grid-template-columns: auto 1fr;
  	grid-gap: 0.75em;
	margin: 2em 0 1em 0;
	align-items: center;
	}
#feedback-wrapper div:first-child{
	width: 2em;
	height: 2em;
	background-position: center;
	background-size: 55%;
	background-repeat: no-repeat;
	border-radius: 50%;
	}
#feedback-wrapper div{ 
	font-size: 1.5em; 
	font-weight: bold; 
	line-height: 1.1em;
	}
#feedback-wrapper.correct div{ color: var( --key-correct-color ); }
#feedback-wrapper.wrong div{ color: var( --key-wrong-color ); }
#feedback-wrapper.correct div:first-child{
	background-image: url( '../images/game/check-icon-white.svg' );
	background-color: var( --key-correct-color );
	}
#feedback-wrapper.wrong div:first-child{
	background-image: url( '../images/game/x-icon-white.svg' );
	background-color: var( --key-wrong-color );
	}	

/* correct image */ 
#correct-img-feedback-wrapper {
	padding-bottom: 1em;
	}
#correct-img-feedback-wrapper img {
	border-radius: 1.5em;
  	cursor: pointer;
	width: 100%;
	}	
#correct-img-feedback-wrapper > div {
	display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 1em;
    align-items: center;
	}
/* wrong images */
#wrong-img-feedback-wrapper{
	padding-bottom: 1em;
	}
#wrong-img-feedback-wrapper img {
	border-radius: 1.5em;
  	cursor: pointer;
	width: 100%;
	}	
#wrong-img-feedback-wrapper > div {
	display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 1em;
    align-items: center;
    margin-bottom: 1em;
	}

#about-species-toggle-wrapper {
	margin-bottom: 1em;
	}
#about-species-toggle-wrapper .content-wrapper {
	padding: .5em 0;
	}

#tipText{
	margin-top: 1em;
	background-color: #fff8b8;
    padding: 2em;
	}

/* GAME COMPLETE ----------------------------------- */	
#score-wrapper {
	background-color: #e9e9e9;
    border-radius: 1.5em;
    display: grid;
    text-align: center;
    padding: 1.5em;
    font-weight: bold;
    line-height: 1.1;
	}
#score-wrapper div:nth-child(2){
	font-size: 2.5em;
	font-family: 'Luckiest Guy';
	}		
#score-wrapper div:nth-child(2){ color: #c4a300; }	
#score-wrapper div:nth-child(2).low { color: var( --key-wrong-color ); }
#score-wrapper div:nth-child(2).high { color: var( --key-correct-color ); }	

#print-section {
	margin-top: 2.5em;
	border-top: dotted 2px #ccc;	
	}
#print-section input {
    display: block;
    width: 80%;
    font-size: 1.1em;
    padding:  .2em .2em .1em .2em;
    margin: .5em 0;
    }   
#print-section input::placeholder{
    color:  #aaa;
    }  	

#species-identified-section {
	margin-top: 2em;
	border-top: dotted 2px #ccc;
	}
#species-identified-wrapper {
	margin-top: 1em;
	display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 1em;
	}
#species-identified-wrapper > div {
	text-align: center;
	align-self: end;
	}	
#species-identified-wrapper > div > div{
	color: #ccc;
	margin: 0 .5em;	
	}	
#species-identified-wrapper img {
	width: 100%;
	border-radius: 2em;
	filter: opacity(0.5) saturate(0);
	}	
/* correct */
#species-identified-wrapper > div.correct > div {
	color: #000;
	}			
#species-identified-wrapper > div.correct img{
	filter: opacity(1) saturate(1);
	}	