@keyframes blink-background {
  0%, 100% {
    background-color: var(--textDetailBackground);
  }

  50% {
    background-color: var(--blink);
  }
}

.content-inner .detail:target .detail-header {
  animation-duration: 0.55s;
  animation-name: blink-background;
  animation-iteration-count: 1;
  animation-timing-function: ease-in-out;
}

.content-inner .detail-header {
  margin: 1em 0;
  padding: 0.5em 0.85em 0.5em 1em;
  background-color: var(--textDetailBackground);
  border-left: 3px solid var(--textDetailAccent);
  font-size: 1em;
  font-family: var(--monoFontFamily);
  position: relative;
}

/* !important used in order to beat main heading styles (which use #id selectors),
in both HTML and ePub. */
.content-inner .detail-header .signature {
  font-family: var(--monoFontFamily);
  font-weight: 700;
  font-size: 13px !important;
  line-height: 2em !important;
  margin: 0 !important;
}

.content-inner .detail-header:hover a.detail-link,
.content-inner .detail-header a.detail-link:focus {
  opacity: 1;
  text-decoration: none;
}

.content-inner .detail-header a.detail-link {
  transition: var(--transition-opacity);
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  opacity: 0;
  padding: 0.6em;
  line-height: 1.5em;
  margin-left: -2.5em;
  text-decoration: none;
  border: none;
}

@media screen and (max-width: 768px) {
  .content-inner .detail-header a.detail-link {
    margin-left: -30px;
  }
}

.content-inner .specs pre {
  font-family: var(--monoFontFamily);
  font-size: var(--text-xs);
  font-style: normal;
  line-height: 24px;
  white-space: pre-wrap;
  margin: 0;
  padding: 0;
}

.content-inner .specs .attribute {
  color: var(--fnSpecAttr);
}

.content-inner .docstring {
  margin: 1.2em 0 3em 1.2em;
}

@media screen and (max-width: 768px) {
  .content-inner .docstring {
    margin-left: 0;
  }
}

.content-inner .docstring {
  /* Docstring headings: h2-h4 expected; should not apply to admonition blocks within docstring. */
  & :not(.admonition-title) {
    &:is(h1, h2, h3, h4, h5, h6) {
      font-weight: 700;
      font-size: 1em;
      margin-top: 2em;
    }
    /* h1 not expected */
    &:is(h1, h2) {
      font-size: 1.25em;
    }
    &:is(h3) {
      font-size: 1.1em;
    }
  }
}

.content-inner div.deprecated {
  display: block;
  padding: 1em;
  background-color: var(--fnDeprecated);
  border-radius: var(--borderRadius-sm);
  margin: var(--baseLineHeight) 0;
}
