/*                    DO NOT EDIT THE COMMENTS BELOW                         */
/*----------  Custom Style Sheet for the QCBS R Workshop Series   ---------- */
/*  Heavily inspire in rstudio4edu/rstudio4edu-book. Developed and modified  */
/* by Pedro Henrique P. Braga and maintained  by the coordinators and        */
/* contributors of the QCBS R Workshop Series                                */
/*                                                                           */
/* This template has been obtained from QCBSRworkshops/templateWorkshops     */
/*                                                                           */
/* The current framework will always replace local copies with               */
/* one available within the QCBSRworkshops/templateWorkshops repository.     */
/* This means that one must never change local qcbsR-*.css files locally.    */
/*                                                                           */
/* If you would like to suggest changes to the template structure (e.g. css) */
/* add an issue or a pull request to the template repository.                */
/*                                                                           */
/*                     END OF DO NOT EDIT COMMENTS                           */


/*--------------- Importing fonts from Google Fonts ------------------*/


@import url('https://fonts.googleapis.com/css?family=Abril+Fatface|Karla:400, 400i, 700, 700i | Lora:400, 400i, 700, 700i & display=swap');
@import url('https://cdn.jsdelivr.net/gh/tonsky/FiraCode@1.206/distr/fira_code.css');
@import url('https://fonts.googleapis.com/css?family=Roboto+Slab&display=swap');
@import url('https://fonts.googleapis.com/css?family=Fira+Sans:200,200i 300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i&display=swap');

/*--------------- Basic edit to code, captions    ------------------*/


p.caption {
  color: #777;
  margin-top: 10px;
}
p code {
  white-space: inherit;
}
pre {
  word-break: normal;
  word-wrap: normal;
}
pre code {
  white-space: inherit;
}

/*--------------- Setting the hero image up ----------------------*/
/* Sets the large hero image at top of each page and pushes down  */ 
/* the book content to appear beneath the image                   */
  /* background-image: url("images/books.jpg");*/
 /*
.hero-image-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background-color: #3fb5bd;
}

.hero-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.page-inner {
  padding-top: 130px !important;
}
*/

/*---- Defining link settings ----*/

.book .book-body .page-wrapper .page-inner section.normal a {
  color: #307494;
}

a > code {
  color: #307494;
}

a:hover {
  font-weight: 400;
  text-decoration-style: underline;
}

/*----- Defining body and header settings ----- */

.book.font-family-1 {
  font-family: 'Roboto', arial, sans-serif;
}

h1, h2, h3, h4 {
  font-family: 'Roboto', arial, sans-serif;
}

.book .book-body .page-wrapper .page-inner section.normal h1, 
.book .book-body .page-wrapper .page-inner section.normal h2, 
.book .book-body .page-wrapper .page-inner section.normal h3, 
.book .book-body .page-wrapper .page-inner section.normal h4, 
.book .book-body .page-wrapper .page-inner section.normal h5, 
.book .book-body .page-wrapper .page-inner section.normal h6 {
    margin-top: 2.275em;
    margin-bottom: 1em;
}

.title {
  font-family: 'Roboto Slab';
  font-weight: normal;
  color: #3fb5bd;
  margin-top: 0.275em !important;
}

.subtitle {
  font-family: 'Roboto',  sans-serif;
  font-style: normal !important;
  font-weight: lighter; 
  color: #0b8d96;
}


/*-------- TOC - Table of Contents  ---------*/

.book .book-summary {
  background: white;
  border-right: none;
}

.summary{
  font-family: 'Roboto', sans-serif;
}

/* all TOC list items, basically */
.book .book-summary ul.summary li a, 
.book .book-summary ul.summary li span {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 15px;
  padding-right: 15px;
  color: #324748;
}

.summary a:hover {
  color: #3ea2aad9 !important;
} 

.book .book-summary ul.summary li.active>a { /*active TOC links*/
  color: #379fa7 !important;
  border-left: solid 4px;
  border-color: #379fa7;
  padding-left: 11px !important;
} 


li.appendix span, li.part span { /* for TOC part names */
  margin-top: 1em;
  color: #000000;
  opacity: .9 !important;
  text-transform: uppercase;
}

.part + li[data-level=""] { /* grabs first .chapter immediately after .part...but only those ch without numbers */
 text-transform: uppercase;
}


/* The next two rules make the horizontal line go straight across in top navbar */

.summary > li:first-child {
	height: 50px;
	padding-top: 10px;
	border-bottom: 1px solid rgba(0,0,0,.07);
}

.book .book-summary ul.summary li.divider {
	height: 0px;
}


/*--- TOC LOGO ---*/

.toc-logo {
  width: 275px !important;
  object-fit: contain;
  margin: 0 auto;
}

.toc-logo img {
  max-width: 100%;
  margin-bottom: 10px;
}

