html, body {
  height: 100%;
}

body > .container {
  display: flex;
  height: 100%;
  flex-direction: column;
}

body > .container .row {
  flex: 1 0 auto;
}

footer {
  margin-top: 45px;
  padding: 35px 0 36px;
  border-top: 1px solid #e5e5e5;
  color: #666;
  display: flex;
  flex-shrink: 0;
}

footer p {
  margin-bottom: 0;
}

footer div {
  flex: 1;
}

footer .pkgdown {
  text-align: right;
}

footer p {
  margin-bottom: 0;
}

img.icon {
  float: right;
}

img {
  max-width: 100%;
}

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

a.anchor {
  margin-left: -30px;
  display:inline-block;
  width: 30px;
  height: 30px;
  visibility: hidden;

  background-image: url(./link.svg);
  background-repeat: no-repeat;
  background-size: 20px 20px;
  background-position: center center;
}

.hasAnchor:hover a.anchor {
  visibility: visible;
}

@media (max-width: 767px) {
  .hasAnchor:hover a.anchor {
    visibility: hidden;
  }
}

/* Fixes for fixed navbar --------------------------*/

.contents {
  margin-top: 4em;
}

.contents h1, .contents h2, .contents h3, .contents h4 {
  padding-top: 40px;
  margin-top: -40px;
}

/* Sidebar --------------------------*/

#sidebar {
  margin-top: 30px;
}

/* navbar is 56px + 30px of margin-top */
.sticky-top {
  top: 86px;
}

#sidebar h2 {
  font-size: 1.5em;
  margin-top: 1em;
}

#sidebar h2:first-child {
  margin-top: 0;
}

#sidebar .list-unstyled li {
  margin-bottom: 0.5em;
}

.orcid {
  height: 16px;
  /* margins are required by official ORCID trademark and display guidelines */
  margin-left:4px;
  margin-right:4px;
  vertical-align: middle;
}

/* Reference index & topics ----------------------------------------------- */

#ref-arguments #name {text-align: right;}

/* Syntax highlighting ---------------------------------------------------- */

pre {
  word-wrap: normal;
  word-break: normal;
  background-color: #f8f8f8;
  color: #333;
  padding: 9.5px;
  border-radius: 4px;
  border: 1px solid #eee;
}

pre.sourceCode {
  overflow: auto;
  white-space: pre;
}

pre .img {
  margin: 5px 0;
}

pre .img img {
  background-color: #fff;
  display: block;
  height: auto;
}

code a, pre a {
  color: #375f84;
}

a.sourceLine:hover {
  text-decoration: none;
}

.fl      {color: #1514b5;}
.fu      {color: #000000;} /* function */
.ch,.st  {color: #036a07;} /* string */
.kw      {color: #264D66;} /* keyword */
.co      {color: #888888;} /* comment */

.message { color: black;   font-weight: bolder;}
.error   { color: orange;  font-weight: bolder;}
.warning { color: #6A0366; font-weight: bolder;}

/* Clipboard --------------------------*/

.hasCopyButton {
  position: relative;
}

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

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

/* headroom.js ------------------------ */

.headroom {
  will-change: transform;
  transition: transform 200ms linear;
}
.headroom--pinned {
  transform: translateY(0%);
}
.headroom--unpinned {
  transform: translateY(-100%);
}

/* mark.js ----------------------------*/

mark {
  background-color: rgba(255, 255, 51, 0.5);
  border-bottom: 2px solid rgba(255, 153, 51, 0.3);
  padding: 1px;
}

/* vertical spacing after htmlwidgets */
.html-widget {
  margin-bottom: 10px;
}

/* bootstrap-toc tweaks */
nav[data-toggle="toc"] .nav > li > a {
  font-size: 17px;
  color: inherit;
}

nav[data-toggle="toc"] .nav > li > a:hover,
nav[data-toggle="toc"] .nav > li > a:focus {
  color: inherit;
  border-left: 1px solid #000000;
}

nav[data-toggle="toc"] .nav-link.active,
nav[data-toggle="toc"] .nav-link.active:hover,
nav[data-toggle="toc"] .nav-link.active:focus {
  color: inherit;
  border-left: 2px solid #000000;
}

nav[data-toggle="toc"] .nav .nav > li > a {
  font-size: 15px;
}
