:root {
    --zi-color-primary: #009ee0;
    --zi-color-secondary: #172983;
    --zi-color-intermediary: #007ec4;
}

[data-md-color-scheme="default"] {
    --md-footer-logo-dark-mode: none;
    --md-footer-logo-light-mode: block;
    --md-admonition-bg-color: #e1e1e1;
    --md-footer-fg-color: var(--md-default-fg-color);
    --md-footer-bg-color: var(--md-default-bg-color);
    --md-footer-fg-color--dark: var(--md-default-fg-color);
    --md-footer-bg-color--dark: var(--md-default-bg-color);
    --md-footer-fg-color--light: var(--md-default-fg-color);
    --md-footer-bg-color--light: var(--md-default-bg-color);
    --md-accent-fg-color: var(--zi-color-secondary);
    --md-typeset-a-color: var(--zi-color-primary);
    --md-typeset-a-color--dark: var(--zi-color-secondary);
    --md-typeset-table-color: #0000008a;
    --md-typeset-table-color--light: #00000020;
	--md-footer-fg-color--lighter: var(--md-default-fg-color);
    --zi-figure-fg-color: var(--md-default-fg-color);
    --zi-figure-bg-color: var(--md-default-bg-color);
}

[data-md-color-scheme="slate"] {
    --md-footer-logo-dark-mode: block;
    --md-footer-logo-light-mode: none;
    --md-primary-fg-color: #2e303e;
    --md-admonition-bg-color: var(--md-code-bg-color);
    --md-accent-fg-color: var(--zi-color-primary);
    --md-default-fg-color--lighter: var(--zi-color-primary);
    --md-typeset-a-color: var(--zi-color-primary);
    --md-typeset-a-color--dark: var(--zi-color-intermediary);
    --zi-figure-fg-color: hsla(0, 0%, 0%, 0.87);
    --zi-figure-bg-color: hsla(0, 0%, 100%, 0.99);
}

@font-face {
    font-family: ZIAkkurat Regular Web;
    src:
        url(font/ZIAkkurat-Regular.woff2) format("woff2"),
        url(font/ZIAkkurat-Regular.woff) format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap
}

@font-face {
    font-family: ZIAkkurat Light Web;
    src:
        url(font/ZIAkkurat-Light.woff2) format("woff2"),
        url(font/ZIAkkurat-Light.woff) format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap
}

@font-face {
    font-family: SourceHanSansSC Regular;
    src:
        url(font/SourceHanSansSC-Medium.woff2) format("woff2"),
        url(font/SourceHanSansSC-Medium.woff) format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap
}

@font-face {
    font-family: SourceHanSansSC Light;
    src:
        url(font/SourceHanSansSC-Light.woff2) format("woff2"),
        url(font/SourceHanSansSC-Light.woff) format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap
}

@font-face {
    font-family: Akkurat Mono Regular Web;
    src:
        url(font/AkkuratMonoLLWeb-Regular.woff2) format('woff2'),
        url(font/AkkuratMonoLLWeb-Regular.woff) format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

:root {
    --md-text-font: "ZIAkkurat Light Web", "SourceHanSansSC Light";
    --md-code-font: "Akkurat Mono Regular Web";
}

/* No special bold crap */
b,
dt,
strong,
th {
    font-family: ZIAkkurat Regular Web, SourceHanSansSC Regular, sans-serif;
    font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: ZIAkkurat Regular Web, SourceHanSansSC Regular, sans-serif;
}


/* Light And Dark logo */
#logo_light_mode {
    display: var(--md-footer-logo-light-mode);
}

#logo_dark_mode {
    display: var(--md-footer-logo-dark-mode);
}

/* round edges of search bar */
/* .md-search__form {
    border-radius: 25px;
    border: 2px solid #cccccc;
} */

/* Increase fontsize of nav*/
.md-nav {
    font-size: 0.8rem;
}

.md-nav.md-nav--primary {
    font-size: 0.9rem;
}

/* Custom admonitions */
.md-typeset .admonition-title::before,
.md-typeset summary::before {
    display: none;
}

.md-typeset .admonition-title,
.md-typeset summary {
    padding-left: 0.2rem !important;
    width: fit-content;
    block-size: fit-content;
    font-weight: 400;
    padding-bottom: 0;
    padding-top: 0.1rem;
}

.md-typeset .admonition,
.md-typeset details {
    border: none;
    box-shadow: none;
}

.md-typeset .warning>.admonition-title,
.md-typeset .warning>summary {
    background-color: #ff910080;
}

.md-typeset .important>.admonition-title,
.md-typeset .important>summary {
    background-color: #fd6e6e99;
}

