/* Style sheet for Ethos Clinic web site
   Mobile first, with media queries for larger devices
   Author: M. Shellim
   Date: 2 July 2021
*/

@import url('https://fonts.googleapis.com/css2?family=Merriweather+Sans:ital,wght@1,300&display=swap'); 

/* || COLOURS */

:root {
	--loud: #F5CDBA; /* sonic silver */
	}  


/* || BODY */

body {
	margin:auto;
	padding:10px;
	max-width: 1000px;
	color:#333;
	background-color:white;
    font-family: Verdana, Arial, Helvetica, sans-serif;
	line-height: 1.5; 
	overflow:scroll;
}

/* || font sizes mobile-first (device width < 480 px) */

#banner { font-size:26px; }
h1 {font-size:26px;}
h2 {font-size:20px;}
h3 {font-size:16px;}
h4 {font-size:14px;}
body { font-size:14px; }
#menu li { font-size: 16px; }


/*|| common styling */


h1, h2, h3, h4 {
    font-family:Helvetica, Arial, sans-serif;
	font-weight:bold;
}

h1 {margin-top:0px;}


a:link {color: #00C  ;text-decoration:none}
a:visited {color:#00C;text-decoration:none}
a:hover {color:#00C;text-decoration:underline}
a:active {color:#00C;text-decoration:none;}

/* || GENERAL STYLE CLASSES */

.monospace {font-family:monospace;}
dd {margin-bottom:0.5em;}
dt {font-style:italic;}

.itsnew {
	color:red; 
	font-weight:bold;
}

/* || COLOUR SCHEME 

After https://coolors.co/bbbdf6-9893da-797a9e-72727e-625f63

 lavender-blue: #bbbdf6ff;
 blue-bell: #9893daff;
 rhythm: #797a9eff;   menu text
 sonic-silver: #72727eff;
 dim-gray: #625f63ff;
 
 derived shades:
 #ededfd; for light colours (caption background?) 
 #e2e3ff; light colour for background text

*/

/* || GRID LAYOUT 
   Grid is three rows, two columns
   Mobile layout below, media queries for larger devices 
*/

#grid-container {
	display: grid;
	grid-template-rows: 70px 1fr;
	grid-template-columns: 135px 1fr;
}

#sidebar {
	grid-area: 2 / 1 / 3 / 3; ;
}

#masthead { /*top row of grid */
	grid-area: 1 / 1 / 2 / 3;
	background-color: #797a9eff;
}

#logo {
	grid-area: 1 / 1 / 3 / 2;
	}
  
#logo img {
    display:none;
	}

#banner {
	grid-area:1 / 1 / 2 / 3;
	color: white;
	padding: 0 0 0 10px;
	margin: auto 0;
    font-family: 'Merriweather Sans', sans-serif;
    font-style: italic;
	line-height: 1; /* to prevent overflow when wrapping */
	}

#content{
	grid-area: 3 / 1 / 4 / 3; 
	background-color: white;
	margin: 15px 15px 0px 5px;
}

/* || IMAGES */

img.shrink {
	max-width:100%;
	height:auto;"
	}

/* style images and captions as a table, so we can shrink the caption  to fit the image */
.imgandcaption {
	display:table;
	margin:1em 0;
	}

.imgandcaption img {
	display:table-cell;
    max-width:100%;
	}

.imgandcaption p {
	display:table-caption;
	caption-side: bottom;
	background-color:#ededfd;
	padding:0.3em 0.5em;
	margin:0;
    font-size:0.7em;
    font-style:italic;
	}

 .imgandcaption.small {max-width:200px;}
 .imgandcaption.medium {max-width:400px;}
 .imgandcaption.large {max-width:700px;}
/*  .imgandcaption.screenshot {max-width:400px;} */
 .imgandcaption.screenshot {max-width:600px;}
 .imgandcaption.wide {max-width:900px;}

   

/* For captions in template pages */
   
.caption-flightmode {
   color:blue;
  }

.caption-mix-adjuster {
  color:red;
  }


/* || OVERRIDES */

/* table formating */

table {
	border-collapse:collapse;
	font-size:smaller;
	background-color:#EEE;
}

table td {
	border:solid #AAA 1px;
	padding:0.1em 0.6em; 
	vertical-align: top;
	}

table p {
    padding:0px;
    margin:0px;
}

thead {
	font-weight:bold;
	background-color:#CCCCCC
}




/* maybe use this for version history pages */
div.back_button {
	margin-left:35px;
}

/* || MIXER page */

#flex-container {
	display:flex;
	flex-direction:row;
	flex-wrap:wrap;
	justify-content:flex-start;
}

.mixer2{
	padding: 0;
	margin:25px 15px 0 0;
	width: 14em;
	border: 1px dotted;
   	background-color:#fafafa;
}

