/* Custom Fonts Setup */
@font-face {
    font-family: "Ubuntu Mono";
    src: url("./Ubuntu_Mono/UbuntuMono-Bold.ttf") format("truetype");
    font-weight: bold;
}
@font-face {
    font-family: "Ubuntu Mono";
    src: url("./Ubuntu_Mono/UbuntuMono-BoldItalic.ttf") format("truetype");
    font-weight: bold;
    font-style: italic;
}
@font-face {
    font-family: "Ubuntu Mono";
    src: url("./Ubuntu_Mono/UbuntuMono-Italic.ttf") format("truetype");
    font-style: italic;
}
@font-face {
    font-family: "Ubuntu Mono";
    src: url("./Ubuntu_Mono/UbuntuMono-Regular.ttf") format("truetype");
}

@font-face {
    font-family: "Open Sans";
    src: url("./Open_Sans/OpenSans-Bold.ttf") format("truetype");
    font-weight: bold;
}
@font-face {
    font-family: "Open Sans";
    src: url("./Open_Sans/OpenSans-BoldItalic.ttf") format("truetype");
    font-weight: bold;
    font-style: italic;
}
@font-face {
    font-family: "Open Sans";
    src: url("./Open_Sans/OpenSans-Italic.ttf") format("truetype");
    font-style: italic;
}
@font-face {
    font-family: "Open Sans";
    src: url("./Open_Sans/OpenSans-Regular.ttf") format("truetype");
}

body,
pre,
code {
    font-family: "Ubuntu Mono", monospace;
}

/* Font Sizing and type Overwrite */
body {
    font-size: 1rem;
    line-break: loose;
}

h1,
h2,
h3,
h4,
h5,
h6,
p.admonition-title,
div.sphinxsidebar input {
    font-family: "Open Sans", "Helvetica", "Arial", sans-serif !important;
}

p code.py-class {
    font-weight: normal;
    font-style: italic;
}

/* Ensure LOGO takes whole line width */
div.body > a:first-child img {
    display: block;
}

/* Page Size */
div.document {
    min-width: 800px;
    width: 65vw;
    max-width: unset;
}
div.bodywrapper,
div.body {
    width: calc(65vw - 250px);
    max-width: unset;
}

/* Override `> quote` .md file block display */
section > blockquote {
    border-left: 5px solid #3e4349;
    border-right: 5px solid #3e4349;
    padding: 0 1rem;
    margin: 0 1rem;
    text-align: justify;
    font-style: italic;
}

/* Spread the classes and functions away from each other and add header summary */
section *:not(.class) + .class,
section .class:is(.enum, .flag) + .class:not(:is(.enum, .flag)),
section *:not(.method) + .method,
section *:not(.attribute) + .attribute,
section *:not(.function) + .function,
section *:not(.exception) + .exception,
section *:not(.class:is(.enum, .flag)) + .class:is(.enum, .flag) {
    margin-top: 2rem;
}

section *:not(.class) + .class::before,
section .class:is(.enum, .flag) + .class:not(:is(.enum, .flag))::before,
section *:not(.method) + .method::before,
section *:not(.attribute) + .attribute::before,
section *:not(.function) + .function::before,
section *:not(.exception) + .exception::before,
section *:not(.class:is(.enum, .flag)) + .class:is(.enum, .flag)::before {
    display: block;
    margin: 0.5rem 0;
    font-style: italic;
}

section *:not(.function) + .function::before {
    content: "Functions:";
}
section *:not(.method) + .method::before {
    content: "Methods:";
}
section *:not(.attribute) + .attribute::before {
    content: "Attributes:";
}
section *:not(.class) + .class::before,
section .class:is(.enum, .flag) + .class:not(:is(.enum, .flag))::before {
    content: "Classes:";
}
section *:not(.exception) + .exception::before {
    content: "Exceptions:";
}
section *:not(.class:is(.enum, .flag)) + .class:is(.enum, .flag)::before {
    content: "Enums:";
}

/* Coloring and Spacing */
div.body {
    color: #3e4349;
}
div.body h1 {
    font-size: 125%;
}
div.body:not(:has(a.image-reference)) h1 {
    line-break: anywhere;
}

a {
    color: #5d2cd1;
}

a:hover {
    color: #7546e3;
}

a:hover:has(img) {
    border-bottom: 0px !important;
}

*:is(h1, h2, h3, h4, h5, h6) code {
    font-size: inherit;
}
p code {
    padding: 1px 3px;
    font-size: smaller;
}

p.version-warning {
    background-color: #7546e3;
}

div.highlight {
    mask-image: linear-gradient(to right, transparent 0, black 0.8rem 16px, black calc(100% - 0.8rem), transparent 100%);
}

/* Let the class/function definition stay visible while inside its details */
section > dl > dt:first-child {
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 3px 0;
}
section > dl > dt:first-child:not(:target) {
    background-color: #fff;
}

section > dl {
    margin: 2rem 0;
    border-top: 1px dashed #3e4349;
}

em.property {
    font-size: smaller;
    opacity: 0.8;
}

dt:target {
    scroll-margin-top: 8rem;
}

/* Make sure too long definitions break in sensible place */
.sig-prename {
    font-size: smaller;
}

.sig-paren + .sig-param {
    display: inline-block;
}

/* Override position of the Main Nav Menu */
.sphinxsidebar {
    position: sticky;
    top: 0;
}
.sphinxsidebar a.current {
    color: #7546e3;
}
