/* for Pandoc course notes, and for indexcgi.cgi index scripts */
/*     Pandoc: http://johnmacfarlane.net/pandoc/  */
/* -Ian! D. Allen - idallen@idallen.ca - www.idallen.com */

body {
    font-family: ubuntu, verdana, helvetica, sans-serif;
    background-color: #ffffee;
    max-width: 55em;
    padding: 0.5em;
    margin: 0.5em 0 0 0.5em;
    border: 0.25em solid #ddddcc;
    border-radius: 2em;
}

/* pandoc-* classes added to body tag by my pandochtml.sh */
body.pandoc-slidy {
    font-family: ubuntu, verdana, helvetica, sans-serif ;
    background-color: #ffffee ;
    max-width: 55em ;
    padding: 0 ;
    margin: 0 ;
    border: 0 ;
}

/*
div#TOC:before, nav#TOC:before {
    display: block ;
}
*/

/* new pandoc has <header> section */
#header > h1:first-child, header > h1:first-child {
    font-size: 170% ;
    margin: 0 0 0.3em 0;
    letter-spacing: 0.2em;
    font-weight: bold;
    /* font-family: ubuntu, verdana, helvetica, times; */
    font-variant: small-caps;
    padding: 0.5em;
    background-color: #ddcc99 ;
    border: 0.1em solid  #ee6666 ;
    border-radius: 0.9em 0.9em;
    text-align: center ;
    text-indent: 0 ;        /* over-ride text-indent set on all h1 */
}

/* use the --section-divs option to pandoc */
/* new pandoc has <section> tags; added ul and ol  */
body.pandoc-html section > p, body.pandoc-html section > dl, body.pandoc-html section > pre, body.pandoc-html section > table, body.pandoc-html section > div.line-block, body.pandoc-html section > ul, body.pandoc-html section > ol {
    margin-left: 2em;
}
body.pandoc-html div > p, body.pandoc-html div > dl, body.pandoc-html div > pre, body.pandoc-html div > table, body.pandoc-html div > div[style*="white-space: pre-line"] {
    margin-left: 2em;
}
body.pandoc-html > p, body.pandoc-html > dl, body.pandoc-html > pre, body.pandoc-html > table, body.pandoc-html > div[style*="white-space: pre-line"], body.pandoc-html > ol {
    margin-left: 2em;
}
div[style*="white-space: pre-line"], div.line-block {
    margin-top: 0.1em;
    margin-bottom: 0.1em;
}


div > ul, div > ol {
    margin-left: 0.5em;
}

/* tweaks to the above to make Slidy look better */
body.pandoc-slidy div > ul,
body.pandoc-slidy div > ol
{
    margin-left: 3em  ;
}

/* use these without --section-divs option to pandoc */
/*
body > p, body > dl {
    margin-left: 2em;
}

body > ul, body > ol {
    margin-left: 0.5em;
}
*/

/* code affects both blocks of code (inside <pre>) and stuff in `...` */
code {
    font-weight: bold;
    padding-left: 0.2em;
    padding-right: 0.2em;
    white-space: pre-wrap ;
}
/* undo the padding and wrap done by the above general code */
pre > code {
    padding: 0;
    white-space: pre ;
}
/* fix missing padding for block code segments */
body section pre {
    padding-left: 2em;
}
.i {
    font-weight: bold;
    font-style: italic ;
}
.nopadleft {
    padding-left: 0;
}
.nopadright {
    padding-right: 0;
}
.nopad {
    padding-left: 0;
    padding-right: 0;
}
.pre {
    white-space: pre ;
}
/* pre-wrap wraps a URL or pathname on the slashes! */
.wrap {
    white-space: pre-wrap ;
}

/*
code:before, code:after {
    margin-left: -0.5em;
    content: " "
}
*/

/* @media screen */
    /* this affects pre blocks containing code */
    div[class="section level1"]  pre,
    div[class="section level2"]  pre,
    div[class="section level3"]  pre,
    div[class="section level4"]  pre {
	font-weight: bold;
	padding-left: 1em;
	overflow: auto;   /* CSS2 */
	overflow-y: visible;  /* CSS3 */
	overflow-x: auto;     /* CSS3 */
	background-color: #eeeedd;
	border: 0.1em solid #ddddaa;
	border-radius: 0.5em;
    }