.mixer2 p {
	margin:0;
	padding:0;
}

.mixer2 > div {
	padding:0.5em;
}
   
/* heading row style */
div.mixer2 div:first-child {
	background-color: lightgray;
	font-weight:bold;
} 

div.mixer2 div:nth-child(2) {
	border-top:1px dotted;
	border-bottom:1px dotted;
    font-size:0.9em;
}
     
div.mixer2 div:last-child {
	font-size:0.9em;
}


/* colours for second row - after https://www.w3.org/wiki/CSS/Properties/color/keywords */
.mixer2 div:nth-child(2) {background-color:aliceblue;} /*default */
.mixer2.special div:nth-child(2) {background-color:floralwhite;}
.mixer2.primary div:nth-child(2) {background-color:honeydew;}
.mixer2.secondary div:nth-child(2) {background-color:ghostwhite;}

/* mixer names */

.mix-name {
    font-style:italic;
    font-weight:bold;
 }

/* styling for mixer parameters */
.sourced {font-weight:bold;}
.repeat::after {content:" [...]";}
.mult-cond::after {content:" [cnd,cnd..]";}

  
/* || MENU
    Flexbox https://css-tricks.com/snippets/css/a-guide-to-flexbox/
    
    Consider converting to collapsible menu using CSS-only
    after https://www.youtube.com/watch?v=POxn1x3kAyY 
*/

:root {
	--menu_color: #72727eff; /* sonic silver */
	--menu_bg_color: #bbbdf6ff;
	}  

#menu {
	 display:flex;
     flex-direction:row;
     flex-wrap:wrap;
     justify-content:space-between;
     padding:10px;
  	 background-color:var(--menu_bg_color); /*#af46a3ff; */
	 font-family: Tahoma, sans-serif;
}

#menu li {
	list-style:none;
	padding:0px;
	margin:0px;
	}

#menu ul {
	padding:0px; 
	margin:0px;
	}
	
#menu p  {
	color: var(--menu_color);
	font-weight:bold;
	padding: 1px 0px 0px 2px;
	margin:0px;
}
	
#menu ul {
	padding:0px 2px 2px 2px;
	line-height:1.2;
	margin:0px;
    /* font-family: Tahoma, sans-serif; */
	}

/* #menu-item-group p { */
#menu li {
    padding:2px 1px ;
    margin:0;
    /* color: var(--menu_color);  /* sonic silver */
   	font-weight:normal;
}


#sidebar a:link {color:#72727eff; text-decoration:none;text-decoration:none; }
#sidebar a:visited {color:#72727eff; text-decoration:none;text-decoration:none; }
#sidebar a:hover {color:#898aa9; text-decoration:none;text-decoration:none; }
#sidebar a:active {color:#e2e3ff; text-decoration:none;text-decoration:none; }
#sidebar #menu li.activeitem {  /* active list item */
  	background-color: #e2e3ff;
  	border-radius: 5px;
	}

/* || SPECIFICATION BLOCK (flexbox) */

div#specification {
	display:flex;
	flex-direction:row;
	flex-wrap: wrap;
	justify-content:flex-start;
	align-items:flex-start;
	margin-bottom:20px;
    font-size:0.9em;
}

div#specification > * {
	width:290px;
    margin:0.5em;
}

div#specification h4 {
    font-style:italic;              
	margin:0;
	padding:0;
	}
    
div#specification p {
    margin:0;
    padding:0 0 0 1em; 
    }

div#specification p::before {
    content: "- ";
    }

    
/* || AUTHOR DETAILS */

div#author_and_revisions {
	font-family:Tahoma, Arial, Helvetica, sans-serif;
	font-size: 10px;
	margin-bottom: 1em;
	margin-left: 2px;
 	border-bottom: 1px dotted gray;
	width:20em;
}

div#author_and_revisions p {
	margin:0px;
	padding:0px;
}

/* || FOOTER */

.footer {
    font-style: italic; 
    font-size: 0.75em;
    }

/* || TIP */

div.tip {
	color:#333;
	border: 1px solid; 
	border-color:#ccc;
	border-radius: 5px;
	background-color:#f4f4f4;
	font-size:smaller;
	padding:4px;
	margin:10px 30px 10px 10px ;
	}
div.tip p {
	margin-top:0px;
	margin-bottom:0px;
	}


/* || NEWS FLASH - used in template pages, probably needs renaming */

div.newsflashquiet {
	color:#333;
	border: 1px solid; 
	border-color:#ccc;
	border-radius: 5px;
	background-color:#f4f4f4;
	font-size:smaller;
	padding:0.5em 1em;
	margin:10px 30px 10px 0px ;
	}

