.bd-sidebar-primary {
  height: 100%;
  width: fit-content;
  max-width: 50vw;
  flex-basis: unset !important;
}
.navbar-brand img {
  max-width: 250px;
  width: auto;
}
.bd-sidebar-primary .sidebar-primary-items__end {
  margin-top: unset !important;
}

.bd-article-container {
  max-width: 100% !important;
}

.bd-sidebar-secondary {
  width: unset !important;
  max-width: 300px;
  overflow-x: hidden;
}
.bd-sidebar-secondary .sidebar-secondary-items {
  display: block !important;
}
nav.page-toc ul.nav {
  display: block !important;
}
.bd-sidebar-secondary .sidebar-secondary-items .toc-entry a > code {
  display: block;
  max-width: max-content;
  overflow-x: hidden;
  color: var(--pst-color-inline-code);
  border: none;
  padding-top: 0;
  padding-bottom: 0;
}
.bd-sidebar-secondary .sidebar-secondary-items .toc-entry a > code > span.pre {
  white-space: normal !important;
}
a.reference.internal:hover > code,
a.reference.internal:focus > code,
a.reference.internal:hover > em,
a.reference.internal:focus > em,
p.prev-next-title:hover > code,
p.prev-next-title:focus > code {
  color: var(--pst-color-link-hover) !important;
}
a.reference.internal:hover,
a.reference.internal:focus {
  text-decoration-color: var(--pst-color-link-hover);
}
a.reference.internal:has(code.docutils) {
  text-decoration-line: none;
}
a.reference.internal:has(code.docutils):hover,
a.reference.internal:has(code.docutils):focus {
  text-decoration-line: underline;
}

dl[class]:not(.option-list, .field-list, .footnote, .glossary, .simple) dd {
  margin-left: 1.5rem !important;
  margin-right: 1.5rem;
}
section > dl,
section > dl > dd > dl.py {
  border: 1px solid #eee;
  box-shadow: 0 0.25rem 0.75rem -0.25rem #ccc;
  border-radius: 0.5rem;
}
dl.py {
  margin-bottom: 1rem !important;
  padding-bottom: 0.5rem;
}
section > dl dt.py {
  background: var(--pst-color-attention-bg);
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 0.5rem;
}

.max-width-img {
  overflow-x: auto;
}
.max-width-img img {
  max-width: unset;
}

/* Newlines (\a) and spaces (\20) before each parameter */
dt.py > em.sig-param::before {
  content: "\a\20\20\20\20";
  white-space: pre;
}
/* Newline after the last parameter (so the closing bracket is on a new line) */
dt.py > em.sig-param:last-of-type::after {
  content: "\a";
  white-space: pre;
}

dt.py em.sig-param span.n:first-of-type {
  font-style: normal;
}
dt.py em.sig-param span.n:not(:first-of-type),
dt.py em.sig-param span.n a,
dl.py a.internal,
dl.field-list em {
  font-style: italic !important;
  color: var(--pst-color-inline-code-links) !important;
}

.seealso dl {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.seealso code .pre {
  white-space: normal !important;
}

div.math mjx-container {
  overflow-y: hidden;
}

div.citation > p {
  margin-left: 2.25rem !important;
}
div.citation a[role="doc-backlink"] {
  text-decoration: none !important;
  color: var(--pst-color-text-base) !important;
}

div.toctree-wrapper a {
  color: var(--pst-color-text-base) !important;
}
div.toctree-wrapper a:hover,
div.toctree-wrapper a:focus {
  color: var(--pst-color-link-hover) !important;
}

/* Add dotted lines before each toc entry

.toctree-wrapper li[class^="toctree-l"] > ul {
  padding-inline-start: 0;
}
.toctree-wrapper li[class^="toctree-l"] a {
  position: relative;
}
.toctree-wrapper li[class^="toctree-l"] a::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.25rem;
  border-bottom: 0.125rem dotted black;
}
.toctree-wrapper li.toctree-l2 a {
  padding-left: 1.5em;
}
.toctree-wrapper li.toctree-l2 a::before {
  width: 1.25em;
}
.toctree-wrapper li.toctree-l3 a {
  padding-left: 3em;
}
.toctree-wrapper li.toctree-l3 a::before {
  width: 2.75em;
}
.toctree-wrapper li.toctree-l4 a {
  padding-left: 4.5em;
}
.toctree-wrapper li.toctree-l4 a::before {
  width: 4.25em;
} */

.prev-next-area a p.prev-next-title:has(code.docutils) {
  color: var(--pst-color-inline-code);
}
.prev-next-area a:hover code.docutils,
.prev-next-area a:focus code.docutils {
  color: var(--pst-color-link-hover);
}
.prev-next-area a p.prev-next-title {
  color: var(--pst-color-text-base);
}
