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

/* Custom blocks / Callout boxes: */
/* based on https://bookdown.org/yihui/rmarkdown-cookbook/custom-blocks.html */

.blackbox {
  padding: 1em;
  background: black;
  color: white;
  border: 2px solid orange;
  border-radius: 10px;
}

.center {
  text-align: center;
}


/* Summary callout box (.rmdinfo): mimics bs4_book's .rmdnote + but with white background */

.rmdinfo {
  margin: 1rem calc(-2px - 0.5em);
  padding: 1rem;
  border: 2px solid var(--primary);   /* Petrol, same accent as .rmdnote */
  background-color: #FFFFFF;          /* white background (tweak to taste) */
}

.rmdinfo > *:last-child {
  margin-bottom: 0;                   /* trim trailing margin, like .rmdnote */
}

@media (max-width: 767.98px) {
  .rmdinfo {
    margin: 1rem -1rem;
    border-width: 4px;
  }
}

.rmdinfo pre {
  /* keep code blocks full-width inside the box, as in .rmdnote */
  margin: 0 -1rem 1rem -1rem;
  padding: 1rem;
}

.rmdinfo .btn-copy {
  right: -1rem;
}


/* Summary callout box (.rmdsummary): mimics bs4_book's .rmdnote + a light-grey highlight */

.rmdsummary {
  margin: 1rem calc(-2px - 0.5em);
  padding: 1rem;
  border: 2px solid var(--primary);   /* Petrol, same accent as .rmdnote */
  background-color: #f5f5f5;          /* light-grey highlight (tweak to taste) */
}

.rmdsummary > *:last-child {
  margin-bottom: 0;                   /* trim trailing margin, like .rmdnote */
}

@media (max-width: 767.98px) {
  .rmdsummary {
    margin: 1rem -1rem;
    border-width: 4px;
  }
}

.rmdsummary pre {
  /* keep code blocks full-width inside the box, as in .rmdnote */
  margin: 0 -1rem 1rem -1rem;
  padding: 1rem;
}

.rmdsummary .btn-copy {
  right: -1rem;
}


/* Survey callout box (.rmdsurvey): full definition (like .rmdsummary), in unikn::Seeblau */

.rmdsurvey {
  margin: 1rem calc(-2px - 0.5em);
  padding: 1rem;
  border: 2px solid #007ab3;          /* darker tint of Seeblau (deeper than pal_seeblau[[5]]) */
  background-color: #ebf8fd;          /* very light shade of unikn::Seeblau */
}

.rmdsurvey > *:last-child {
  margin-bottom: 0;
}

@media (max-width: 767.98px) {
  .rmdsurvey {
    margin: 1rem -1rem;
    border-width: 4px;
  }
}

.rmdsurvey pre {
  margin: 0 -1rem 1rem -1rem;
  padding: 1rem;
}

.rmdsurvey .btn-copy {
  right: -1rem;
}


/* Background highlights for the built-in callout boxes (local override):            */
/* bs4_book already sets each box's border colour via the theme; here we only add a  */
/* background-color, so these tints apply to this book's chapters only and are easy  */
/* to change. unikn: Pinky = #E0607E, Bordeaux = #8E2043.                            */

.rmdnote {
  background-color: #e1eef1;   /* light shade of unikn::Petrol (taken from former .rmdimportant) */
}

.rmdimportant {
  background-color: #fbecf0;   /* lighter shade of unikn::Pinky (paler than .rmdcaution's #f9e2e8) */
  border-color: var(--primary);  /* Petrol, same primary accent as .rmdnote (overrides --success) */
}

.rmdtip {
  background-color: #fff9d9;   /* very light shade of gold/yellow (towards white) */
  border-color: #9aa0a7;       /* unikn::Grau (overrides bs4_book's --info) */
}

.rmdcaution {
  background-color: #f9e2e8;   /* light shade of unikn::Pinky (taken from former .rmdimportant) */
  border-color: #e0607e;       /* unikn::Pinky (overrides bs4_book's --danger) */
}

.rmdwarning {
  background-color: #e6ced6;   /* slightly darker shade of unikn::Bordeaux */
}


/* eof. */
