/* OpenIntro custom environments */
/* Based on custom block code above, and made to look similar to OS4 styling */

/* chapterintro */

.chapterintro {
  padding: 1em 1em 1em 4em;
  margin-bottom: 10px;
  background: #d5e6ef 5px center/3em no-repeat;
  border-top: 3px solid #569BBD;    /* openintro::COL[1,1] */ 
  border-bottom: 3px solid #569BBD; /* openintro::COL[1,1] */ 
  background-image: url("../images/_icons/chapterintro.png");
  background-position: 0.5em 1.5em;
}

/* exercise */

.exercise {
  padding: 1em 1em 1em 1em;
  background: #f5f5f5 5px center/3em no-repeat;
  margin-top: 30px;
  margin-bottom: 30px;
  /*border-top: 1px solid #D9D9D9;
  border-bottom: 1px solid #D9D9D9;*/
}

/* guidedpractice */

.guidedpractice {
  padding: 1em 1em 1em 4em;
  margin-top: 30px;
  margin-bottom: 30px;
  background: #f8f8f8 5px center/3em no-repeat;  
  border-top: 1px solid #569BBD;    /* openintro::COL[1,1] */ 
  border-bottom: 1px solid #569BBD; /* openintro::COL[1,1] */ 
  background-image: url("../images/_icons/guided-practice.png");
  background-position: 0.5em 1em;
}

.guidedpractice:before {
  content: "Guided practice";
  clear: right;
  display: block;
  font-weight: bold;
  font-variant: small-caps;
  color: #569BBD;
}

/* workedexample */

.workedexample{
  padding: 1em 1em 1em 4em;
  margin-top: 30px;
  margin-bottom: 30px;
  background: #f8f8f8 5px center/3em no-repeat; 
  border-top: 1px solid #569BBD;    /* openintro::COL[1,1] */ 
  border-bottom: 1px solid #569BBD; /* openintro::COL[1,1] */ 
  background-image: url("../images/_icons/worked-example.png");
  background-position: 0.5em 1em;
}

.workedexample:before {
  content: "Example:";
  clear: right;
  display: block;
  font-weight: bold;
  font-variant: small-caps;
  color: #569BBD;
}

/* important */

.important {
  padding: 1em 1em 1em 4em;
  margin-top: 30px;
  margin-bottom: 30px;
  background: #f5f5f5 5px center/3em no-repeat;
  border-top: 1px solid #E97583;   
  border-bottom: 1px solid #E97583;  
  background-image: url("../images/_icons/important.png");
  background-position: 0.5em 1em;
}

.important strong {
  color: #E97583; 
}

/* tip */

.tip {
  padding: 1em 1em 1em 4em;
  margin-bottom: 10px;
  background: #f5f5f5 5px center/3em no-repeat;
  border-top: 1px solid #D9D9D9;    /* openintro::COL[6,1] */ 
  border-bottom: 1px solid #D9D9D9; /* openintro::COL[6,1] */ 
  background-image: url("../images/_icons/tip.png");
  background-position: 0.5em 1em;
}

/* cautionbox */

.caution {
  padding: 1em 1em 1em 4em;
  margin-top: 30px;
  margin-bottom: 30px;
  background: #f5f5f5 5px center/3em no-repeat;
  border-top: 1px solid #E97583;
  border-bottom: 1px solid #E97583;
  background-image: url("../images/_icons/stop-sign.png");
  background-position: 0.5em 1em;
}

/* data - datasets in package */

.data { 
  padding: 1em 1em 1em 4em;
  margin-bottom: 10px;
  margin-top: 10px;
  background: #f5f5f5 5px center/3em no-repeat;
  border-top: 1px solid #D9D9D9;    /* openintro::COL[6,1] */ 
  border-bottom: 1px solid #D9D9D9; /* openintro::COL[6,1] */ 
  background-image: url("../images/_icons/data.png");
}

/* pronunciation - terms and Greek letters */

.pronunciation { 
  padding: 1em 1em 1em 4em;
  margin-bottom: 30px;
  margin-top: 30px;
  background: #f5f5f5 5px center/3em no-repeat;
  border-top: 1px solid #D9D9D9;    /* openintro::COL[1,1] */ 
  border-bottom: 1px solid #D9D9D9; /* openintro::COL[1,1] */ 
  background-image: url("../images/_icons/pronunciation.png");
}

/* tutorials */

