/* Title slide */
slides > slide > .gdbar img {
  width: auto;
  height: 150px;
  max-width: 300px;
  margin: 10px 10px 10px auto;
}

slides > slide > .gdbar {
  width: 400px;
  height: 170px;
}

slides > slide.title-slide hgroup h1 {
  line-height: 1;
}

/* segue slide */

slides > slide.segue article {
  text-align: right;
}



/* slide */

slides > slide {
  color: black;
}

slides > slide ul {
  line-height: 1em;
}

slides > slide article ul li::before {
  content: '';
}

slides > slide article ul {
  list-style-type: disc;
}

slides > slide article ul > li > ul {
  list-style-type: circle;
}

/* header */

slides > slide > hgroup.title-bar {
  display: flex;
  display: -webkit-flex;
  justify-content: space-between;
  -webkit-justify-content: space-between;
  min-height: 45px;
}

slides > slide > hgroup > h2, slides > slide > hgroup > h3 {
  line-height: 100%;
  font-size: 30px;
}

slides > slide > hgroup > h3 {
  font-style: italic;
  text-align: right;
}

/* Footer */

slides > .nobackground > .footer  {
   visibility: hidden;
}

slides > .nobackground + .footer {
  visibility: hidden;
}

slides > slide:not(.nobackground) > .footer {
  position: absolute;
  bottom: 20px;
  left: 60px;
  line-height: 1.9;
  font-size: 12pt;
  font-style: italic;
}

slides > slide > .footer > img {
  max-height: 30px;
  vertical-align: text-bottom;;
  margin-right: 8px;
  /* Preventing image to be draggable as it is not a css background image anymore
  http://stackoverflow.com/questions/12906789/preventing-an-image-from-being-draggable-or-selectable-without-using-js */
  /*user-drag: none; */
  user-select: none;
  -moz-user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  pointer-events: none;
}

slides > slide > .footer > a {
  border-bottom: none;
}

/* article */

slides > slide > hgroup + article {
  display: flex;
  display: -webkit-flex;
  flex-wrap: wrap;
  -webkit-flex-wrap: wrap;
  align-items: flex-start;
  -webkit-align-items: flex-start;
  width: 100%;
  margin-top: 0;
}

slides > slide > hgroup.title-bar + article {
  max-height: calc(100% - 45px);
}

slides > slide > hgroup:not(.title-bar) + article {
  max-height: 100%;
}

slides > slide > .column {
  flex-direction: column;
  -webkit-flex-direction: column;
  /*justify-content: space-between;
  -webkit-justify-content: space-between;*/
}

slides > slide > .column.bottom {
  justify-content: flex-end;
  -webkit-justify-content: flex-end;
}

slides > slide > .column.top {
  justify-content: flex-start;
  -webkit-justify-content: flex-start;
}

slides > slide > .column.middle {
  justify-content: center;
  -webkit-justify-content: center;
}

slides > slide > .middle {
  min-height: calc(100% - 90px);
}

slides > slide article strong {
  font-weight: bold;
}

slides > slide article em {
  font-style: italic;
}

slides > slide > hgroup + article p {
  margin-bottom: 0.5em;
  width: 100%;
}

p:last-child, ul:last-child {
  margin-bottom: 0;
}

/*
  Bootstrap like grid
  from http://www.w3schools.com/css/css_rwd_grid.asp
*/

* {
  box-sizing: border-box;
}

.col-1 {width: 6.33%;}
.col-2 {width: 14.66%;}
.col-3 {width: 23%;}
.col-4 {width: 31.33%;}
.col-5 {width: 39.66%;}
.col-6 {width: 48%;}
.col-7 {width: 56.33%;}
.col-8 {width: 64.66%;}
.col-9 {width: 73%;}
.col-10 {width: 81.33%;}
.col-11 {width: 89.66%;}
.col-12 {width: 98%;}

.col.offset-1 {margin-left: 9.33%;}
.col.offset-2 {margin-left: 17.66%;}
.col.offset-3 {margin-left: 26%;}
.col.offset-4 {margin-left: 34.33%;}
.col.offset-5 {margin-left: 42.66%;}
.col.offset-6 {margin-left: 51%;}
.col.offset-7 {margin-left: 59.33%;}
.col.offset-8 {margin-left: 67.66%;}
.col.offset-9 {margin-left: 76%;}
.col.offset-10 {margin-left: 84.33%;}
.col.offset-11 {margin-left: 92.66%;}

.col .col-1 {width: 8.33%;}
.col .col-2 {width: 16.66%;}
.col .col-3 {width: 25%;}
.col .col-4 {width: 33.33%;}
.col .col-5 {width: 41.66%;}
.col .col-6 {width: 50%;}
.col .col-7 {width: 58.33%;}
.col .col-8 {width: 66.66%;}
.col .col-9 {width: 75%;}
.col .col-10 {width: 83.33%;}
.col .col-11 {width: 91.66%;}
.col .col-12 {width: 100%;}

