/*///////////////////////////////////////////////////////////////////////
// CSS To control a Melodeon chord and scale explorer. Classes placed  //
//  on  body element will cause other subsidiary elements to disappear //
// Simple, min7/maj7, blues, improv & 'out' modes are implemented      //
// Simulation is through 3 parallel views, only one visible at a time  //
// An objective to teach 'modes', hence slider for modes & their chords//
// Own tags are defined for clarity and brevity. All are lowercase and //
// contain a hyphen. Legal CSS, and proof against any future HTML tags //
///////////////////////////////////////////////////////////////////////*/

* { box-sizing: border-box }

/* .float-right {float:right}   .float-left  {float:left} */

/*////////////////////////////   
// Page baseline parameters //
////////////////////////////*/ 

 body  {
	background-color: #F0EAD6; /* folk */
	color: black;
	font-family: Arial, Verdana, Helvetica, sans-serif;
	font-size: 1.4vw;
	border:0; margin:0;
	padding:0 2vw;
	position: relative
	}
h1	{
	color:#B55A30;
	display: inline-block;
	width: auto;
	float: left;
	font-size: 200%;
	margin:1vw 0 .5vw 0
}
body > div { /* default */ 
	color:black;
	clear:both;
	min-height: 1vw;
	margin: 0;
	border: 0
	}
	
/* animate body colour change when explore depth changes */  
body { transition-duration: 2s; transition-property: background-color}
h1 	 { transition-duration: 2s; transition-property: color }

/* header decoration nudges*/
h1 > img:first-child { width:2.4vw;   transform: translate( 0.3vw, 1.3vw)}
h1 > drop-text {display:inline-block; width:1.4vw; font-size:60%; transform:translate(-0.4vw, 1.2vw)}
h1 > sax-  {display:inline-block; width:auto; font-size:100%; transform: translate(.5vw, -1vw)}
h1 > horn- {display:inline-block; width:auto; font-size:80%;  transform: translate(1vw, 1vw) scale(-1, 1)}
h1 > img.improvise	  {width:5vw; transform: translate(-0.2vw, 1.4vw)}
h1 > img.out 		  {width:5vw; transform: translate(-0.2vw, 1vw)}

/*/////////////////////////////////////////////////////////////////
// body may be of class folk, extend (chords) blues impro or out //
// It changes the 'look'and also governs what is shown to client // 
// folky light goldenrod=FAFAD2 sweetcorn=F0EAD6 rust=B55A30     //
// extend blush=#FFF0F5 seashell=#FFF5EE Samba=A2242F            //
// blues alice blue=F0F8FF faded denim=C0D1DA  paleblue=EDF0F3   //
// Denims=#1753A1 #0B3261 #0E407D Dark Cerulean=#0E407D          //
// impro ivory=FFFFF4 Navy blazer=282D3C  Sargasso=485167        //
// out light orange=#FFD580 peach=#FFE5B4 red orange=#FF4500     //
/////////////////////////////////////////////////////////////////*/ 
  
