:root {
  --jlpl-header-height: 64px;
}

/** pst, bs, etc. overrides */
.bd-main .bd-content .bd-article-container {
  max-width: 100%;
}

.bd-page-width {
  max-width: 100%;
}

.bd-article section p {
  max-width: 45em;
}

.bd-header__inner {
  max-height: var(--jlpl-header-height) !important;
}

.sidebar-primary__section:empty {
  display: none !important;
}

.search-button-field {
  border: solid 2px var(--pst-color-border);
}

/** theme customizations */
.jlpl-demo {
  position: fixed;
  top: calc(var(--jlpl-header-height) + 3.5rem);
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  display: flex;
  flex-direction: row;
}

body:has(.jlpl-demo) #pst-secondary-sidebar {
  display: none;
}

#jlpl-demo-choices {
  position: fixed;
  top: calc(var(--jlpl-header-height) + 0.5rem);
  display: flex;
  left: 10rem;
  margin: 0;
  padding: 0;
}

#jlpl-demo-choices > li {
  flex: 1;
  margin: 0 0.5rem 0 0;
  padding: 0;
  font-weight: bold;
  list-style: none;
  white-space: nowrap;
}

.jlpl-demo iframe {
  flex: 1;
}

.jlpl-hero {
  font-size: 150%;
  border: solid 0.125em var(--pst-color-primary);
  padding: 1em;
  margin: 1em;
  border-radius: 1.5em;
  text-align: center;
}

.bd-article .jlpl-hero p {
  margin: 0;
  padding: 0;
  width: 100% !important;
  max-width: unset;
}

html[data-theme="dark"] .bd-content div.cell_output .text_html,
html[data-theme="dark"] .bd-content div.cell_output img {
  background: unset !important;
  color: unset !important;
  padding: 0 !important;
}

div.cell_output table {
  color: unset !important;
}

div.cell_output tbody tr:nth-child(odd) {
  background-color: unset !important;
}

.cell_output .anchor-link {
  color: var(--pst-color-secondary);
  font-size: 0.8em;
  margin-left: 0.2em;
  opacity: 0.7;
  padding: 0 4px;
  text-decoration: none;
  transition: all 0.2s ease-out;
  user-select: none;
}

.cell_output .anchor-link:hover,
.cell_output .anchor-link:active,
.cell_output .anchor-link:focus {
  opacity: 1;
}

/* tippy */
.tippy-box {
  background-color:var(--pst-color-surface);
  color:var(--pst-color-text-base);
  border: 1px solid var(--pst-color-border);

  h1, h2, h3, h4, h5, h6{
    font-size: 1.5em;
    margin: 0.5em 0;
    padding: 0;
  }

  .sig-parent > .sig-param:before {
    display: block;
  }

  .sig {
    text-indent: -1em;
    margin-left: 1em;
  }

  .sig-return::before {
    content: "\A";
    white-space: pre;
  }

  .viewcode-link {
    display: none;
  }
}

.tippy-content :last-child {
  margin-bottom: 0;
}

.tippy-box .descclassname {
  display: none;
}