.md-typeset .note>.admonition-title,
.md-typeset .note>summary {
    background-color: #0053d45e;
}

.md-typeset .info>.admonition-title,
.md-typeset .info>summary {
    background-color: #0053d45e;
}

.md-typeset .tip>.admonition-title,
.md-typeset .tip>summary {
    background-color: #00bfa580;
}


.md-typeset .admonition.control,
.md-typeset details.control {
    border-color: var(--md-admonition-fg-color);
    background-color: var(--md-default-bg-color);
}

.md-typeset .control>.admonition-title,
.md-typeset .control>summary {
    /background-color: var(--md-default-bg-color);
    font-family: ZIAkkurat Regular Web, SourceHanSansSC Regular, sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    width: 400px;
}

.md-typeset .control>.admonition-title::before,
.md-typeset .control>summary::before {
    background-color: var(--md-default-bg-color);
    -webkit-mask-image: var(--md-admonition-icon--node);
    mask-image: var(--md-admonition-icon--node);
}



/* Logo size */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
    height: 40px;
    width: 130px;
    margin: 15px;
}

.md-header__button.md-logo {
    margin: 0;
    padding: 0;
}

/* Contact us */
.contact-us {
    font-size: .8rem;
    margin-left: 15px;
    color: var(--md-typeset-a-color);
}

/* Footer */
.md-footer__link {
    padding-top: .4rem;
    padding-bottom: 0rem;
}

.md-footer__link.md-footer__link {
    color: var(--md-typeset-a-color);
}

.md-footer__inner {
    border-top: 1px solid var(--md-default-fg-color);
}

/* Header color and size */
.md-header__title--active,
.md-header__title {
    color: var(--md-typeset-a-color);
}

article h1,
.md-typeset h1 {
    color: var(--md-typeset-a-color);
    font-size: 1.5rem;
    font-weight: 400;
}

article h2,
.md-typeset h2 {
    color: var(--md-typeset-a-color);
    font-size: 1.4rem;
    font-weight: 400;
}

.doc h2 {
    font-size: 1.1rem;
}


article h3,
.md-typeset h3 {
    color: var(--md-typeset-a-color--dark);
    font-size: 1.2rem;
    font-weight: 400;
}

.doc h3 {
    font-size: 1rem;
}

/* Custom bullets */
article ul {
    list-style: none;
    display: table;
    padding-left: 0px;
}

article ul li {
    display: table-row;
}

article ul li:before {
    font-size: 0.8em;
    content: '\00F8FF';
    display: table-cell;
    text-align: right;
    padding-right: 10px;
}

.md-typeset__table {
    display: inherit;
}

/* table adjustments */
.md-typeset table:not([class]) {
    display: table;
    border-collapse: collapse;
    border: none;
}

.md-typeset table:not([class]) tr {
    border: none;
}

.md-typeset table:not([class]) tr td,
.md-typeset table:not([class]) tr th {
    border: .05rem solid var(--md-typeset-table-color);
}

.md-typeset table ul {
    margin: 0;
}

figcaption {
    font-size: .64rem;
}

figure {
    background-color: var(--zi-figure-bg-color);
    color: var(--zi-figure-fg-color);
    padding: 7px 7px 0;
}

.icon {
    height: 20px !important;
    margin-top: -24px;
    position: relative;
    top: 5px;
    vertical-align: baseline;
}

/* PDF icon */
.pdf-download {
    background-image: url(../pdf.svg);
    background-repeat: no-repeat;
    background-size: 90%;
    display: block;
    height: 40px;
    padding: 0;
    width: 40px;
    margin-left: 0.5rem;
}

.pdf-download:hover {
    background-image: url(../pdf-over.svg);
}

a:hover .pdf-download {
    background-image: url(../pdf-over.svg);
}

/* Home icon */
.home_button_light {
    background-image: url(../home.svg);
    background-repeat: no-repeat;
    background-size: 90%;
    display: block;
    height: 30px;
    padding: 0;
    width: 30px;
    display: var(--md-footer-logo-light-mode);
}

.home_button_light:hover {
    background-image: url(../home-over.svg);
}

a:hover .home_button_light {
    background-image: url(../home-over.svg);
}

.home_button_dark {
    background-image: url(../home_white.svg);
    background-repeat: no-repeat;
    background-size: 90%;
    display: block;
    height: 30px;
    padding: 0;
    width: 30px;
    display: var(--md-footer-logo-dark-mode);
}

.home_button_dark:hover {
    background-image: url(../home-over_white.svg);
}

