/* remove conflicting styling from Sphinx themes */
div.nbinput.container div.prompt *,
div.nboutput.container div.prompt *,
div.nbinput.container div.input_area pre,
div.nboutput.container div.output_area pre,
div.nbinput.container div.input_area .highlight,
div.nboutput.container div.output_area .highlight {
  border: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
}

div.nbinput.container > div[class*="highlight"],
div.nboutput.container > div[class*="highlight"] {
  margin: 0;
}

div.nbinput.container div.prompt *,
div.nboutput.container div.prompt * {
  background: none;
}

div.nboutput.container div.output_area .highlight,
div.nboutput.container div.output_area pre {
  background: unset;
}

div.nboutput.container div.output_area div.highlight {
  color: unset; /* override Pygments text color */
}

/* avoid gaps between output lines */
div.nboutput.container div[class*="highlight"] pre {
  line-height: normal;
}

/* input/output containers */
div.nbinput.container,
div.nboutput.container {
  display: -webkit-flex;
  display: flex;
  align-items: flex-start;
  margin: 0;
  width: 100%;
}
@media (max-width: 540px) {
  div.nbinput.container,
  div.nboutput.container {
    flex-direction: column;
  }
}

/* input container */
div.nbinput.container {
  padding-top: 5px;
}

/* last container */
div.nblast.container {
  padding-bottom: 5px;
}

/* input prompt */
div.nbinput.container div.prompt pre,
/* for sphinx_immaterial theme: */
div.nbinput.container div.prompt pre > code {
  color: #307fc1;
}

/* output prompt */
div.nboutput.container div.prompt pre,
/* for sphinx_immaterial theme: */
div.nboutput.container div.prompt pre > code {
  color: #bf5b3d;
}

/* all prompts */
div.nbinput.container div.prompt,
div.nboutput.container div.prompt {
  width: 4.5ex;
  padding-top: 5px;
  position: relative;
  user-select: none;
}

div.nbinput.container div.prompt > div,
div.nboutput.container div.prompt > div {
  position: absolute;
  right: 0;
  margin-right: 0.3ex;
}

@media (max-width: 540px) {
  div.nbinput.container div.prompt,
  div.nboutput.container div.prompt {
    width: unset;
    text-align: left;
    padding: 0.4em;
  }
  div.nboutput.container div.prompt.empty {
    padding: 0;
  }

  div.nbinput.container div.prompt > div,
  div.nboutput.container div.prompt > div {
    position: unset;
  }
}

/* disable scrollbars and line breaks on prompts */
div.nbinput.container div.prompt pre,
div.nboutput.container div.prompt pre {
  overflow: hidden;
  white-space: pre;
}

/* input/output area */
div.nbinput.container div.input_area,
div.nboutput.container div.output_area {
  -webkit-flex: 1;
  flex: 1;
  overflow: auto;
}
@media (max-width: 540px) {
  div.nbinput.container div.input_area,
  div.nboutput.container div.output_area {
    width: 100%;
  }
}

/* input area */
div.nbinput.container div.input_area {
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  /*background: #f5f5f5;*/
}

/* override MathJax center alignment in output cells */
div.nboutput.container div[class*="MathJax"] {
  text-align: left !important;
}

/* override sphinx.ext.imgmath center alignment in output cells */
div.nboutput.container div.math p {
  text-align: left;
}

/* standard error */
div.nboutput.container div.output_area.stderr {
  background: #fdd;
}

