/*
Author: Valerio Maggio < @leriomaggio >
Code: https://github.com/leriomaggio/notexbook-jupyter-theme
License: Apache License 2.0
*/

/* HTML Export (Jupyter Light Theme)
   ================================ */

body.jp-Notebook * {
    --txbk-content-font-size: 14px !important;
    --txbk-code-font-size: 13px !important;
}

body.jp-Notebook .jp-CodeCell .jp-InputPrompt {
    margin-top: 7px;
    overflow: initial;
}

body.jp-Notebook .CodeMirror-linenumber {
    --txbk-ui-mono-font-size: 10px !important;
}

body.jp-Notebook .jp-RenderedHTMLCommon.jp-MarkdownOutput p > img:only-child,
body.jp-Notebook .jp-RenderedHTMLCommon.jp-MarkdownOutput img:only-child {
    max-width: 30%;
}

body.jp-Notebook .jp-CodeCell .jp-InputPrompt {
    font-size: var(--txbk-code-font-size);
    padding-top: 4px;
}

/* ==================================================
   IMPORTANT NOTE:
   ALL markdown rules cells needs adapting because of
   a different structure in exported HTML
   ===================================================
*/
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput {
    font-family: var(--txbk-content-font-family) !important;
    font-size: var(--txbk-content-font-size) !important;
    color: var(--txbk-content-color) !important;
    font-kerning: auto;
    text-align: justify !important;
    display: block;
    word-break: normal !important;
    word-wrap: break-word !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  a {
    color: var(--link-color) !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  h1,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  h2,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  h3,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  h4,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  h5,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  h6 {
    font-family:  var(--txbk-content-font-family) !important;
    font-style: normal !important;
}

/*  Font-sizes for Headers
    ----------------------*/
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  h1 {
    font-size: 2.2em !important;
    text-align: center !important;
    padding-top:  3rem;
    padding-bottom: 3rem;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  h2 {
    font-size: 1.9em !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  h3 {
    font-size: 1.7em !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  h4 {
    font-size: 1.5em !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  h5 {
    font-size: 1.3em !important;
    border-bottom: 1px solid rgb(204, 204, 204);
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  h6 {
    font-size: 1.1em !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  p,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  pre,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  code {
    font-size: 1em !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  pre,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  code {
    color: var(--txbk-content-mono-color);
}


/* Monospace Code - no code syntax highlight*/
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  pre {
    /* hack: using code background colour here to allow for compatibility */
    background-color: var(--code-background-color) !important;
    font-family: var(--txbk-content-mono-font-family) !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  p {
    line-height: var(--txbk-content-line-height);
    text-align: justify !important;
}

/* Monospace inline rendered markdown */
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  p code {

    /*Re-defining variables for Mono using Code Editor's settings*/
    --txbk-content-mono-font-family: var(--txbk-code-font-family);
    --txbk-content-mono-font-size: var(--txbk-code-font-size);

    background-color: var(--txbk-content-mono-bgcolor) !important;
    font-size: var(--txbk-content-mono-font-size) !important;
    color: var(--txbk-content-mono-color);
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  p strong code {
    font-weight: bold !important;
    color: var(--txbk-content-mono-color);
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  p em code {
    font-style: italic !important;
    color: var(--txbk-content-mono-color);
}

body.jp-Notebook .jp-CodeCell .jp-RenderedHTMLCommon p.nomono {
    font-family: var(--txbk-content-font-family);
    font-size: 1em;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  pre code {
    padding: 1rem 1.5rem;
    display: block;
    color: var(--txbk-content-mono-color);
    background-color: var(--txbk-content-mono-bgcolor) !important;
    font-family: var(--txbk-content-mono-font-family);
    font-size: var(--txbk-content-mono-font-size) !important;
    word-wrap: break-word;
    word-break: normal;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  blockquote {
    --txbk-ui-color: #6f6f6f !important;

    margin: 2rem .2rem !important;
    padding: .3rem .5rem !important;
    border-left: .3rem solid #a7a7a7 !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  blockquote p {
    padding: .2rem 1.5rem;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  table {
    margin-top: 25px;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  table {
    font-size: var(--txbk-content-font-size) !important;
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
    overflow: auto;
    break-inside: auto;
    text-align: left;
    margin-top: 25px;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  table thead {
    display: table-header-group;
    vertical-align: middle !important;
    border-bottom: none !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  table thead tr,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  table thead tr td,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  table tbody tr,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  table tbody tr th,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  table tbody tr td {
    break-inside: avoid;
    break-after: auto;
    text-align: left !important;
    vertical-align: middle !important;
    padding: 0 !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  table tr th {
    border-bottom-width: 0;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ul,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ol {
    position: relative;
    display: block;
    margin-bottom: 0 !important;
    line-height: var(--txbk-content-line-height);
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ul {
    list-style-type: disc;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ul li,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ol li {
    /*white-space: pre-wrap;*/
    padding: .8rem !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ul li > code,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ol li > code {
    font-size: .9em !important
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ul li a code,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ol li a code {
    font-size: .9em !important
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ul ul {
    list-style-type: circle !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ul ul,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ul ol,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ol ul,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ol ol {
    padding-top: .5rem !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ul li > ul li,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ul li > ol li,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ol li > ul li,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ol li > ol li {
    padding: .5rem !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ul li > ul li code,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ul li > ol li code,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ol li > ul li code,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ol li > ol li code {
    font-size: .9em !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ul li > ul li a code,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ul li > ol li a code,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ol li > ul li a code,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ol li > ol li a code {
    font-size: .9em !important;
    color: var(--link-color);
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  ul ul ul {
    list-style-type: square !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  p > img:only-child,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  img:only-child {
    display: block;
    margin: auto;
    max-width: 40%;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  img {
    max-width: 40%;
}

/* Img MaxW classes */
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  img.maxw10,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  p > img.maxw10 {
    max-width: 5% !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput img.maxw15,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput p > img.maxw15 {
    max-width: 5% !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput img.maxw20,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput p > img.maxw20 {
    max-width: 10% !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput img.maxw25,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput p > img.maxw25 {
    max-width: 15% !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput img.maxw30,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput p > img.maxw30 {
    max-width: 20% !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput img.maxw35,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput p > img.maxw35 {
    max-width: 25% !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput img.maxw40,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput p > img.maxw40 {
    max-width: 30% !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput img.maxw45,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput p > img.maxw45 {
    max-width: 35% !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput img.maxw50,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput p > img.maxw50 {
    max-width: 40% !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput img.maxw55,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput p > img.maxw55 {
    max-width: 45% !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput img.maxw60,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput p > img.maxw60 {
    max-width: 50% !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput img.maxw65,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput p > img.maxw65 {
    max-width: 55% !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput img.maxw70,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput p > img.maxw70 {
    max-width: 60% !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput img.maxw75,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput p > img.maxw75 {
    max-width: 65% !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput img.maxw80,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput p > img.maxw80 {
    max-width: 70% !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput img.maxw85,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput p > img.maxw85 {
    max-width: 75% !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput img.maxw90,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput p > img.maxw90 {
    max-width: 80% !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput img.maxw95,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput p > img.maxw95 {
    max-width: 85% !important;
}

body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput img.maxw100,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput p > img.maxw100 {
    max-width: 90% !important;
}

/* FIX Forcing monospace code to adhere with footnotes rules!*/
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  p [id^='fn'] > code,
body.jp-Notebook .jp-Cell-inputWrapper .jp-RenderedHTMLCommon.jp-RenderedMarkdown.jp-MarkdownOutput  p [class^='fn'] > code {
    font-size: 1em !important;
}
