/*
 * Code blocks produced by Zola's syntax highlighter (giallo),
 * styled to look like the former just-the-docs code blocks.
 * Token colors come from giallo.css (generated by Zola from the
 * theme set in config.toml).
 */
.code-block {
  position: relative;
  margin-top: 0;
  margin-bottom: .75rem;
}

.main-content pre.giallo {
  margin: 0 0 .75rem;
  padding: .75rem;
  overflow-x: auto;
  background-color: #F4F4F4;
  border: 1px solid #EEE;
  border-radius: 4px;
  -webkit-overflow-scrolling: touch;
}

.main-content .code-block > pre.giallo {
  margin-bottom: 0;
}

.main-content pre.giallo code {
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
}

/* Copy button, same behavior as just-the-docs */
.code-block > button {
  width: .75rem;
  opacity: 0;
  position: absolute;
  top: 0;
  right: 0;
  padding: .75rem;
  border: none;
  background: none;
  color: #5c5c5c;
  box-sizing: content-box;
}

.code-block > button svg {
  fill: #5c5c5c;
}

.code-block > button:active {
  text-decoration: none;
  outline: none;
  opacity: 1;
}

.code-block > button:focus {
  opacity: 1;
  outline: 2px solid #555;
}

.code-block:hover > button {
  cursor: copy;
  opacity: 1;
}