body.folk 	{background-color: #F0EAD6}  /* sweetcorn */
body.extend	{background-color: #FFF5EE}  /* seashell */
body.blues	{background-color: #F0F8FF}  /*alice blue */
body.impro	{background-color: #FFFFF4}  /* ivory */
body.out 	{background-color: #FFE5B4} /* light orange */
  body.folk 	h1 {color: #B55A30}  /* rust */
  body.extend 	h1 {color: #A2242F}  /* Samba */
  body.blues 	h1 {color: #0E407D}  /*  Dark Cerulean */
  body.impro 	h1 {color: #282D3C}  /* Navy blazer */
  body.out 		h1 {color: #FF4500}    /* red orange */ 
	/* body {transition: background-color .6s ease-in-out} */ 

body.folk .-folk {display: none} /* suppress all non-folky stuff */ 

body > #explanation-wrapper {
	/* facilitates error or info  pop-up centred on whole screen, content usually transparent */
	z-index: 2; position: fixed; 
	width:100vw; height:55vh;
	display: none; 
	align-items: center; justify-content: center
	}
	#explanation { /* pop-up text gets popped in here, transparent until activated */
		width:auto;
		color: 	#B22222; background-color: white;
		font-size: 2vw; text-align:center;  padding: 3vw 2vw;
		border: 5px solid grey; border-radius: 1vw; 
		opacity: 0;
		transition: opacity .8s ease
		}
		
/*/////////////////////////////////////////////////////////////////
// version is displayed top NE corner of screen. Rubric shares   //   
// space with chord voicing controls and that has to be animated //
/////////////////////////////////////////////////////////////////*/


/*    The rubric below it doubles as chord voicing control area */
version-, rubric- {
	display: inline-block;
	z-index: 1;
	width: auto;
	float: right;
	clear: right;
	font-size: 1.2vw;
	margin: 0; padding:0
	} 
version-.span, rubric-.span {font-style:italic; border:1px dotted red} 

#test-bttn {display:none} /* turned off in production version */
	
button {
	/* baseline for advice buttons. Simulation buttons are marked up as <btn-> etc */
	display: inline-block;
	width: auto;
	font-size: 1vw;
	color: black;
	border: 2px outset;
	padding: .1vw .5vw;
	margin: .3vw ;
	overflow-wrap: normal;
	hyphens: manual
	}
button:disabled {color: grey}
button.pressed {border: 1px inset; border-bottom: 0; border-left: 0; font-weight: bold}


/*///////////////////////////////
// SIMULATION and its children //
///////////////////////////////*/

#simulation { /* sits immediatly below the header */
	display: block;
	min-height: 10vw ;
	padding: 1.5vw;
	padding-bottom: 2vw;
	background-color: inherit;
	clear: both;
	margin: 1vw 0 0 0;	
	border: 1px solid grey;
	border-radius: 4px
	}
bellows	{ /* lies between the left-end and right-end  <row->'s. Simple text! */
	display:block; 
	font-size: 1.2vw; 
	text-align:center; 
	color: #AAA; 
	line-height: .9vw; 
	padding: 1vw 0}
row- { /* each is flexed and centered separtely */ 
	width: 100%;
	display: flex;
	justify-content:center
	}
/* There are 3 simulations, but we only show one view at a time, switched via #simulation's class */
#simulation.both #view-pull, #simulation.both #view-push {display:none}
#simulation.pull #view-push, #simulation.pull #view-both {display:none}
#simulation.push #view-pull, #simulation.push #view-both {display:none} 
  #simulation.both #view-both {display:block}
  #simulation.pull #view-pull {display:block}
  #simulation.push #view-push {display:block} 
 
#anchor-for-status {position: relative} 
/* we want to position info boxes top-left and top-right, either side of centred left-end simulation */ 
	#status-info { position: absolute; z-index: 1; width:100% } /* centred invisible container */
		#status-info > div {
			display: inline-block; 
			min-width:8vw;
			text-align: center;
			color:black;
			padding: .2vw;
			} 
	/* these are the positioned info boxes */
	#push-pull-info {float:right; border: 1px solid #333; border-radius: 3px}
	#entity-info  {float:left; border: 1px solid #333; border-radius: 3px}
	#voicing-info {float:left; clear:left; border:0}
	
/* simulation buttons 'btn-'s are all flex-centred, space-around. Both ends are treated the same */
btn-2 /* this is our 'layout' view eg [G4/A4] or [Ab5/A#5] */
	{min-width: 7vw;
	 margin: .8vw .4vw; 
	 padding:.2vw 0
	}
	
btn-, btn-h { /* this is our single note view eg A4, highlighted or otherwise */
	display: inline-block;
	color: black; 
	background-color: #CCC;
	font-size: 1.4vw;
	text-align: center;
	text-decoration: none;
	min-width:3.8vw;
	margin: .2vw 1.5vw;
	padding: .8vw .8vw;
	border-radius:50%
	}
btn-.acc, btn-h.acc { /* notes like Eb4 need smaller font, to avoid expanding their container */
		font-size: 1.1vw; 
		padding: 1vw .8vw; 
		}
btn-h { /* we highlighted push/pull views as negative contrast*/
		color:white;
		background-color: black; 
		font-weight: bold
		}
btn-h.z { /* we identify a possible pivot button in a scale, but an after: effect might work better? */ 
		color:white;
		background-color: black; 
		font-weight: bold;
		font-style: italic;
		text-decoration: underline;
		text-decoration-style: wavy;
		animation:wobble;
		animation-duration: 1.3s;
		animation-iteration-count: 1
		}
		@keyframes wobble{
		    0%  {transform: rotate(0deg); color:orange}
			55%  {transform: rotate(5deg)}
			10% {transform: rotate(15deg)}
			20% {transform: rotate(5deg);color:gold}
		    30% {transform: rotate(0deg)}
			40% {transform: rotate(-5deg)}
			50% {transform: rotate(-15deg);color:yellow}
			60% {transform: rotate(-5deg)}
		    70% {transform: rotate(0deg)}
			80% {transform: rotate(5deg);color:lightgoldenrodyellow}
			90% {transform: rotate(15deg)}
			50% {transform: rotate(5deg)}
		    100%{transform: rotate(00deg); color:white}
			}
		
btn-2 { /* used in layout view, eg <btn-2>F#4/G4</btn-2> */
		color:#444;
		background-color: inherit; 
		font-weight: normal
	}
btn-2 > h- { /* in layout we must highlight notes individually: <btn-2><h->F#4</h->/G4</btn-2> */
		color:white;
		background-color: #888; 
		font-weight: bold
	}
	
/* controls for simulation lies below its box in the flow, and is repositioned => lower edge */ 
#controls-overlay-for-simulation {
	display:flex; /* the controls will be flexed in meaningful groups */
	align-items: center;
	justify-content:space-around;
	margin-top: 0;
	border: 0
	}
	#controls-overlay-for-simulation span {margin: -1.2vw 0 0 0;} /* a 'group' */
	
#controls-overlay-for-simulation button {font-weight: bold}
/* suppress shine through of darl line simulation border */
body.folk > #controls-overlay-for-simulation  button
	{border-left, border-right: .5vw solid #F0EAD6} /* must be same as active background */
body.extend > #controls-overlay-for-simulation  button
	{border-left, border-right: .5vw solid #FFF5EE}
body.blues > #controls-overlay-for-simulation  button
	{border-left, border-right: .5vw solid #EDF0F3}
body.impro >  #controls-overlay-for-simulation  button
	{border-left, border-right: .5vw solid #FFFFF4}
body.out > #controls-overlay-for-simulation  button
{border-left, border-right: .5vw solid #FFE5B4}	

/*//////////////////////////////////////////////////
// 'force something' controls -> animated options //
//////////////////////////////////////////////////*/

#chord-voicing-controls, #rubric-text { 
/*these occupy the same bit of screen, top right, they ONLY affect chords*/
	display: inline-block;
	overflow-x: hidden; /* defaulting no display */ 
	max-height: 2.2vw;
	width:0;
	white-space: nowrap;
	text-align: right;
	font-size: 1.2vw;
	font-weight: normal;
	margin: 0;
	transition: width 1.1s;
	/*border:1px dotted green*/
	}
body.is-chord #chord-voicing-controls {width: 30vw}
#chord-voicing-controls > button {margin:.1vw}
#rubric-text {width: 30vw} /* default at start-up */

/* tonic/scale force buttons lie under the simulation */
#analysis-tonic-scale-controls {
	display: flex;
	justify-content: space-between; 
	align-items: center;
	margin:.5vw 0 1vw 0; /* compensating for shifted block above */
	border: 0; padding: 0
	} 
   #analysis-tonic-scale-controls > * { 
	max-width: inherit; overflow-x: hidden; /* defaulting no display */ 
	max-height: 2.2vw;
	white-space: nowrap;
	text-align: center;
	font-size: 1.2vw;
	font-weight: normal;
	margin:  0
	} 
	#analysis-tonic-scale-controls > button { border: 2px outset }
	/*#choose-depth-of-analysis, */
	#scale-options, 
	#tonic-options {
		display: inline-block;
		width: 0; 
		transition: width 1.1s; 
		/*transition-duration: 2s; transition-property: max-width*/
		}
	#analysis-tonic-scale-controls.scales #scale-options {width: 40vw}
	#analysis-tonic-scale-controls.tonics #tonic-options {width: 40vw}

/*//////////////////////////////////////////////////////////////
// whereas modes slide. In synchrony emphasising 'same notes' //
//////////////////////////////////////////////////////////////*/

#modes-block {margin:0; border: 0}
#modes-block > div {margin:0; border: 0}
.modes-legend {
	display: inline-block;
	font-weight: bold;
	min-width: 6vw;
	height:2vw
	}
/* the slider animation starts here */
.modes-wrapper {
	display:inline-block;
	width:auto; height:auto;
	padding: 0; margin: 0
	}
  .modes-mask { /* a window, fixed to the page */
	max-height: 2vw;  
	width:74.51vw;
	overflow: hidden;
	padding:0; margin:0;border:0
	}
   .modes-slider { /* contains an overflowed list, 14 items moving behind mask */
	white-space: nowrap; 
	padding:0; margin:0; border:0
	}
/* set the block class and appropriate mode … slides to 1st place */  
.pos0 div.basis {margin-left: 0.0vw}  
.pos1  div.basis {margin-left: -11vw}  
.pos2   div.basis {margin-left: -22vw}  
.pos3	 div.basis {margin-left: -33vw}  
.pos4	  div.basis {margin-left: -44vw}  
.pos5	   div.basis {margin-left: -55vw}  
.pos6		div.basis {margin-left: -66vw}
div.basis {transition: margin-left .6s ease-in-out;}

div.mode { /* 7 buttons in the right order and position behind mask */
	display: inline-block; 
	max-height: 1.8em;
	width:10vw; 
	margin-right: .4vw; 
	font-size:1.2vw;
	background-color: #EEE;
	text-align: center;
	padding:0;
	border: 2px outset;
	}
body.blues div.mode {color: darkblue}
div.shrink {font-size:1vw}  /* => smaller in JS for long names */
div.shrink::first-letter {font-size: 1.2vw} /* deceive the eye! */

#breadcrumb-menu {padding: 0; margin: 0;  border: 0}
#breadcrumb-menu * {margin: 0;  min-width: 0}
#breadcrumb-menu span {margin:0}
#breadcrumb-legend {
	display: inline-block;
	min-width: 6vw;
	text-align:left;
	font-weight: bold;
	margin-left: 0;
	border:0
	}
	
body.folk div.-folk {visibility:hidden} /* leaving a placeholder */
		  div.-folk {transition: visibility .8s }

div.tetrads {overflow-y: hidden; max-height: 2.8vw} 
  body.folk div.tetrads {max-height: 0} /* it collapses */
			div.tetrads {transition: max-height .8s ease-in-out} /* slowly */

/*//////////////////
// output section //
//////////////////*/

#exploration-div {
	min-height: 10vw;
	padding: 0vw;
	margin: 0;
	border:0
	}
#advice-legend {display:inline-block; width:auto; font-weight: bold;}

advice- {
	display: block;
	width: 100%;
	height:auto;
	font-family: Arial, Verdana, Helvetica, sans-serif;
	font-size: 1vw;
	margin: 0.1vw 0.3vw .1vw 0;
	border: 0
	}
advice- *
	{border:0}
advice- > button {
	height:1.6vw;
	padding-bottom: 0.3vw
	}
 sup {font-size: 80%}
/*advice- b-r {
	min-width: 7vw;
	padding: 0 .3vw;
	}	advice b-r::after {content: "|"}*/
	
advice- table {
	table-layout: fixed; 
	 border-collapse: collapse;
	width: 60%;}	
advice- table tr {}	
advice- table tr td {
	width:15%; 
	text-align:center; 
	border: 1px solid #888;
	border-right: 1px solid #888}	
advice- table tr td:first-child {
	border-left: 1px solid #888}	

/*//////////////////////////////
// colour and display classes //
//////////////////////////////*/

button sup {font-size: .8vw}
button.fluent  {}
button.awkward {background: #FFF5EE; color:#800020; }
button.absent {background: darkgrey; color:white; text-decoration: line-through;}
button.partial {background: #FFF5EE; color:#800020;}
#big-spinner, .bigger { font-size:2vw; font-weight: normal} /* OBSELETE? */

footer {font-family: Arial, Verdana, Helvetica, sans-serif;
	font-size: 80%;
	text-align: center;
	margin-top: 1vw
	}
footer > img {width:3vw}

/* div {border:1px dotted black} */
