/* ------------ */
/* API and code */
/* ------------ */

code {
  background-color: var(--pst-color-background-up);
  color: var(--pst-color-text-base); /* var(--pst-color-inline-code); */
  border: 0.1rem solid rgba(0, 0, 0, 0.1);
  border-radius: 0.4rem;
  padding: 0.1rem 0.1rem;
}

.sig-name {
  font-size: 1rem;
}

/* this is a ligher version of the tango solution */
html[data-theme="dark"] .highlight .o {
  color: #f67107;
}

html[data-theme="dark"] .highlight .kn {
  color: #f67107;
}

h1 code,
h2 code,
h3 code,
h4 code,
h5 code,
h6 code {
  background-color: var(--pst-color-background-up);
}

/* have code cells with less margin */

.cell_output .output.text_plain,
.cell_output .output.traceback,
.cell_output .output.stream,
.cell_output .output.stderr {
  margin-top: 0;
  border: 0px;
}

/* counteract the statement below */

.highlight-default.notranslate {
  margin: 1em 0;
}

div[class*="highlight-"] {
  margin: 0 0; /* was 1em 0 */
}

/* --------- */
/* Notebooks */
/* --------- */

.docutils.container {
  width: 100%;
  max-width: 100%;
}

/* --- */
/* API */
/* --- */

dt:target,
span.highlighted {
  background-color: unset;
}

/* ------ */
/* Tables */
/* ------ */
/* all of the following overwrites mystnb.css styling and also affects regular tables */

/* this is 87.5% to match pre in pydata-sphinx */
table,
div.cell_output table {
  font-size: 87.5%;
  color: var(--pst-color-text-base);
}

/* decrease padding in output tables */
tr,
th,
td,
div.cell_output tr,
div.cell_output th,
div.cell_output td {
  padding: 0.3em 0.3em;
}

/* fix background of odd rows in dark mode */
tbody tr:nth-child(odd),
div.cell_output tbody tr:nth-child(odd) {
  background: var(--pst-color-background-up);
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 1px solid var(--pst-color-border);
}

/* --------- */
/* Footnotes */
/* --------- */

/* The top border is as for footnotes. */

.prev-next-area {
  border-top-width: 1px;
  border-top-style: solid;
  border-top-color: var(--pst-color-border);
  margin-top: 2rem;
  padding-top: 0.5rem;
}

.prev-next-area a p.prev-next-title {
  font-weight: 400;
  font-size: 1rem;
}

/* --------- */
/* Footnotes */
/* --------- */

/* this is 80% to match date & author font in blog */
.footnote p,
.footnote dt {
  font-size: 80%;
}

.fn-backref {
  font-weight: normal;
  padding-left: 0.2rem;
}

dl.footnote > dd,
dl.citation > dd {
  margin-bottom: -0.8em;
}

hr.footnotes {
  border-top-width: 1px;
  border-top-style: solid;
  border-top-color: var(--pst-color-border);
  margin-top: 2rem;
  padding-top: 0.3rem;
}

/* ------- */
/* Headers   */
/* ------- */

a.headerlink {
  color: var(--color-primary);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: unset;
  font-weight: bold;
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

/* reduced margin top */
h5,
h6 {
  margin-top: 1.5rem;
}

/* ------ */
/* Navbar */
/* ------ */

.login-button {
  display: inline-block;
  border-color: #ebedf0;
  border-style: solid;
  border-radius: 0.4rem;
  padding: 0.375rem 1.2rem;
  font-weight: bold;
}

nav {
  padding: 0px;
}

.navbar-toggler {
  border: unset;
}

.navbar-light {
  background: var(
    --pst-color-background-up
  ) !important; /* Overrides bootstrap */
  box-shadow: none; /* unset default shadow */
}

.navbar-brand img {
  flex: 0 0 auto;
  height: 2rem;
  margin-right: 0rem;
}

.navbar-brand p {
  margin-bottom: 0;
  padding: 0 0.15rem;
  color: var(--color-emphasis-900);
  font-weight: bold;
  font-size: 1rem;
}

.navbar-light .navbar-nav li a.nav-link {
  padding: 0 0.5rem;
  color: var(--color-emphasis-900);
  font-size: 1rem;
  font-weight: var(--font-weight-semibold);
}

.navbar-light .navbar-nav > .active > .nav-link {
  color: unset;
  font-weight: unset;
}

.navbar {
  box-shadow: none; /* unset default shadow */
  border-bottom-style: solid; /* replace with border */
  border-bottom-color: rgba(0, 0, 0, 0.1); /* this won't be visible in dark */
}

@media (max-width: 1199.98px) {
  .navbar #navbar-center > * {
    margin-top: 0em;
  }
}