.singletutorial {
  padding: 1em 1em 1em 4em;
  margin-bottom: 5px;
  margin-left: 30px;
  background: #ffffff 5px center/3em no-repeat;
  background-image: url("../images/_icons/singletutorial.png");
}

.alltutorials {
  padding: 1em 1em 1em 4em;
  margin-bottom: 10px;
  background: #ffffff 5px center/3em no-repeat;
  background-image: url("../images/_icons/alltutorials.png");
}

/* labs */

.singlelab {
  padding: 1em 1em 1em 4em;
  margin-bottom: 10px;
  background: #ffffff 5px center/3em no-repeat;
  background-image: url("../images/_icons/singlelab.png");
}

/* underconstruction - for chapters under construction */

.underconstruction { 
  padding: 1em 1em 1em 4em;
  margin-bottom: 10px;
  font-weight: bold;
  background: #F3CED4 5px center/3em no-repeat; 
  border-top: 1px solid #F05133;    /* COL["red", "full"] */
  border-bottom: 1px solid #F05133; /* COL["red", "full"] */
  background-image: url("../images/_icons/under-construction.png");
}

/* todo - REMOVE ALL BEFORE PRINT!!! */

.todo { 
  padding: 1em 1em 1em 4em;
  margin-bottom: 10px;
  background: #fffacd 5px center/3em no-repeat;
  border-top: 1px solid #f4dc00;    /* openintro::COL[6,1] */ 
  border-bottom: 1px solid #f4dc00; /* openintro::COL[6,1] */ 
  background-image: url("../images/_icons/to-do.png");
  font-weight: bold;
}

.todo:before {
  content: "TO DO: ";
}

/* Counting exercises */

.exercises ol ol { 
  list-style-type: lower-alpha !important; 
}

.exercises ol ol ol { 
  list-style-type: lower-roman !important; 
}

.exercises strong {
  color: #569BBD; /* openintro::COL[1,1] */ 
}

/* Counting exercise solutions - odd numbers only */

.exercises-solution ol {
  counter-reset: odd-numbers -1;
  list-style-type: none !important;
}
.exercises-solution li {
  counter-increment: odd-numbers 2;
}
.exercises-solution li:before {
  content: counter(odd-numbers) ". ";
}
.exercises-solution p {
  display: inline;
}

/* Other formatting */

p.caption {
  color: #777;
  margin-top: 10px;
  text-align: left;
}
p code {
  white-space: inherit;
}
pre {
  word-break: normal;
  word-wrap: normal;
}
pre code {
  white-space: inherit;
}
p.flushright {
  text-align: right;
}
blockquote > p:last-child {
  text-align: right;
}
blockquote > p:first-child {
  text-align: inherit;
}

/* Headings */

.header-section-number {
  padding-right: .2em;
  font-weight: 500;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
  color: #569BBD; /* openintro::COL[1,1] */ 
}
h1.title {
  font-weight: 700;
}
h1 {
  border-bottom: 3px solid;
  border-top: 3px solid;
}
h2 {
  border-bottom: 3px solid #E97583;
  border-top: 3px solid #E97583;
}
h3 {
  border-top: 1px solid #D9D9D9; /* openintro::COL[7,1] */
}

.welcome h1 {
  border-bottom: 0px solid;
  border-top: 0px solid;
}

.welcome h2 {
  border-bottom: 0px solid;
  border-top: 0px solid;
}


/* Fonts */

.smallcaps {
  font-variant: small-caps;
}
.book .book-body .page-wrapper .page-inner section.normal strong {
  font-weight: 600;
}

/* moved this out of Chp 1 but not sure if it's being used anywhere */

.column-left{
  float: left;
  width: 49%;
  text-align: left;
}
.column-right{
  float: right;
  width: 49%;
  text-align: left;
}

/* overwrite bs4_book style */

img.cover {
  box-shadow: none;
}

.inline-figure {
  border: none;
}

/* authorinfo */

.authorinfo {
  padding: 0em 0em 0em 0em;
}

/* wrap long math lines */

.mjx-chtml {
  /*white-space: normal !important;*/
  font-size: 100%;
}

/* restart footnote counter at each chapter */
/* https://github.com/rstudio/bookdown/issues/589#issuecomment-701044587 */
/* doesn't work for bs4_book, update when resolved */

.Rout {
  background-color: white !important;
  background-image: none !important;
}