/*
 * Default Theme - Document Content Styling
 * CSS 2.1 compatible for Qt6/PySide6 QTextBrowser
 * https://doc.qt.io/qt-6/richtext-html-subset.html#css-properties
 */

body {
    max-width: 100%; /* Page not stretching upon resize without it */
    font-family: 'Noto Sans', 'Liberation Sans', '.AppleSystemUIFont', 'DejaVu Sans', sans-serif;
    color: #333333;
    background-color: #FFFFFF;
    margin: 0;
    padding: 0;
}
a {
    display: inline-block;
    color: royalblue;
    text-decoration: underline;
}
/* Fix new line issue within the p block */
p {
    white-space: pre-line;
    margin-top: 6px;
    margin-bottom: 6px;
}
pre {
    margin: 10px 0;
    padding: 0;
}
img { max-width: 100%; }

/* Headers */
h1 {
    font-size: xx-large;
    color: #333333;
    margin-top: 18px;
    margin-bottom: 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid #cccccc;
}
h2 {
    font-size: x-large;
    color: #333333;
    margin-top: 16px;
    margin-bottom: 8px;
    padding-bottom: 3px;
    border-bottom: 1px solid #dddddd;
}
h3 {
    font-size: large;
    color: #333333;
    margin-top: 14px;
    margin-bottom: 6px;
}
h4 {
    font-size: medium;
    color: #333333;
    margin-top: 12px;
    margin-bottom: 5px;
}
h5 {
    font-size: small;
    color: #333333;
    margin-top: 10px;
    margin-bottom: 4px;
}
h6 {
    font-size: 8pt;
    font-weight: bold;
    color: #333333;
    margin-top: 8px;
    margin-bottom: 4px;
}

/* Markdown table */
table._nl_tbl {
    margin-top: 10px;
    margin-bottom: 10px;
    border-collapse: collapse;
    border: 1px solid grey;
    background-color: #FFFFFF;
}
table._nl_tbl td {
    border: 1px solid grey;
    padding: 6px 10px;
    color: #333333;
    background-color: #FFFFFF;
}
table._nl_tbl th {
    border: 1px solid grey;
    background: lightgrey;
    color: darkSlateGrey;
    font-weight: bold;
    padding: 6px 10px;
}
/* Style substitution for tree-processor */
._nl_tbl .left { text-align: left; }
._nl_tbl .center { text-align: center; }
._nl_tbl .right { text-align: right; }

/* Expandable block, which replaces the <details><summary>...</summary>...</details> with:
<p class="_ds_expand">
<a href="expandable:{}" data-group="{}" data-level="{}">▼{}</a>
</p>
*/
/* Expanded block (collapsible), which appears after expandable block click:
<table class="_n_details _ds_collapse">
<tr><td class="_n_details_summary"><a class="_ds_collapse_summary">{}</a></td></tr>
<tr><td class="_n_details_content">{}</td></tr>
</table>
*/
/* anchor details-summary expandable */
._ds_expand {
    background: transparent;
    margin: 6px 0;
}
/* anchor details-summary expandable */
._ds_expand > a {
    color: black;
    text-decoration: none;
    font-weight: bold;
}
._ds_expand ._ds_expand_pointer {
    color: royalblue;
}
._ds_collapse ._ds_collapse_pointer {
    color: white;
}
/* anchor details-summary collapsible */
a._ds_collapse_summary {
    color: white;
    text-decoration: none;
    font-weight: bold;
}
/* root element of the block, usually table */
._n_details {
    padding: 0;
    border-collapse: collapse;
    margin: 6px 0;
}
/* element which is contain a _ds (expandable or collapsible link) */
._n_details_summary {
    text-align: left;
    font-weight: bold;
    color: white;
    border-left: 3px solid steelblue;
    background-color: steelblue;
    margin: 0;
    padding: 5px 8px 6px 10px;
}
/* main content of the expandable block */
._n_details_content {
    border-left: 3px solid steelblue;
    background-color: #f5f5f5;
    padding: 8px 12px 10px 12px;
}

