/* Much of the css in this file has been copied with HUGE THANKS from 
https://rstudio4edu.github.io/rstudio4edu-book/book-fancy.html#book-fancy */

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

/* 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;
}

/*____Code Chunks____*/
.sourceCode pre {
  margin: 0 !important; /* makes space above and below symmetrical*/
}
.sourceCode {
  margin-bottom: 0.85em; /* adds same amount of margin as a <p> would */
}

/* Fonts */
 .book.font-family-1 {
  font-family: 'Open Sans', sans-serif;
 }
 h1, h2, h3, h4 {
  font-family: 'Merriweather', serif;
  /*color: #2f5275;*/
}
.title {
  font-family: 'Merriweather', serif;
  font-size: 3em !important;
  /*color: #5699cc;*/
 }
.subtitle {
  font-family: 'Merriweather', serif;
  /*color: #2c6793;*/
}

/* Make space for the logo on top left of book */
.toc-logo {
  width: 250px !important;
  object-fit: contain;
  margin: 0 auto;
  display: block;
  text-align: center;
}
.toc-logo img {
  max-width: 100%;
  margin-bottom: 10px;
}
.summary > li:first-child {
  height: auto !important; 
}

/* Body Links */
.book .book-body .page-wrapper .page-inner section.normal a {
  color: black; /* used to be;w #C00A35*/
  text-decoration: underline;
}

.book .book-body .page-wrapper .page-inner section.normal a:hover {
color: #C00A35; /*color when hovering, used to be: #890726 */
text-decoration: underline; /* Keep underline when hovering*/
}

/* -----------Sidebar div tips------------- */
/* from r-pkgs.org*/
div.fyi, div.warning, div.note {
  padding: 1em;
  margin: 1em 0;
  padding-left: 100px;
  background-size: 70px;
  background-repeat: no-repeat;
  background-position: 15px center;
  min-height: 120px;
}

div.fyi {
  background-image: url("../img/fyi.png");
  background-color: #FFE6AB;
  color: black;
  border: solid 5x #FFCD00;
}
div.warning {
  background-image: url("../img/warning.png");
  background-color: #FFB5C7;
  color: black;
  border: solid 5x #C00A35;

}
div.note {
  background-image: url("../img/note.png");
  background-color: #C1C1C1;
  color: black;
  border: solid 5x black;
}

/* --------------- keywords div ---------------- */
div.keywords {
    font-size: small;
    color: #999;
    font-style: italic;
    border-bottom: 1px solid #ccc; /* light grey color */
    padding-bottom: 5px; /* space below the line */
    margin-bottom: 10px; /* space below the div */
  }

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

a.anchor {
  margin-left: -30px;
  padding-right: 3px;
  display:inline-block;
  width: 30px;
  height: 30px;
  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 {
  opacity: 0.6;
}

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

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

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

.summary{
  font-family: 'Open Sans', 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: black; /*#6E3B23;*/
  }

  /* Links that are hovered in the TOC */
.summary a:hover {
  color: #890726 !important;
} 

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

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

/* Do not display author, title and date on the front page
Source: https://stackoverflow.com/questions/53399095/disable-title-author-in-the-html-output-of-bookdown */
.author, .date, .title{
  display: none;
  /*line-height: 0.9;
  white-space: nowrap;
  font-style: normal;
  font-size: 0.875em;*/
}

/* Own styling for footer*/
* {
  box-sizing: border-box;
}

.row {
  display: flex;
}

/* Create columns */
.column {
  padding: 5px;
  float: left;
  display: inline-block;
}

/* Clear floats after the columns */
.row:after {
  content: "";
  display: table;
  clear: both;
}

/* BUTTON */
/* CSS adapted from button 5 at https://getcssscan.com/css-buttons-examples */
button {
  align-items: center;
  background-clip: padding-box;
  background-color: #FCD000;
  border: none;
  border-radius: .25rem;
  box-shadow: rgba(0, 0, 0, 0.02) 0 1px 3px 0;
  box-sizing: border-box;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font-size: 16px;
  font-weight: 600;
  justify-content: center;
  line-height: 1.25;
  margin: 0;
  min-height: 3rem;
  padding: calc(.875rem - 1px) calc(1.5rem - 1px);
  position: relative;
  text-decoration: none;
  transition: all 250ms;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  vertical-align: baseline;
  width: auto;
  margin-right: 5px;
  margin-bottom: 5px;
}

button:hover,
button:focus {
  background-color: #af9c3b;
  color: white;
  box-shadow: rgba(0, 0, 0, 0.1) 0 4px 12px;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  background-color: #af9c3b;
  box-shadow: rgba(0, 0, 0, .06) 0 2px 4px;
  color: white;
  transform: translateY(0);
}

/* -----------Pretty details tag--------------------*/
details {
  width: 100% /*620px*/;
  padding: 6px;
}

details > summary {
  padding: 1px 4px;
  background-color: #FFCD00;
  /*padding: 10px;*/
  border: none;
  box-shadow: 3px 3px 4px grey;
  cursor: pointer;
  font-weight: bold;
}

details > div {
  border-radius: 0 0 10px 10px;
  padding: 12px 6px;
  margin: 0;
  box-shadow: 3px 3px 4px grey;
}

details[open] > summary {
  background-color: #FFCD00;
}

/* -----------Cookie banner --------------------*/
.cookie-banner {
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: black; /*#f0f0f0;*/
  color: white;
  padding: 10px;
  text-align: center;
  z-index: 1000;
  position: relative; /*this works but at top of page, fixed does not work */
}

.accept-button {
  color: black;
  border: none;
  padding: 5px 10px;
  margin: 0 10px;
  cursor: pointer;
}

.book-header.fixed {
  z-index: 999;
}

/* -----------Feedback button--------------------*/
.feedback-button {
  bottom: 0;
  right: 0;
  padding: 10px;
  z-index: 900;
  position: absolute;
}