.summary > li:first-child {
  height: auto !important; 
}


/* -------------- Two columns --------------- */

.two-col {
  columns: 2 200px;         /* number of columns and width in pixels*/
  -webkit-columns: 2 200px; /* chrome, safari */
  -moz-columns: 2 200px;    /* firefox */
}

/* -------------- Three columns --------------- */


.three-col {
  columns: 3 133px;         /* number of columns and width in pixels*/
  -webkit-columns: 3 133px; /* chrome, safari */
  -moz-columns: 3 133px;    /* firefox */
}

/* -------------- Even two column split --------------- */

.split {
  display: flex;
}

.split-left {
  width: 50%;
  padding-right: 10px;
}

.split-right {
  width: 50%;
  padding-left: 10px;
}

/* -------------- Uneven two column split --------------- */


.uneven-split-left {
  width: 40%;
  padding-right: 10px;
}

.uneven-split-right {
  width: 59%;
  padding-left: 10px;
}

/* -----------Sidebar div tips------------- */
/* from r-pkgs.org and rstudio4edu */

  div.puzzle, div.explanation, div.noway, div.angry {
    padding: 1em;
    margin: 1em 0;
    padding-left: 100px;
    background-size: 70px;
    background-repeat: no-repeat;
    background-position: 15px center;
    min-height: 100px;
    color: #15395d;
    background-color: #edf3f9;
    border: solid 5px #f9fbfd;
  }

div.puzzle {
  background-image: url("../assets/images/puzzle_icon.png");
}

div.explanation {
 background-image: url("../assets/images/math_icon.png");
}

div.noway {
  background-image: url("../assets/images/noway_icon.png");
}

div.angry {
  background-image: url("../assets/images/angry_icon.png");
}

div.tip {
  background-image: url("../assets/images/lightbulb.png");
}

/* from rstudio4edu */
/* .book .book-body .page-wrapper .page-inner section.normal is needed
   to override the styles produced by gitbook, which are ridiculously
   overspecified. Goal of the selectors is to ensure internal "margins"
   controlled only by padding of container */

.book .book-body .page-wrapper .page-inner section.normal div.rstudio-tip > :first-child,
.book .book-body .page-wrapper .page-inner section.normal div.tip > :first-child {
  margin-top: 0;
}

.book .book-body .page-wrapper .page-inner section.normal div.rstudio-tip > :last-child,
.book .book-body .page-wrapper .page-inner section.normal div.tip > :last-child {
  margin-bottom: 0;
}

iframe { 
   -moz-transform-origin: top left; 
   -webkit-transform-origin: top left; 
   -o-transform-origin: top left; 
   -ms-transform-origin: top left; 
   transform-origin: top left; 
}

.iframe-container {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: #ddd 2px solid;
  box-shadow: #888 0px 5px 8px;
  margin-bottom: 1em;
}

.iframe-container > iframe {
  border: none;
}

/* -------Clipboard copy button --------- */
/* ------ from rstudio4edu-book --------- */

.copy {
  width: inherit;
  background-color: #e2e2e2 ;
  border: none;
  border-radius: 2px;
  float: right;
  font-size: 60%;
  padding: 4px 4px 4px 4px;
}

/* for new copy button */

.hasCopyButton {
  position: relative;
}

.btn-copy-ex {
  position: absolute;
  right: 0;
  top: 0;
  visibility: hidden;
}

.hasCopyButton:hover button.btn-copy-ex {
  visibility: visible;
}

/* -----------Section anchors -------------*/

.book .book-body .page-wrapper .page-inner section.normal {
  overflow: visible !important; /*so anchor link doesn't get cut off */
}

a.anchor {
  margin-left: -30px;
  padding-right: 3px;
  display:inline-block;
  width: 30px;
  height: 30px;
  /*visibility: hidden;*/
  background-image: url(https://image.flaticon.com/icons/svg/34/34735.svg) !important;
  background-repeat: no-repeat !important;
  background-size: 20px 20px !important;
  background-position: center bottom !important;
  opacity: 0;
}


.hasAnchor:hover a.anchor, 
a.anchor:hover {
  /*visibility: visible;*/
  opacity: 0.6;
}

/* disable anchors for headers with "no-anchor" class */
.no-anchor .hasAnchor:hover a.anchor, 
.no-anchor a.anchor:hover {
  opacity: 0 !important;
}

@media (max-width: 1144px) { /* don't show anchor link on small screens */
  .hasAnchor:hover a.anchor {
    visibility: hidden;
  }
}

/*____Code chunks____*/

.sourceCode {
  margin-bottom: 0.85em; /* adds same amount of margin as a <p> would */
}

.sourceCode pre {
  margin: 0 !important; /* makes space above and below symmetrical*/
}

/* Footer */

.footer {
  font-family: "Open Sans", sans-serif;
  font-size: .85em;
  color: #2ea8b3;
}