@media print {
    /* this affects pre blocks containing code */
    div[class="section level1"]  pre,
    div[class="section level2"]  pre,
    div[class="section level3"]  pre,
    div[class="section level4"]  pre {
	font-weight: bold;
	padding-left: 1em;
	background-color: #eeeedd;
	white-space: normal;
	overflow: auto;   /* CSS2 */
	text-overflow: ellipsis;
	border: 0.1em solid #ddddaa;
	border-radius: 0.5em;
    }
}

#TOC {
    margin-left: 2em;
    margin-right: 2em;
}

/* outline the whole TOC */
#TOC > ul {
    color: black;
    background-color: #dddddd ;
    border: 0.2em solid #bbbbbb ;
    border-radius: 0.9em;
}

/* set up hanging indents on list items in TOC */

#TOC li { text-indent: -1.2em ; }
#TOC li li { text-indent: -1.7em ; }
#TOC li li li { text-indent: -2.7em ; }

#TOC .toc-section-number {
    margin-right: 0.3em ;
    font-weight: bold;
}

#TOC a {
    text-decoration: none ;
}

/*
a {
    border: 0.2em hidden red ;
}
*/

/* this matches the class notes index hover */
#TOC a:hover {
    color: black ;
    background-color: #eeeeff ;
    outline: solid 0.1em ;
}

a:hover {
    color: black ;
    outline: dashed 0.1em ;
}

/* new pandoc uses <figure> */
div.figure, figure {
    text-align: center;
    border: 0.1em solid #ddddaa ;
    border-radius: 0.5em;
    background-color: #eeeedd ;
    margin-left: 2em;
    padding-top: 0.5em;
}

/* new pandoc uses <figcaption> */
div.figure p.caption, figcaption {
    border: 0.1em solid #ddddaa ;
    border-radius: 0.5em;
    margin: 0 2em 0 2em ;
}

blockquote {
    color: black ;
    background-color: #eeeecc ;
    border: 0.1em solid #ddddaa ;
    border-radius: 0.4em;
    font-style: italic ;
    padding-top: 0em;
    padding-bottom: 0em;
    padding-left: 0.5em;
    padding-right: 0.3em;
    margin-top: 0;
    margin-bottom: 0;
}

/* navbar navigation list */
body > ul {
    text-align: center;
    list-style-type: none;
    padding: 0;
}
body > ul > li {
    vertical-align: 0.7em;  /* needed when page is narrow */
    display: inline ;
    padding: 0.2em ;
    border: 0.2em solid #bbbbbb ;
    border-radius: 0.4em;
    color: black ;
    background-color: #dddddd ;
    white-space: nowrap ;
}
body > ul > li > a:link, body > ul > li > a:visited {
    font-weight: bold;
    font-variant: small-caps;
    text-align: center;
    text-decoration: none;
}
body > ul > li > a:hover, body > ul > li > a:active {
    color: black ;
    background-color: #eeeeff ;
    outline: solid 0.1em ;
}

/* link to index to all class notes */
/* div > h2:first-child + ul > li > a */
#from-the-class-notes-link-on-the-course-home-page > h2:first-child + ul > li > a {
    white-space: pre;
    text-decoration: none;
}

/* this matches the #TOC hover */
#from-the-class-notes-link-on-the-course-home-page > h2:first-child + ul > li > a:hover {
    color: black ;
    background-color: #eeeeff ;
    outline: solid 0.1em ;
}

/* the navbar2 floating TOC */
#from-the-class-notes-link-on-the-course-home-page > *:first-child + ul {
    float: right ;
    border: 0.2em solid #bbbbbb ;
    border-radius: 0.4em;
    padding: 0 0.2em 0 0.2em ;
    margin: 0 0 0.5em 1em ;
    color: black ;
    background-color: #dddddd ;
    font-weight: bold;
    font-variant: small-caps;
}
#from-the-class-notes-link-on-the-course-home-page > *:first-child + ul {
    list-style-type: none;
}
#from-the-class-notes-link-on-the-course-home-page > *:first-child + ul a {
    text-decoration: none;
}