.col .offset-1 {margin-left: 8.33%;}
.col .offset-2 {margin-left: 16.66%;}
.col .offset-3 {margin-left: 25%;}
.col .offset-4 {margin-left: 33.33%;}
.col .offset-5 {margin-left: 41.66%;}
.col .offset-6 {margin-left: 50%;}
.col .offset-7 {margin-left: 58.33%;}
.col .offset-8 {margin-left: 66.66%;}
.col .offset-9 {margin-left: 75%;}
.col .offset-10 {margin-left: 83.33%;}
.col .offset-11 {margin-left: 91.66%;}

.col {
  margin: 13px 1%;
}

.col > h3 {
  line-height: 35px;
  font-size: 25px;
}

.col img {
  max-width: 100%;
  max-height: 100%;
}

.col .col {
  margin: 0;
}

.nofit img {
  max-width: none;
  max-height: none;
}


/* boxes */
.box > h3:first-child {
  margin: -15px -15px 10px -15px;
  padding-left: 10px;
  padding-bottom: 5px;
}

.box {
  padding: 15px;
  overflow: hidden;
  border-radius: 5px;
  border: 1px solid lightgray;
  box-shadow: 10px 10px 8px 1px rgba(0, 0, 0, 0.2), 1px 3px 3px 2px rgba(0, 0, 0, 0.5);
}

.box .box {
  box-shadow: none;
}

.box.stretch {
  align-self: stretch;
  -webkit-align-self: stretch;
}

.box.bottom {
  align-self: flex-end;
  -webkit-align-self: flex-end;
}

.box.middle, .middle > .box {
  align-self: center;
  -webkit-align-self: center;
}

/* tables */

/* adapted from the bootstrap theme to allow compatibility with kableExtra */

table {
  background-color: transparent;
}

caption {
  padding-top: 8px;
  padding-bottom: 8px;
  text-align: left;
}

.table {
  border-collapse: collapse !important;
  width: auto;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}

.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
  padding: 8px;
  line-height: 1.42857143;
  vertical-align: top;
  border-top: 1px solid #ddd;
}
.table > thead > tr > th {
  vertical-align: bottom;
  border-bottom: 2px solid #ddd;
}

.table > caption + thead > tr:first-child > th,
.table > colgroup + thead > tr:first-child > th,
.table > thead:first-child > tr:first-child > th,
.table > caption + thead > tr:first-child > td,
.table > colgroup + thead > tr:first-child > td,
.table > thead:first-child > tr:first-child > td {
  border-top: 0;
}

.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > th,
.table-condensed > tfoot > tr > th,
.table-condensed > thead > tr > td,
.table-condensed > tbody > tr > td,
.table-condensed > tfoot > tr > td {
  padding: 5px;
}

.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td {
  border-bottom-width: 2px;
}

/* default as in bootstrap: overriden by box colours*/
.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #f9f9f9;
}

/* Default border colour is #ddd as in bootstrap: overriden by box colours*/

.table-bordered, .table-bordered th, .table-bordered td{
  border: 1px solid #ddd;
}
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
  border: 1px solid #ddd;
}


/* blockquotes */

/* from https://codepen.io/maxds/pen/DcveB */

article blockquote {
  display: block;
  background: #f9f9f9;
  padding: 15px 20px 15px 45px;
  margin: 13px 1%;
  position: relative;
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1.2;
  box-shadow: 10px 10px 8px 1px rgba(0, 0, 0, 0.2), 1px 3px 3px 2px rgba(0, 0, 0, 0.5);
  border-radius: 5px;
  border: 1px solid #999;
  border-left: 15px solid #ccc;
}

article blockquote::before {
  content: "\201C"; /*Unicode for Left Double Quote*/
  font-family: Georgia, serif;
  font-size: 60px;
  font-weight: bold;
  color: #999;
  position: absolute;
  left: 10px;
  top:5px;
}

slides > slide article blockquote::after {
  /*Reset to make sure*/
  content: "";
}

/* Cite styling adapted from http://www.webmaster-source.com/2012/04/24/pure-css-blockquote-styling/ */
cite {
  font-style: italic;
  font-size: 14px;
  display: block;
  margin-top: 5px;
}

cite:before {
  content: "\2014 \2009";
}

/* inline code */

code {
  color: #c7254e;
  padding: 0 2px;
  background-color: rgba(255, 255, 255, 0.3);
}

/* code chunks */
.chunk {
  padding: 0 !important;
}

.chunk > * {
  overflow: hidden;
}