abbr {
    text-decoration: underline;
    color: dodgerblue;
}
/* Admonition blocks - colors from theme (viewer.ini) */
._n_admonition {
    width: 100%;
    margin: 12px 0;
    padding: 0;
    border-collapse: collapse;
    border: 1px solid #b0bec5;
    background-color: #fafafa;
}
._n_admonition_title {
    text-align: left;
    font-weight: bold;
    border-bottom: 1px solid #b0bec5;
    padding: 6px 12px;
}
._n_admonition_content {
    color: #333333;
    background-color: #fafafa;
    padding: 10px 12px;
}
/*
 * Supported CSS Selectors
 * All CSS 2.1 selector classes are supported except pseudo-class selectors such as :first-child, :visited and :hover.
 *
 * Use `px` instead of `em`
 * https://doc.qt.io/qt-6/richtext-html-subset.html#css-properties
 *
 * Long string in code block may affect page horizontal scrolling
 * - white-space: pre-wrap;      Since CSS 2.1
 * - white-space: -moz-pre-wrap; Mozilla, since 1999
 * - white-space: -pre-wrap;     Opera 4-6
 * - white-space: -o-pre-wrap;   Opera 7
 * - word-wrap: break-word;      Internet Explorer 5.5+
 */
.codehilite pre {
    white-space: unset;
    margin: 0;
    padding: 0;
}
.codehilitetable {
    width: 100%;
    border: none;
    border-spacing: unset;
    border-collapse: collapse;
    margin-top: 10px;
    margin-bottom: 10px;
}
/* The line-height should be equal to that of td.code, ensuring the code's line height matches. */
td.linenos {
    padding: 10px 8px 10px 6px;
    border-left: 3px solid #eec357;
    background: #373737;
    color: #eeeeee;
    vertical-align: top;
    font-family: 'IBM Plex Mono', 'Liberation Mono', 'DejaVu Sans Mono', monospace;
}
td.code, code {
    padding: 10px 12px 10px 12px;
    background: #55595f;
    color: #f8f8f2;
    font-family: 'IBM Plex Mono', 'Liberation Mono', 'DejaVu Sans Mono', monospace;
}
td.linenos .normal { color: grey; background-color: transparent; padding-left: 5px; padding-right: 5px; }
div.linenodiv { padding: 0; margin: 0; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: inherit; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: inherit; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }

