/* Keep the navigation bar flush with the top of the viewport. */
html,
body {
  --navbar-brand-width: 156px;
  --navbar-logo-height: 2.4rem;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

html[data-theme="light"] {
  --pst-color-primary: #2563eb;
  --pst-color-secondary: #2563eb;
  --pst-color-link: #2563eb;
  --pst-color-link-hover: #1d4ed8;
  --pst-color-inline-code-links: #2563eb;
  --pst-color-table-row-hover-bg: #dbeafe;
  --bs-emphasis-color: #2563eb;
  --bs-emphasis-color-rgb: 37, 99, 235;
  --bs-link-hover-color: #1d4ed8;
  --hyri-note-border: #16a34a;
  --hyri-note-title-bg: #dcfce7;
  --hyri-skip-link-bg: #2563eb;
  --hyri-skip-link-text: #ffffff;
}

html[data-theme="dark"] {
  --pst-color-primary: #60a5fa;
  --pst-color-secondary: #60a5fa;
  --pst-color-link: #60a5fa;
  --pst-color-link-hover: #93c5fd;
  --pst-color-inline-code-links: #60a5fa;
  --pst-color-table-row-hover-bg: rgba(37, 99, 235, 0.22);
  --bs-emphasis-color: #60a5fa;
  --bs-emphasis-color-rgb: 96, 165, 250;
  --bs-link-hover-color: #93c5fd;
  --hyri-note-border: #4ade80;
  --hyri-note-title-bg: rgba(34, 197, 94, 0.18);
  --hyri-skip-link-bg: #1d4ed8;
  --hyri-skip-link-text: #ffffff;
}

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

.bd-header {
  top: 0 !important;
  margin-top: 0 !important;
}

@media (min-width: 960px) {
  .bd-sidebar-primary {
    top: 0 !important;
  }
}

.pst-async-banner-revealer {
  display: none !important;
  height: 0 !important;
}

.hyri-index-logo-lockup {
  height: auto;
  max-width: min(100%, 24rem);
  width: 100%;
}

html[data-theme="light"] .hyri-index-logo-lockup.only-dark,
html[data-theme="dark"] .hyri-index-logo-lockup.only-light {
  display: none;
}

html[data-theme="dark"] .hyri-index-logo-lockup.only-dark {
  display: inline-block;
}

.bd-content h1:has(> .headerlink[href="#pyhyperri"]) {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  margin: 0;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.hyri-index-logo-title,
.bd-content h1:has(> .hyri-index-logo-lockup) {
  line-height: 1;
  margin: 0 0 1.5rem;
  text-align: center;
}

.bd-content h1:has(> .hyri-index-logo-lockup) .headerlink {
  display: none;
}

.navbar-header-items__start .navbar-brand.logo,
.navbar-header-items__mobile-logo .navbar-brand.logo {
  align-items: center;
  display: inline-flex;
  flex: 0 0 var(--navbar-brand-width);
  height: var(--pst-header-height);
  line-height: 1;
  max-width: none;
  overflow: visible;
  text-decoration: none;
  width: var(--navbar-brand-width);
}

.bd-header .navbar-header-items {
  padding-left: 0;
}

.navbar-header-items__start .navbar-brand.logo .logo__image,
.navbar-header-items__mobile-logo .navbar-brand.logo .logo__image {
  flex: 0 0 auto;
  display: block;
  height: var(--navbar-logo-height) !important;
  max-height: none !important;
  max-width: none !important;
  margin-right: 0 !important;
  transform: translateY(0.04rem);
  width: auto !important;
}

.navbar-header-items__start .navbar-brand.logo .logo__title,
.navbar-header-items__mobile-logo .navbar-brand.logo .logo__title {
  display: none;
}

.bd-header .navbar-brand:hover,
.bd-header .navbar-brand:focus {
  text-decoration: none;
}

.bd-header .theme-switch-button:hover,
.bd-header .theme-switch-button:focus {
  background-color: transparent;
  box-shadow: 0 0 0 0.1875rem var(--pst-color-link-hover);
  color: var(--pst-color-link-hover);
}

.tooltip {
  --bs-tooltip-bg: var(--pst-color-primary);
  --bs-tooltip-color: #ffffff;
}

.skip-link {
  background-color: var(--hyri-skip-link-bg);
  border-bottom-color: var(--hyri-skip-link-bg);
}

.skip-link a,
.skip-link a:visited {
  color: var(--hyri-skip-link-text) !important;
}

.skip-link a:focus-visible {
  outline-color: var(--hyri-skip-link-text);
}

/* Keep API parameter lists compact after moving type hints to signatures. */
.field-list.simple ul.simple {
  margin-bottom: 0;
}

.field-list p {
  margin-bottom: 0.45rem;
}

.field-list p strong {
  margin-right: 0.35rem;
}

.bd-content table tbody tr:hover {
  background-color: var(--pst-color-table-row-hover-bg);
}

p.rubric,
.hyri-autodoc-section-title {
  border-bottom: 1px solid var(--pst-color-border);
  color: var(--pst-color-text-base);
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.25rem;
}

.hyri-shape-field > dt,
.field-list.hyri-shape-field > dt,
.field-list.simple.hyri-shape-field > dt {
  display: none !important;
}

.hyri-shape-field > dd {
  margin-left: 0;
}

.prev-next-footer {
  display: block !important;
  margin-top: 2rem;
}

.prev-next-subtitle {
  text-transform: capitalize;
}

.bd-footer {
  display: block !important;
  margin-top: 2rem;
}

.bd-footer__inner {
  border-top: 1px solid var(--pst-color-border);
  padding-bottom: 1.25rem;
  padding-top: 1rem;
}

.footer-items__start,
.footer-items__end {
  font-size: 0.85rem;
}

.sphinx-theme-versions {
  margin-bottom: 0;
}

.bd-sidebar-primary .bd-links__title a,
.bd-sidebar-primary .bd-links__title a:visited {
  color: inherit;
  font: inherit;
  text-decoration: none;
}

.bd-sidebar-primary .bd-links__title a:hover,
.bd-sidebar-primary .bd-links__title a:focus {
  color: inherit;
  text-decoration: none;
}

.github-source-link {
  margin-top: 1rem;
}

.notebook-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Keep full reconstruction logs readable without stretching tutorial pages. */
.hyri-reconstruction-log .cell_output {
  max-height: 32rem;
  overflow-y: auto;
}

.api-structure-plot-wrapper {
  margin: 1.25rem 0 2rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.api-structure-plot {
  aspect-ratio: 1332.5439 / 794.61066;
  display: block;
  height: auto;
  min-width: 840px;
  width: 100%;
}

@media (min-width: 960px) {
  .api-structure-plot-wrapper {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
  }
}

.bd-sidebar-secondary .hyri-sidebar-link,
.bd-sidebar-secondary .hyri-sidebar-link:visited {
  align-items: center;
  color: var(--pst-color-text-muted) !important;
  display: flex;
  gap: 0.35rem;
  white-space: nowrap;
  text-decoration: none;
}

.hyri-sidebar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
}

.hyri-jupyter-logo {
  background-color: currentColor;
  flex: 0 0 auto;
  height: 1rem;
  mask-image: url("../logo/jupyter-icon.svg");
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  transform: scale(1.3);
  transform-origin: center;
  width: 1rem;
  -webkit-mask-image: url("../logo/jupyter-icon.svg");
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.hyri-sidebar-icon .fa-github {
  font-size: 1.15rem;
  line-height: 1;
}

.bd-sidebar-secondary .hyri-sidebar-link:hover,
.bd-sidebar-secondary .hyri-sidebar-link:focus {
  color: var(--pst-color-text-base) !important;
  text-decoration: underline;
}

/* Keep note bodies neutral while giving the title row a project accent. */
.bd-content .admonition.note,
.bd-content .admonition-notes {
  border-left: 4px solid var(--hyri-note-border);
  border-radius: 4px;
  box-shadow: none;
}

.bd-content .admonition.note > .admonition-title,
.bd-content .admonition-notes > .admonition-title {
  background-color: var(--hyri-note-title-bg);
  color: var(--pst-color-text-base);
  font-weight: 600;
}

.bd-content .admonition.note > .admonition-title::after,
.bd-content .admonition-notes > .admonition-title::after {
  content: var(--pst-icon-admonition-note) !important;
  color: var(--hyri-note-border) !important;
}