/* ---- */
/* Body */
/* ---- */

.bd-sidebar {
  border-right: none;
  height: unset;
}

.toc-entry > .nav-link.active {
  font-weight: 400; /* do not have bold entries */
  background-color: transparent;
  border-left: unset;
}

.section-nav {
  border-left: unset;
}

nav.bd-links .active:hover > a,
nav.bd-links .active > a {
  font-weight: 400; /* do not have bold entries */
}

.bd-content {
  padding: 3rem 1.5rem 2rem 1.5rem; /* symmetrical center body */
}

.bd-toc {
  height: unset;
}

footer {
  width: 100%;
  border-top: 1px solid var(--pst-color-border);
  padding: 10px;
}

.body {
  font: inherit;
}

a {
  color: var(--link-color);
}

/* ------ */
/* Colors */
/* ------ */

html[data-theme="dark"] {
  --pst-color-background: #18191a; /* --background-color */
  --pst-color-background-up: #242526; /* --background-surface-color for navbar */
  --color-primary: #25c2a0;
  --color-primary-dark: #21af90;
  --color-primary-darker: #1fa588;
  --color-primary-darkest: #1a8870;
  --color-primary-light: #29d5b0;
  --color-primary-lighter: #32d8b4;
  --color-primary-lightest: #4fddbf;
  --color-emphasis-900: var(--color-gray-100);
  --pst-color-primary: var(--color-primary);
  --pst-color-info: var(--color-primary);
  --pst-color-link: var(--color-primary);
  --pst-color-link-hover: var(--color-primary-darkest);
  --pst-color-target: var(--color-primary-lightest);
  /* --pst-color-border: rgba(0, 0, 0, 0.5); */ /* we are happy with the pst default! */
  --pst-color-inline-code: #66d9ef; /* pygments monokai */
}

html[data-theme="light"] {
  --pst-color-background: #fff;
  --pst-color-background-up: #fff; /* no distinction here in light mode */
  --color-primary: #2e8555;
  --color-primary-dark: #29784c;
  --color-primary-darker: #277148;
  --color-primary-darkest: #205d3b;
  --color-primary-light: #33925d;
  --color-primary-lighter: #359962;
  --color-primary-lightest: #3cad6e;
  --color-emphasis-900: var(--color-gray-900);
  --pst-color-primary: var(--color-primary);
  --pst-color-info: var(--color-primary);
  --pst-color-link: var(--color-primary);
  --pst-color-link-hover: var(--color-primary-darkest);
  --pst-color-target: var(--color-primary-lightest);
  --pst-color-border: rgba(0, 0, 0, 0.1);
  --pst-color-inline-code: #204a87; /* pygments tango */
}

html {
  font: var(--font-size-base) / var(--line-height-base) var(--font-family-base);
}

:root {
  --color-gray-100: #f5f6f7;
  --color-gray-900: #1c1e21;
  --link-color: var(--color-primary);
  --font-size-base: 100%;
  --line-height-base: 1.65;
  --font-family-base: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,
    Cantarell, Noto Sans, sans-serif, BlinkMacSystemFont, "Segoe UI", Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --font-weight-semibold: 400;
}
