@import url('prism.css');
@import url('scrollbar.css');
@import url('inputs.css');
@import url('tabs.css');
@import url('tasklist.css');
@import url('files.css');
@import url('fonts.css');
@import url('nav.css');
@import url('numbered_headings.css');

html {
    font-size: 1em;
}

body {
    background-color: var(--color-bg);
    color: var(--color-fg);
    font-family: var(--font-body);
    margin: 0;
}

header,
footer {
    text-align: left;
    width: 100%;
}

header {
    position: sticky;
    top: 0;
    width: 99%;
    margin: none;
    border-bottom: 1px dashed gray;
    background: var(--color-bg);
    padding-bottom: 10px;
    z-index: 99999999;
    display: flex;
    flex-direction: row;
    padding: 0.2em;
}

@media screen and (max-height: 10em) {
    header {
        position: relative;
    }
}

@media screen and (max-width: 800px) {
    header {
        position: relative;
        flex-direction: column;
    }
}

@media print {
    header {
        position: relative;
    }
}

#sitename-text {
    display: flex;
    flex-direction: column;

    & h1,
    & h2 {
        font-size: 1.5em;
        padding-left: 0.5em;
    }

    & h2 {
        font-size: 1em;
    }
}

main {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 1em;
    line-height: 1.2em;
    /* 1.15em, although standard, is a little too tight */
}

footer {
    color: var(--color-footer);
    text-align: center;

    & a,
    & a:visited,
    & a::after {
        color: inherit;
        text-decoration-color: inherit;
        cursor: pointer;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-heading);
    font-family: var(--font-heading);
    line-height: 115%;
}

h1 {
    text-align: center;
}

blockquote {
    margin-left: 1em;
    padding-left: 0.25em;
    border-left: 3px dotted gray;
}

.post-info {
    font-style: italic;
    border: 1px solid gray;
    padding: 1em;
    font-size: 70%;
}

#extras {
    display: flex;
    flex-direction: row;
    border: 1px solid gray;
    font-style: italic;
    font-size: 70%;

    & div,
    & ul {
        display: flex;
        flex-direction: column;
        width: 50%;
    }

    & li {
        display: flex;
        flex-direction: column;
        list-style-type: none !important;
        padding: 0.25em;
    }
}


/* basic links */

a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--color-link);

    &:visited {
        text-decoration-color: var(--color-link-visited);
    }
}


/* replace that with your domain */

a[href^="http"]:not([href*="dragoncoder047.github.io"])::after {
    font-family: Icons;
    content: "open_in_new";
    color: var(--theme-3-darker);
}

/* code */

pre,
code {
    font-family: var(--font-code);
    size: 16px;
    tab-size: 4;
    -moz-tab-size: 4;
    -o-tab-size: 4;
}

pre {
    padding: 0.5em;
    border-radius: 10px;
    overflow: auto;
    max-height: 75vh;
    background: var(--black);
}

code {
    border-bottom: 1px dotted var(--theme-3-darker);
}

pre code {
    border: none;
}


/* tables */

table {
    width: 100%;
}

table,
thead,
tbody,
th,
tr,
td {
    border-collapse: collapse;
    border: 1px solid gray;
    padding: 2px;
}

thead {
    position: sticky;
    background: var(--color-bg);
    border: 1px solid gray;
}

th {
    border-collapse: collapse;
    border: 1px solid gray;
}


/* callout boxes */

details,
div.admonition {
    padding: 10px;
    margin: 1em;
    background-color: var(--black);
    border-radius: 10px;
    border: 2px solid gray;
}

details.danger,
div.admonition.danger {
    border-color: red;
}

details.info,
div.admonition.info {
    border-color: blue;
}

details.warning,
div.admonition.warning {
    border-color: yellow;
}

p.admonition-title {
    font-weight: bold;
}


/* definition lists */

dl dt {
    margin-top: 0.75em;
}

dd+dd {
    margin-top: 0.5em;
}


/* figures */

figure {
    border: 1px dotted gray;
    padding: 0.7em;
}

img {
    max-height: 60vh;
    max-width: 100%;
    cursor: zoom-in;
}

figure.float-right,
figure.float-left {
    max-width: 25%;
}

@media screen and (max-width: 800px) {

    /* don't float figures on narrow screens */
    figure.float-right,
    figure.float-left {
        max-width: 80%;
        float: none;
    }
}

figcaption {
    font-style: italic;
    opacity: 70%;
}


/* strikeout */

del {
    text-decoration: line-through;
    opacity: 50%;
}


/* some helper classes */

.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.float-right {
    float: right;
}

.float-left {
    float: left;
}


/* custom selection colors */

::selection {
    color: black;
    background-color: #ff07;
}