/* OLD WAY: link to index to all class notes */
/*
#from-the-class-notes-link-on-the-course-home-page > p > a {
    float: right ;
    border: 0.2em solid ;
    padding: 0.2em ;
    color: black ;
    background-color: #dddddd ;
    font-weight: bold;
    font-variant: small-caps;
    text-align: center;
    text-decoration: none;
}
*/
/* NOT NEEDED link to index to all class notes */
/*
#from-the-class-notes-link-on-the-course-home-page > h2:first-child + ul > li {
    margin: 0 ;
    padding: 0;
    border: 0;
}
*/

/* signature block at page end tagged with id "signature" */
#signature {
    margin-left: 0em ;
    color: black ;
    background-color: #eeeecc ;
    border: 0.2em solid #ddddaa ;
    border-radius: 0.5em;
    padding: 0.5em;
    padding-left: 1.2em;
    overflow: auto;   /* CSS2 */
    overflow-y: visible;  /* CSS3 */
    overflow-x: auto;     /* CSS3 */
}
/* over-ride the bold usually used for code sections */
#signature > code {
    font-weight: normal;
}

/* LEGACY: signature block at page end */
/* and alas many other PRE code blocks ! */
/*
body > div > div > pre > code {
    color: black ;
    background-color: #eeeecc ;
}
*/

div#TOC ul, nav#TOC ul {
    list-style-type: none ;
}

/* the "updated" server-side includes */
div#TOC p.updated, nav#TOC p.updated {
    float: right;
    padding-right: 0.5em ;
    padding-left: 0.5em ;
    /* border: solid 0.1em ; */
    /* border-radius: 0.4em; */
    margin-right: 1em ;
    text-align: center ;
    font-variant: small-caps;
    font-size: 90%;
}

/* Insert a heading on the Table of Contents */
/* This is better: div#TOC > ul:first-of-type:before  */
div#TOC > ul:before, nav#TOC > ul:before {
    margin-left: -4% ;
    font-size: 150% ;
    content: "Table of Contents";
    font-weight: bold;
    /* font-family: ubuntu, verdana, helvetica, times; */
    font-variant: small-caps;
    white-space: nowrap ;
    /* display: block ; */
}

/* Tell students not to print the course notes! */
/* Algonquin NOT USED
@media print {
    body:before {
	font-size: 150% ;
	font-weight: bold;
	font-variant: small-caps;
	content: "Do Not Print Class Notes! You won't see the updates. The hyperlinks don't work. Content will be cut off on the right.";
	border: double 0.5em ;
	border-radius: 1em;
	margin: 2em;
	padding: 1em;
        display: block;
    }
}
NOT USED */

/* The "premailer" program inserts *all* media types! */
/* We have to over-ride the print media above with nothing. */
/* Algonquin NOT USED
@media screen {
    body:before {
	content: "";
	display: none ;
	visibility: hidden ;
	border: none ;
	padding: 0 ;
	margin: 0 ;
    }
}
NOT USED */

/* We do want some left padding even when no section number */
/* Keep 0.5em of left padding; don't remove it all. */
h1 {
    font-size: 150% ;
    color: #990000 ;
    background-color: #eeddaa ;
    border: 0.1em solid #ddcc66 ;
    border-radius: 0.4em;
    padding: 0.1em ;
    padding-left: 1.6em ;
    text-indent: -1.1em ;
    clear: both ;
}
/* Have to increase pad and indent when week numbers are used in headings */
body.weeknotes h1 {
    padding-left: 2.6em ;
    text-indent: -2.1em ;
}

div.section > h1 > a,
div.section > h2 > a,
div.section > h3 > a,
div.section > h4 > a  {
    color: inherit ;
    text-decoration: none;
}

