/* Use https://www.audioeye.com/color-contrast-checker/ to ensure colour contrast */

/* Import Lexend font family */
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;500;800&display=swap');

/* Can use @import url('https://www.nerdfonts.com/assets/css/webfont.css'); but
that breaks Pygments named-function highlighting by using completely different
font. Instead using only what's needed from the CSS directly with .nf selector
removed. */
@font-face {
    font-family: "NerdFontsSymbols Nerd Font";
    src: url("https://www.nerdfonts.com/assets/fonts/Symbols-2048-em Nerd Font Complete.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
}

.headerlink a.reference.internal,
.nerd-font,
.nerd-fonts {
    font-family: "NerdFontsSymbols Nerd Font";
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html[data-theme="light"] {
    --pst-color-primary: #0197cd;
    --pst-color-secondary: #0197cd;
    --pst-color-secondary-highlight: #6d6a73;
    --pst-color-primary-highlight: #6d6a73;
    /* default muted-foreground doesn't work with light-blue background on sigs */
    --muted-foreground: #636d83;
    --sig-color: #19527b;
    --sig-border-top: #93bad4;
    --sig-background: #e7f2fa;
    --sig-border-left-color: #3e4446;
    --sig-border-left: #ccc;
    --hover-box-shadow: rgba(0, 0, 0, 0.12);
    --footer-background: #f8f9fa;
    --footer-border-top: #e9ecef;
    --footer-copyright-color: #6c757d;
    --footer-section-h4: #2c3e50;
    --footer-section-p: #6c757d;
    --footer-section-a: #3498db;
    --footer-section-a-hover: #2980b9;
    --social-links-a: #6c757d;
    --social-links-a-hover: #3498db;
}

html[data-theme="dark"] {
    --pst-color-link: #42c9ff;
    --pst-color-muted: #b9b9b9;
    --pst-color-primary: #0197cd;
    --pst-color-secondary: #0197cd;
    --pst-color-secondary-highlight: #6d6a73;
    --pst-color-primary-highlight: #6d6a73;
    --muted-foreground: #636d83;
    --sig-color: ##fff;
    --sig-border-top: #4e5b64;
    --sig-background: #29313d;
    --sig-border-left-color: #3e4446;
    --sig-border-left: #666;
    --hover-box-shadow: rgba(0, 0, 0, 0.12);
    --footer-background: var(--sig-background);
    --footer-border-top: #686868;
    --footer-copyright-color: #6c757d;
    --footer-section-h4: ##d1d2d2;
    --footer-section-p: #6c757d;
    --footer-section-a: var(--pst-color-link);
    --footer-section-a-hover: var(--pst-color-link-hover);
    --social-links-a: #6c757d;
    --social-links-a-hover: #3498db;
}

:root>* {
    --md-graphviz-edge-color: var(--pst-color-text-base);
    --md-graphviz-node-bg-color: var(--pst-color-surface);
    --md-graphviz-node-fg-color: var(--muted-foreground);
    --md-graphviz-label-bg-color: var(--footer-section-h4);
    --md-graphviz-label-fg-color: var(--pst-color-inline-code);
    --md-graphviz-a-hover-color: var(--footer-section-a-hover);
    --md-code-fg-color: var(--pst-color-inline-code);
    --md-text-font: "Lexend";
    --md-text-font-family: 'Lexend', sans-serif;
    --md-code-font: var(--pst-font-family-monospace);
}

.h-14 {
    height: 5rem;
}

img {
    width: 15rem;
    height: auto;
    filter: invert(0) !important;
}

img.shadowed-image {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    margin: 30px auto;
}

.top-banner p {
    margin: 0;
}

* {
    /* Disable ligatures */
    font-variant-ligatures: none;
}

.copy {
    display: none;
}



/* Updated font assignments */
h1 {
    font-family: 'Lexend', sans-serif !important;
    /* Extra Bold */
    font-weight: 800 !important;
}

h2,
h3,
h4,
h5,
h6,
p.caption {
    font-family: 'Lexend', sans-serif !important;
    /* Medium for subheadings */
    font-weight: 500 !important;
}

html,
body,
p {
    font-family: 'Lexend', sans-serif !important;
    /* Light */
    font-weight: 300 !important;
}

.sig-object {
    display: table;
    margin: 6px 0;
    color: var(--sig-color) !important;
    border-top: 3px solid var(--sig-border-top);
    background: var(--sig-background) !important;
    padding: 6px;
    position: relative;
}

:is(.class, .exception)>dd> :is(.attribute, .method, .property)>.sig-object {
    border-left-color: var(--sig-border-left-color);
    border: none;
    border-left: 3px solid var(--sig-border-left);
}

/* Ensure that inline image (mainly vscode extensions pane icon) stays inline */
#content img.inline {
    margin-top: -1.5ex;
}

/* Card hover effects */
.sd-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.sd-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--hover-box-shadow);
}

/* Footer Styles */
.footer-banner {
    background-color: var(--footer-background);
    border-top: 1px solid var(--footer-border-top);
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-copyright {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--footer-border-top);
    width: 100%;
}

.footer-copyright p {
    margin: 0;
    color: var(--footer-copyright-color);
    font-size: 0.9rem;
}

.footer-sections {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    width: 100%;
    justify-content: center;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
}

.footer-section h4 {
    color: var(--footer-section-h4);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.footer-section p {
    margin: 0;
    color: var(--footer-section-p);
    font-size: 0.9rem;
    line-height: 1.5;
}

.footer-section a {
    color: var(--footer-section-a);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: var(--footer-section-a-hover);
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    color: var(--social-links-a);
    font-size: 0.9rem;
}

.social-links a:hover {
    color: var(--social-links-a-hover);
}

@media (max-width: 768px) {
    .footer-sections {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-section {
        text-align: center;
    }
}

/* Align navbar with content container */
.bd-header__inner {
    max-width: 1200px;
    /* Adjust if your content uses a different max-width */
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.headerlink {
    /* Make invisible but still able to receive mouse events */
    --link-color: transparent;
}

.headerlink:hover {
    --link-color: var(--pst-color-link-hover);
}

/*
Match permalink display to automatically generated ones for sections and symbols 
*/
.headerlink a.reference.internal {
    text-decoration: none;
    color: var(--link-color);
}

.graphviz {
    margin: 1em 0;
}

.graphviz a:hover>text {
    fill: var(--footer-section-a-hover) !important;
}

g>a[href] {
    --md-code-fg-color: var(--footer-section-a);
}

.navbar-header-items__end {
    /* disable overflow wrapping to make sure that version switcher fits in the navbar */
    flex-flow: unset !important;
}

.navbar-header-items__center a.nav-internal {
    color: var(--footer-section-a) !important;
    font-weight: bold;
}

.nav-link.nav-external::after {
    /* remove external link icon (all links but self are external) */
    content: "";
}

/* make more space for header links, default width was 25% */
@media (min-width: 960px) {
    .col-lg-3 {
        width: 20%;
    }
}

.caption-text>a {
    color: var(--pst-color-text-base);
    text-decoration: none;
}