.box.chunk {
  display: flex;
  display: -webkit-flex;
  flex-wrap: wrap;
  -webkit-flex-wrap: wrap;
}

pre {
  margin: 0;
}

slides > slide > article > pre {
  margin-bottom: 15px;
}

.chunk > pre:not(.prettyprint) {
  background: #bfccd7;
  /*padding-bottom: 15px;*/
}

.chunk > pre:first-child {
  padding-top: 15px;
}

.chunk > pre:last-child {
  padding-bottom: 15px;
}

.chunk .col:nth-last-child(1), .chunk .col:nth-last-child(2) {
  padding-bottom: 15px;
}

.chunk .col:nth-child(1), .chunk .col:nth-child(2) {
  padding-top: 15px;
}

.chunk .col {
  margin: 0;
  /*padding: 15px 0;*/
  padding: 0;
}

.box.chunk > h3:first-child {
  margin: 0;
  width: 100%;
}

.chunk .r-output {
  display: flex;
  display: -webkit-flex;
  align-items: flex-end;
  -webkit-align-items: flex-end;
  background: #bfccd7;
}

.chunk img {
  display: block;
  margin: auto;
  padding: 5px 0;
}

pre {
  height: 100%;
  left: 0;
  padding: 0 15px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

pre.prettyprint {
  background: #2b557a;
  color: #ffffff;
  /*border-left: 15px solid #002240;*/
}

pre.prettyprint .str { color: #3ad900; } /* string      */
pre.prettyprint .kwd { color: #ff9d00; } /* keyword     */
pre.prettyprint .com { color: #0088ff; } /* comment     */
pre.prettyprint .typ { color: #bfa4a4; } /* type        */
pre.prettyprint .lit { color: #ff80e1; } /* literal     */
pre.prettyprint .pun { color: #bed6ff; } /* punctuation */
pre.prettyprint .pln { /* plaintext   */
  color: #9effff;
  font-weight: bold;
}
pre.prettyprint .tag { color: #9effff; } /* tag         */
pre.prettyprint .dec { color: #fff; }    /* declaration #ff9d00*/
/* End of prettyprint*/

pre:not(.prettyprint) {
  color: #51283e !important;;
}

.codefont pre {
  font-size: 11px;
  line-height: 9px;
}

/* Style for keyboard keys */
/* From http://meta.superuser.com/questions/4788/css-for-the-new-kbd-style */
kbd
{
  -moz-border-radius:3px;
  -moz-box-shadow:0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset;
  -webkit-border-radius:3px;
  -webkit-box-shadow:0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset;
  background-color:#f7f7f7;
  border:1px solid #ccc;
  border-radius:3px;
  box-shadow:0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset;
  color:#333;
  display:inline-block;
  font-family:Arial,Helvetica,sans-serif;
  font-size: calc(100% - 0.2em);
  margin:0 .1em;
  padding:.1em .6em;
  text-shadow:0 1px 0 #fff;
}

/* css font sizes xx-small to xx-large are abosolute sizes based on the browser default value
https://www.w3schools.com/cssref/pr_font_font-size.asp
Here we map the names to a relative increase or decrease */

article {
  font-size: 26px; /* already defined in the main css for slide */
}

article.smaller {
  font-size: 20px; /* adding the smaller variant to article to allow relative sizes */
  line-height: 1.2em;
}

article.smaller .table td, article.smaller .table th {
  font-size: inherit;
}

slides > slide article.smaller p, slides > slide article.smaller ul, slides > slide article.smaller ol {
  line-height: 1.2em; /* overriding to allow relative line-heights...*/
}

.xx-small, article.smaller .xx-small, article.smaller .xx-small p, article.smaller .xx-small ul, article.smaller .xx-small ol {
  font-size: 62.5%;
}
.x-small, article.smaller .x-small, article.smaller .x-small p, article.smaller .x-small ul, article.smaller .x-small ol {
  font-size: 75%;
}
.small, article.smaller .small, article.smaller .small p, article.smaller .small ul, article.smaller .small ol {
  font-size: 87.5%;
}
.medium, article.smaller .medium, article.smaller .medium p, article.smaller .medium ul, article.smaller .medium ol {
  font-size: 100%;
}
.large, article.smaller .large, article.smaller .large p, article.smaller .large ul, article.smaller .large ol {
  font-size: 112.5%;
}
.x-large, article.smaller .x-large, article.smaller .x-large p, article.smaller .x-large ul, article.smaller .x-large ol {
  font-size: 125%;
}
.xx-large, article.smaller .xx-large, article.smaller .xx-large p, article.smaller .xx-large ul, article.smaller .xx-large ol {
  font-size: 150%;
}

article .to-build {
  visibility: hidden;
}