/* We do want some left padding even when no section number */
/* Keep 0.5em of left padding; don't remove it all. */
h2 {
    font-size: 120% ;
    color: #660000 ;
    background-color: #eeddaa ; /* let color through Jan 2013 -IAN! */
    border: 0.1em solid #ddcc66 ;
    border-radius: 0.4em;
    margin-left: 0.8em ;
    padding-left: 2.3em ;
    text-indent: -2.0em ;
    clear: both ;
}
/* Have to increase pad and indent when week numbers are used in headings */
body.weeknotes h2 {
    padding-left: 3.4em ;
    text-indent: -3.0em ;
}

/* We do want some left padding even when no section number */
/* Keep 0.5em of left padding; don't remove it all. */
h3 {
    color: #660000 ;
    background-color: #eeddaa ;  /* add color Jan 2013 -IAN! */
    border: 0.1em solid #ddcc66 ;
    border-radius: 0.4em;
    margin-left: 1.2em ;
    padding: 0 ;
    padding-left: 3.0em ;
    text-indent: -2.7em ;
}
/* Have to increase pad and indent when week numbers are used in headings */
body.weeknotes h3 {
    padding-left: 4.2em ;
    text-indent: -3.8em ;
}
/* new pandoc has <header> section */
#header > h2, #header > h3, header > h2, header > h3 {
    padding: 0;
    margin: 0;
    border: 0;
    font-size: 80%;
    background-color: transparent ;
}

/* We do want some left padding even when no section number */
/* Keep 0.5em of left padding; don't remove it all. */
/* The margin-left is using the smaller font and smaller em size */
h4 {
    color: #660000 ;
    background-color: #eeddaa ;  /* add color Jan 2013 -IAN! */
    border: 0.1em solid #ddcc66 ;
    border-radius: 20% ;   /* this is kind of a neat look Feb 2015 */
    margin-left: 2.0em ;
    padding: 0 ;
    padding-left: 3.9em ;
    text-indent: -3.6em ;
}
/* Have to increase pad and indent when week numbers are used in headings */
body.weeknotes h4 {
    padding-left: 5.0em ;
    text-indent: -4.6em ;
}

/* new pandoc 1.9 has these extra lines after title */
.author, .date {
    /* visibility: hidden ; display: none ; */
    font-size: 80% ;
    font-weight: bold ;
    color: #660000 ;
    border: none ;
    padding: 0 ;
    margin: 0 ;
}

/* new pandoc has <header> section */
#header, header {
    text-align: center ;
}

.header-section-number {
    margin-right: 0.3em ;
}

.uri {
    font-weight: bold ;
    font-family: courier, monospace, fixed ;
}

/* .floatright: Used for right-justified file names in assignments */
/* Pandoc: a single dash section attribute is the same as .unnumbered */
/* New pandoc uses h3.floatright */
div.floatright h3, h3.floatright {
    margin-top: 0.25em ;
    margin-bottom: 0.25em ;
    clear: right ;
    float: right;
    border: 0.2em solid #00dd00 ;
    border-radius: 20% ;   /* this is kind of a neat look Feb 2015 */
    font-size: 90% ;
    color: #000000 ;
    background-color: #EEEEEE ;
}

dt {
    font-weight: bold ;
}

.uptoTOC {
    float: right;
    font-style: italic;
    font-size: small ;
    /* white-space: nowrap ; needed for IE not to fold it */
    /* background-image: url('common/toparrow.gif'); */
}

.uptoTOC img {
    vertical-align: middle;
    border: 0;
    margin: 0 0 0 0.3em;
    padding: 0;
    font-size: xx-large;
}

/* use a right square bracket in the title= in an image to float it right */
img[title*="]"] {
    float: right ;
    margin: 0 0 1em 1em ;
    border: 0.1em solid #990000 ;
    border-radius: 1em ;
}

/* all images stay inside their containers */
/* http://www.cssnewbie.com/sizing-images-responsively/ */
img {
    width: auto;
    max-width: 100%;
    height: auto;
}

/* <div class="allbox"> for tables with all grid lines */
div.allbox td, div.allbox th, div.allbox table {
    border: 1px solid black ;
    border-collapse: collapse ;
}