div.newsflashloud {
	color:#333;
	border: 1px solid; 
	border-color:#ccc;
	border-radius: 5px;
	background-color: var(--loud);
	font-size:smaller;
	/* font-weight:bold; */
	padding:0.5em 1em;
	margin:10px 30px 10px 0px ;
	}
	
	
	
div.newsflashquiet p {
	margin-top:0px;
	margin-bottom:0px;
	}

/* || CODE */
div.code {
  border-left:lightgreen solid 8px;
  margin:0.75em 0 0.75em 0;
  
  padding-left:2em;   /* fiddle for hanging indent */
  text-indent:-1.5em;
  
  background-color:#f0fff0;
  font-family:monospace;
  font-size:0.9em;
}
    
.code p {margin:0;
  padding:0;
  }
	
	
/* || DOWNLOAD */

div#download {
	max-width:450px;
  	border-radius: 20px;
	background-color:#e2e3ff;
	padding:20px;
	margin:25px 0;
	}

.subscript {
	vertical-align:sub;
	font-size:smaller;
	}


/* || TABLE OF CONTENTS (generated in toc.js) */

#ToC{
	/* display:inline-block; */
	font-family: Arial, Helvetica, sans-serif;
	font-size: 0.75rem;
	/* background-color:var(--toc-bg-color); */
	background-color:rgb(240,255,240) ;
	border-radius: 1em;
	border: 2px solid lightgray;
	padding: 1em;
	margin: 1em 0;
	width: fit-content;
	/* color: var(--toc-color); */
}

#ToC div {
	display:flex;
	flex-direction:row;
	flex-wrap:wrap;
	width:fit-content;
	}

#ToC > div {
	min-width: 200px;
	margin-right: 2em;
	}

#ToC ul {
	padding: 0 0 0 20px;
	margin: 0;
	margin-right: 2em;
}

#ToC h3 {
	margin: 0;
	padding:0;
}

.toclink {
	display:block;
	width:fit-content;
	background-color:var(--toc-bg-color);
	padding: 0em 0.6em;
	font-size:0.75rem;
	border:1px solid lightgrey;
	border-radius: 0.5em;
	margin: 1em 0em 1.5em 0em;
	}

/*	
#ToC {
	display:inline-block;
	font-family: Arial, Helvetica, sans-serif;
	font-size: smaller;
	background-color:rgb(240,255,240) ;
	border-radius: 10px;
	border: 1px solid lightgray;
	padding: 12px;
	margin: 0px;
	color:#333;
}

#ToC ul {
	padding: 0 0 0 20px;
	margin: 0;
}

#ToC h3 {
	margin: 0;
	padding:0;
}

*/

/* || MEDIA QUERIES */

/* 
after https://ricostacruz.com/til/css-media-query-breakpoints 
(default)	Mobile-portrait
min-width: 480px	Mobile-landscape (and larger)
min-width: 768px	Tablet-portrait (and larger)
min-width: 992px	Tablet-landscape (and larger)
min-width: 1200px	Laptops (and langer)
*/

@media only screen and (min-width: 480px) {
    /* Side menu */
    #sidebar {grid-area: 2 / 1 / 3 / 2;}
    #masthead {grid-area: 1 / 1 / 2 / 3;}
    #logo {	grid-area: 1 / 1 / 2 / 2;}
    #banner {grid-area: 1 / 2 / 2 / 3;}
    #content{grid-area: 2 / 2 / 3 / 3;}
    
    #menu {
      flex-direction:column;
      flex-wrap:nowrap;
      padding: 10px 7px 10px 5px;
      justify-content:flex-start;
      }
      
    /* div.menu-item-group { */
	#menu div {
      padding-top:10px;
      }
      
    /* div.menu-item-group p { */
	#menu li {
      padding: 3px 3px 3px 6px; 
      }

    #content { margin: 15px 15px 0px 15px; }
    
    /* font sizes */
    #banner { font-size:30px; }
    h1 {font-size:28px;}
    h2 {font-size:22px;}
    h3 {font-size:18px;}
    h4 {font-size:16px;}
    body { font-size:16px; }


    #logo img {
		display:block;
		max-width:100%; 
		padding:10px 0 0 8px;
	}
    
    /* debug
    #banner::before {content:" >= 480px " }
    */ 
 }

@media only screen and (min-width: 768px) {
    #banner { font-size:30px; }
    h1 {font-size:28px;}
    h2 {font-size:22px;}
    h3 {font-size:18px;}
    h4 {font-size:16px;}
    body { font-size:16px; }
    
    /* debug
    #banner::before {content:" >= 768px " }
    */ 
}

@media only screen and (min-width: 992px) {
    #banner { font-size:30px; }
    h1 {font-size:28px;}
    h2 {font-size:22px;}
    h3 {font-size:18px;}
    h4 {font-size:16px;}
    body { font-size:16px; }
    
  /*  
    #banner::before {content:" >= 992px " }
  */  
}
