/* Fix /page#foo going to the top of the viewport and being hidden by the navbar */
html {
    scroll-padding-top: 50px;
}

/* Fit the Twitter handle alongside the GitHub one in the top right. */
div.md-header__source {
    width: revert;
    max-width: revert;
}

a.md-source {
    display: inline-block;
}

.md-source__repository {
    max-width: 100%;
}

/* Emphasise sections of nav on left hand side */
nav.md-nav {
    padding-left: 5px;
}

nav.md-nav--secondary {
    border-left: none !important;  /* Remove navigation line */
}

.md-nav__title {
    font-size: 0.9rem;
}

.md-nav__item--section > .md-nav__link {
    font-size: 0.9rem;
}

/* Indent autogenerated documentation */
div.doc-contents {
    padding-left: 15px;
    border-left: none;  /* Remove content indentation lines */
}

/* Increase visibility of splitters "---" */
[data-md-color-scheme="default"] .md-typeset hr {
    border-bottom-color: rgb(0, 0, 0);
    border-bottom-width: 1pt;
}

[data-md-color-scheme="slate"] .md-typeset hr {
    border-bottom-color: rgb(230, 230, 230);
}

/* More space at the bottom of the page */
.md-main__inner {
    margin-bottom: 1.5rem;
}

/* Remove prev/next footer buttons */
.md-footer__inner {
    display: none;
}

/* Change font sizes */
html {
    font-size: 110%;
}

.md-typeset .admonition {
    font-size: 100% !important;
}

.md-typeset details {
    font-size: 100% !important;
}

.md-typeset h1 {
    font-size: 1.6rem;
}

.md-typeset h2 {
    font-size: 1.5rem;
}

.md-typeset h3 {
    font-size: 1.3rem;
}

.md-typeset h4 {
    font-size: 1.1rem;
}

.md-typeset h5 {
    font-size: 0.9rem;
}

.md-typeset h6 {
    font-size: 0.8rem;
}

/* Bugfix: remove the superfluous parts */
.md-typeset details .mkdocstrings > h4 {
    display: none;
}

.md-typeset details .mkdocstrings > h5 {
    display: none;
}

/* Change default colours for <a> tags */
[data-md-color-scheme="default"] {
    --md-typeset-a-color: rgb(0, 189, 164) !important;
}

[data-md-color-scheme="slate"] {
    --md-typeset-a-color: rgb(0, 189, 164) !important;
}

/* Highlight functions, classes etc. type signatures */
[data-md-color-scheme="default"] {
    --doc-heading-color: #DDD;
    --doc-heading-border-color: #CCC;
    --doc-heading-color-alt: #F0F0F0;
}

[data-md-color-scheme="slate"] {
    --doc-heading-color: rgb(25,25,33);
    --doc-heading-border-color: rgb(25,25,33);
    --doc-heading-color-alt: rgb(33,33,44);
    --md-code-bg-color: rgb(38,38,50);
}

h4.doc-heading {
    background-color: var(--doc-heading-color);
    border: solid var(--doc-heading-border-color);
    border-width: 1.5pt;
    border-radius: 2pt;
    padding: 0pt 5pt 2pt 5pt;
    border-left: 2px solid rgba(230, 230, 230);  /* Add line next to headings */
}

h5.doc-heading, h6.heading {
    background-color: var(--doc-heading-color-alt);
    border-radius: 2pt;
    padding: 0pt 5pt 2pt 5pt;
    border-left: 2px solid rgba(230, 230, 230);  /* Add line next to headings */
}

/* Style differences for classes vs functions */
.doc-class > .doc-heading {
    background-color: var(--doc-heading-color-alt);
    border-left: 4px solid rgb(0, 189, 164) !important;
    margin-top: 2em !important;
    padding-left: 10pt !important;
}

.doc-function > .doc-heading {
    background-color: var(--doc-heading-color);
    border-left: 2px solid rgb(0, 189, 164, 0.6) !important;
    margin-top: 1em !important;
}

.doc-attribute > .doc-heading {
    background-color: var(--doc-heading-color-alt);
    font-size: 0.95em;
}

.doc-method > .doc-heading {
    background-color: var(--doc-heading-color);
    border-left: 2px solid rgb(0, 189, 164, 0.4) !important;
    margin-top: 1em !important;
}

/* Add more space between major sections */
.doc-class {
    margin-bottom: 2em;
}

/* Add lighter background for documentation content */
.doc.doc-contents {
    background-color: rgb(43, 47, 59);  /* Adjust this color for dark mode */
    padding: 10px;
    margin: 5px 0;
    border-radius: 4px;
}

/* Light mode version */
[data-md-color-scheme="default"] .doc.doc-contents {
    background-color: rgb(248, 249, 250);  /* Adjust this color for light mode */
}

/* Override any nested doc-contents */
.doc.doc-contents .doc.doc-contents {
    background-color: transparent;
    padding: 0;
    margin: 0;
}
