/* SciPy specifics */

/* Remove parenthesis around module using fictive font and add them back.
   This is needed for better wrapping in the sidebar. */
.bd-sidebar .nav li > a > code {
  white-space: nowrap;
}

.bd-sidebar .nav li > a > code:before {
  content:'(';
}

.bd-sidebar .nav li > a > code:after {
  content:')';
}

.bd-sidebar .nav li > a {
  font-family: "no-parens", sans-serif;
}

/* Retrieved from https://codepen.io/jonneal/pen/bXLEdB (MIT)
   It replaces (, ) with a zero-width font. This version is lighter than
   the original font from Adobe.
*/
@font-face {
	font-family: no-parens;
	src: url("data:application/x-font-woff;base64,[encoded data, 9440 characters]");
	unicode-range: U+0028, U+0029;
}

/* Colors from:

Wong, B. Points of view: Color blindness.
Nat Methods 8, 441 (2011). https://doi.org/10.1038/nmeth.1618
*/

/* If the active version has the name "dev", style it orange */
#version_switcher_button[data-active-version-name*="dev"] {
  background-color: #E69F00;
  border-color: #E69F00;
  color: white;
}

/* green for `stable` */
#version_switcher_button[data-active-version-name*="stable"] {
  background-color: #009E73;
  border-color: #009E73;
  color: white;
}

/* red for `old` */
#version_switcher_button:not([data-active-version-name*="stable"]):not([data-active-version-name*="dev"]):not([data-active-version-name*="pull"]) {
  background-color: #980F0F;
  border-color: #980F0F;
  color: white;
}

/* Main index page overview cards */

.sd-card {
  background: #fff;
  border-radius: 0;
  padding: 30px 10px 20px 10px;
  margin: 10px 0px;
}

.sd-card .sd-card-header {
  text-align: center;
}

.sd-card .sd-card-header .sd-card-text {
  margin: 0px;
}

.sd-card .sd-card-img-top {
  height: 52px;
  width: 52px;
  margin-left: auto;
  margin-right: auto;
}

.sd-card .sd-card-header {
  border: none;
  background-color:white;
  color: #150458;
  font-size: var(--pst-font-size-h5);
  font-weight: bold;
  padding: 2.5rem 0rem 0.5rem 0rem;
}

.sd-card .sd-card-footer {
  border: none;
  background-color:white;
}

.sd-card .sd-card-footer .sd-card-text{
  max-width: 220px;
  margin-left: auto;
  margin-right: auto;
}

.custom-button {
  background-color:#DCDCDC;
  border: none;
  color: #484848;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 0.9rem;
  border-radius: 0.5rem;
  max-width: 120px;
  padding: 0.5rem 0rem;
}

.custom-button a {
  color: #484848;
}

.custom-button p {
  margin-top: 0;
  margin-bottom: 0rem;
  color: #484848;
}


/* Dark theme tweaking

Matplotlib images are in png and inverted while other output
types are assumed to be normal images.

*/
html[data-theme=dark] img[src*='.png'] {
    filter: invert(0.82) brightness(0.8) contrast(1.2);
}

html[data-theme=dark] .MathJax_SVG *  {
    fill: var(--pst-color-text-base);
}

/* Main index page overview cards */

html[data-theme=dark] .sd-card {
  background-color:var(--pst-color-background);
}

html[data-theme=dark] .sd-shadow-sm {
    box-shadow: 0 .1rem 1rem rgba(250, 250, 250, .6) !important
}

html[data-theme=dark] .sd-card .sd-card-header {
  background-color:var(--pst-color-background);
  color: var(--sd-color-card-text);
}

html[data-theme=dark] .sd-card .sd-card-footer {
  background-color:var(--pst-color-background);
}

/* Dropdowns from sphinx-design */

.sd-dropdown.sd-card {
  padding: 15px 10px 10px 10px;
  background-color: var(--sd-color-card-background);
  border: 1px solid var(--sd-color-card-border);
  border-radius: 0.25rem;
  color: var(--sd-color-card-text);
}

.sd-dropdown .sd-card-header {
  padding: 0px 0px 0px 0px;
  text-align: left;
}

/* Legacy admonition */

div.admonition-legacy {
  border-color: var(--pst-color-warning);
}

.admonition-legacy.admonition > .admonition-title:before {
  color: var(--pst-color-warning);
  content: var(--pst-icon-admonition-attention);
}

.admonition-legacy.admonition > .admonition-title:after {
  background-color: var(--pst-color-warning);
}