.codehilite {
    line-height: 21px;
    font-family: 'IBM Plex Mono', 'Liberation Mono', 'DejaVu Sans Mono', monospace;
}
.codehilite .hll { background: transparent; }
.codehilite .c { color: #d5d1be } /* Comment */
.codehilite .err { color: whiteSmoke; background-color: paleVioletRed; } /* Error */
.codehilite .k { color: #66d9ef } /* Keyword */
.codehilite .l { color: #ae81ff } /* Literal */
.codehilite .n { color: #f8f8f2 } /* Name */
.codehilite .o { color: #f92672 } /* Operator */
.codehilite .p { color: #f8f8f2 } /* Punctuation */
.codehilite .ch { color: #85816e } /* Comment.Hashbang */
.codehilite .cm { color: #85816e } /* Comment.Multiline */
.codehilite .cp { color: #85816e } /* Comment.Preproc */
.codehilite .cpf { color: #85816e } /* Comment.PreprocFile */
.codehilite .c1 { color: #85816e } /* Comment.Single */
.codehilite .cs { color: #85816e; font-weight: bold; } /* Comment.Special */
.codehilite .gd { color: #f92672 } /* Generic.Deleted */
.codehilite .ge { font-style: italic } /* Generic.Emph */
.codehilite .gi { color: #a6e22e } /* Generic.Inserted */
.codehilite .gs { font-weight: bold } /* Generic.Strong */
.codehilite .gh { color: #d5d1be } /* Generic.Heading */
.codehilite .gu { color: #d5d1be } /* Generic.Subheading */
.codehilite .kc { color: #66d9ef } /* Keyword.Constant */
.codehilite .kd { color: #66d9ef } /* Keyword.Declaration */
.codehilite .kn { color: #f92672 } /* Keyword.Namespace */
.codehilite .kp { color: #66d9ef } /* Keyword.Pseudo */
.codehilite .kr { color: #66d9ef } /* Keyword.Reserved */
.codehilite .kt { color: #66d9ef } /* Keyword.Type */
.codehilite .ld { color: #e6db74 } /* Literal.Date */
.codehilite .m { color: #ae81ff } /* Literal.Number */
.codehilite .s { color: #e6db74 } /* Literal.String */
.codehilite .na { color: #a6e22e } /* Name.Attribute */
.codehilite .nb { color: #f8f8f2 } /* Name.Builtin */
.codehilite .nc { color: #a6e22e } /* Name.Class */
.codehilite .no { color: #66d9ef } /* Name.Constant */
.codehilite .nd { color: #a6e22e } /* Name.Decorator */
.codehilite .ni { color: #f8f8f2 } /* Name.Entity */
.codehilite .ne { color: #a6e22e } /* Name.Exception */
.codehilite .nf { color: #a6e22e } /* Name.Function */
.codehilite .nl { color: #f8f8f2 } /* Name.Label */
.codehilite .nn { color: #f8f8f2 } /* Name.Namespace */
.codehilite .nx { color: #a6e22e } /* Name.Other */
.codehilite .py { color: #f8f8f2 } /* Name.Property */
.codehilite .nt { color: #f92672 } /* Name.Tag */
.codehilite .nv { color: #f8f8f2 } /* Name.Variable */
.codehilite .ow { color: #f92672 } /* Operator.Word */
.codehilite .w { color: #f8f8f2 } /* Text.Whitespace */
.codehilite .mb { color: #ae81ff } /* Literal.Number.Bin */
.codehilite .mf { color: #ae81ff } /* Literal.Number.Float */
.codehilite .mh { color: #ae81ff } /* Literal.Number.Hex */
.codehilite .mi { color: #ae81ff } /* Literal.Number.Integer */
.codehilite .mo { color: #ae81ff } /* Literal.Number.Oct */
.codehilite .sa { color: #e6db74 } /* Literal.String.Affix */
.codehilite .sb { color: #e6db74 } /* Literal.String.Backtick */
.codehilite .sc { color: #e6db74 } /* Literal.String.Char */
.codehilite .dl { color: #e6db74 } /* Literal.String.Delimiter */
.codehilite .sd { color: #e6db74 } /* Literal.String.Doc */
.codehilite .s2 { color: #e6db74 } /* Literal.String.Double */
.codehilite .se { color: #ae81ff } /* Literal.String.Escape */
.codehilite .sh { color: #e6db74 } /* Literal.String.Heredoc */
.codehilite .si { color: #e6db74 } /* Literal.String.Interpol */
.codehilite .sx { color: #e6db74 } /* Literal.String.Other */
.codehilite .sr { color: #e6db74 } /* Literal.String.Regex */
.codehilite .s1 { color: #e6db74 } /* Literal.String.Single */
.codehilite .ss { color: #e6db74 } /* Literal.String.Symbol */
.codehilite .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.codehilite .fm { color: #a6e22e } /* Name.Function.Magic */
.codehilite .vc { color: #f8f8f2 } /* Name.Variable.Class */
.codehilite .vg { color: #f8f8f2 } /* Name.Variable.Global */
.codehilite .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.codehilite .vm { color: #f8f8f2 } /* Name.Variable.Magic */
.codehilite .il { color: #ae81ff } /* Literal.Number.Integer.Long */