a:hover .home_button_dark {
    background-image: url(../home-over_white.svg);
}

.md-header__title {
    margin-left: .1rem !important;
    /* Reduce margin to make home logo look nicer */
}

/* Equations */
.katex {
    font-size: 1em !important;
}

/* Overview table */
.overview_table td {
    vertical-align: middle;
    text-align: center;
    padding: 5px;
}

.device_name {
    font-weight: 600;
    font-size: 0.8rem;
}

/* Grid cards */

.md-typeset .grid {
    grid-gap: .4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, 10rem) !important;
    margin: 1em 0
}

.md-typeset .grid.cards>ol,
.md-typeset .grid.cards>ul {
    display: contents
}

.md-typeset .grid.cards>ol>li,
.md-typeset .grid.cards>ul>li,
.md-typeset .grid>.card {
    border: .05rem solid var(--md-default-fg-color--lightest);
    border-radius: .1rem;
    display: block;
    margin: 0;
    padding: .8rem;
    transition: border .25s, box-shadow .25s
}

.md-typeset .grid.cards>ol>li:focus-within,
.md-typeset .grid.cards>ol>li:hover,
.md-typeset .grid.cards>ul>li:focus-within,
.md-typeset .grid.cards>ul>li:hover,
.md-typeset .grid>.card:focus-within,
.md-typeset .grid>.card:hover {
    border-color: #0000;
    box-shadow: var(--md-shadow-z2)
}

.md-typeset .grid.cards>ol>li>hr,
.md-typeset .grid.cards>ul>li>hr,
.md-typeset .grid>.card>hr {
    margin-bottom: 1em;
    margin-top: 1em
}

.md-typeset .grid.cards>ol>li>:first-child,
.md-typeset .grid.cards>ul>li>:first-child,
.md-typeset .grid>.card>:first-child {
    margin-top: 0
}

.md-typeset .grid.cards>ol>li>:last-child,
.md-typeset .grid.cards>ul>li>:last-child,
.md-typeset .grid>.card>:last-child {
    margin-bottom: 0
}

.md-typeset .grid>*,
.md-typeset .grid>.admonition,
.md-typeset .grid>.highlight>*,
.md-typeset .grid>.highlighttable,
.md-typeset .grid>.md-typeset details,
.md-typeset .grid>details,
.md-typeset .grid>pre {
    margin-bottom: 0;
    margin-top: 0
}

.md-typeset .grid>.highlight>pre:only-child,
.md-typeset .grid>.highlight>pre>code,
.md-typeset .grid>.highlighttable,
.md-typeset .grid>.highlighttable>tbody,
.md-typeset .grid>.highlighttable>tbody>tr,
.md-typeset .grid>.highlighttable>tbody>tr>.code,
.md-typeset .grid>.highlighttable>tbody>tr>.code>.highlight,
.md-typeset .grid>.highlighttable>tbody>tr>.code>.highlight>pre,
.md-typeset .grid>.highlighttable>tbody>tr>.code>.highlight>pre>code {
    height: 100%
}

/* Custom admonition for nodes */

:root {
    --md-admonition-icon--node: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 3h6v4H3V3m12 7h6v4h-6v-4m0 7h6v4h-6v-4m-2-4H7v5h6v2H5V9h2v2h6v2Z"/></svg>')
}

.md-typeset .admonition.node,
.md-typeset details.node {
    border-color: var(--md-admonition-fg-color);
    background-color: var(--md-default-bg-color);
}

.md-typeset .node>.admonition-title,
.md-typeset .node>summary {
    background-color: var(--md-default-bg-color);
    font-family: ZIAkkurat Regular Web, SourceHanSansSC Regular, sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
}

.md-typeset .node>.admonition-title::before,
.md-typeset .node>summary::before {
    background-color: var(--md-default-bg-color);
    -webkit-mask-image: var(--md-admonition-icon--node);
    mask-image: var(--md-admonition-icon--node);
}

.md-typeset summary::after {
    right: .4rem;
    top: 0.15rem;
}

.node_doc td {
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

.node_doc table,
.node_doc td .node_doc tr .node_doc th {
    border: none !important;
}

/* .md-typeset .grid>.tabbed-set {
    margin-bottom: 0;
    margin-top: 0
} */

/* .grid ul li:before {
    content: '';
    display: none;
} */

/* Removes the margin and the number introduced by the Notebook input cell number */
.jupyter-wrapper .jp-InputPrompt {
    display: none !important;
}

/* Removes the margin and the number introduced by the Notebook output cell number */
.jupyter-wrapper .jp-OutputArea-prompt {
    display: none !important;
}