/* ANSI colors */
.ansi-black-fg {
  color: #3e424d;
}
.ansi-black-bg {
  background-color: #3e424d;
}
.ansi-black-intense-fg {
  color: #282c36;
}
.ansi-black-intense-bg {
  background-color: #282c36;
}
.ansi-red-fg {
  color: #e75c58;
}
.ansi-red-bg {
  background-color: #e75c58;
}
.ansi-red-intense-fg {
  color: #b22b31;
}
.ansi-red-intense-bg {
  background-color: #b22b31;
}
.ansi-green-fg {
  color: #00a250;
}
.ansi-green-bg {
  background-color: #00a250;
}
.ansi-green-intense-fg {
  color: #007427;
}
.ansi-green-intense-bg {
  background-color: #007427;
}
.ansi-yellow-fg {
  color: #ddb62b;
}
.ansi-yellow-bg {
  background-color: #ddb62b;
}
.ansi-yellow-intense-fg {
  color: #b27d12;
}
.ansi-yellow-intense-bg {
  background-color: #b27d12;
}
.ansi-blue-fg {
  color: #208ffb;
}
.ansi-blue-bg {
  background-color: #208ffb;
}
.ansi-blue-intense-fg {
  color: #0065ca;
}
.ansi-blue-intense-bg {
  background-color: #0065ca;
}
.ansi-magenta-fg {
  color: #d160c4;
}
.ansi-magenta-bg {
  background-color: #d160c4;
}
.ansi-magenta-intense-fg {
  color: #a03196;
}
.ansi-magenta-intense-bg {
  background-color: #a03196;
}
.ansi-cyan-fg {
  color: #60c6c8;
}
.ansi-cyan-bg {
  background-color: #60c6c8;
}
.ansi-cyan-intense-fg {
  color: #258f8f;
}
.ansi-cyan-intense-bg {
  background-color: #258f8f;
}
.ansi-white-fg {
  color: #c5c1b4;
}
.ansi-white-bg {
  background-color: #c5c1b4;
}
.ansi-white-intense-fg {
  color: #a1a6b2;
}
.ansi-white-intense-bg {
  background-color: #a1a6b2;
}

.ansi-default-inverse-fg {
  color: #ffffff;
}
.ansi-default-inverse-bg {
  background-color: #000000;
}

.ansi-bold {
  font-weight: bold;
}
.ansi-underline {
  text-decoration: underline;
}

div.nbinput.container div.input_area div[class*="highlight"] > pre,
div.nboutput.container div.output_area div[class*="highlight"] > pre,
div.nboutput.container div.output_area div[class*="highlight"].math,
div.nboutput.container div.output_area.rendered_html,
div.nboutput.container div.output_area > div.output_javascript,
div.nboutput.container div.output_area:not(.rendered_html) > img {
  padding: 5px;
  margin: 0;
}

/* fix copybtn overflow problem in chromium (needed for 'sphinx_copybutton') */
div.nbinput.container div.input_area > div[class^="highlight"],
div.nboutput.container div.output_area > div[class^="highlight"] {
  overflow-y: hidden;
}

/* hide copy button on prompts for 'sphinx_copybutton' extension ... */
.prompt .copybtn,
/* ... and 'sphinx_immaterial' theme */
.prompt .md-clipboard.md-icon {
  display: none;
}

/* Some additional styling taken form the Jupyter notebook CSS */
.jp-RenderedHTMLCommon table,
div.rendered_html table {
  border: none;
  border-collapse: collapse;
  border-spacing: 0;
  color: black;
  font-size: 12px;
  table-layout: fixed;
}
.jp-RenderedHTMLCommon thead,
div.rendered_html thead {
  border-bottom: 1px solid black;
  vertical-align: bottom;
}
.jp-RenderedHTMLCommon tr,
.jp-RenderedHTMLCommon th,
.jp-RenderedHTMLCommon td,
div.rendered_html tr,
div.rendered_html th,
div.rendered_html td {
  text-align: right;
  vertical-align: middle;
  padding: 0.5em 0.5em;
  line-height: normal;
  white-space: normal;
  max-width: none;
  border: none;
}
.jp-RenderedHTMLCommon th,
div.rendered_html th {
  font-weight: bold;
}
.jp-RenderedHTMLCommon tbody tr:nth-child(odd),
div.rendered_html tbody tr:nth-child(odd) {
  background: #f5f5f5;
}
.jp-RenderedHTMLCommon tbody tr:hover,
div.rendered_html tbody tr:hover {
  background: rgba(66, 165, 245, 0.2);
}
