@font-face {
    font-display: swap;
    font-family: ApercuMoia;
    font-weight: 100;
    src: url(./fonts/ApercuMOIA-Light-v4.0.otf) format("opentype")
}

@font-face {
    font-display: swap;
    font-family: ApercuMoia;
    font-weight: 700;
    src: url(./fonts/ApercuMOIA-Bold-v4.0.otf) format("opentype")
}

html {
    --pst-font-family-base: ApercuMoia, var(--pst-font-family-base-system);
    --pst-font-family-heading: ApercuMoia, var(--pst-font-family-base-system);
}

.bd-article-container h1, .bd-article-container h2 {
    font-weight: 700;
}

html[data-theme=light] {
    --pst-color-background: #fefdfc;
    --pst-color-text-base: #000c15;
    --pst-color-muted: #000c15;
    --pst-color-secondary: #E6AA33;
    --pst-color-primary: #0532ff;
    --pst-color-link: #0532ff;
    --pst-color-accent: #E6AA33;
}

html[data-theme=dark] {
    --pst-color-background: #000c15;
    --pst-color-text-base: #ced6dd;
    --pst-color-muted: #ced6dd;
    --pst-color-secondary: #E6AA33;
    --pst-color-primary: #528fe4;
    --pst-color-link: #528fe4;
    --pst-color-accent: #E6AA33;
}


/* Fix for https://github.com/executablebooks/sphinx-book-theme/issues/732 */
.bd-sidebar-primary div#rtd-footer-container {
    bottom:-1rem;
    margin:-1rem;
    position:fixed;
}

/* Fix search button incresing in size when hovered */
.search-button-field {
    border: 2px solid transparent;
}

/* Add design for custom search-input for sidebar */
#search-input-sidebar {
    border: 2px solid transparent;
    background-color: var(--pst-color-surface);
    color: var(--pst-color-text-muted);
}

#search-form-sidebar {
    border: 2px solid transparent;
    border-radius: 1.5em;
    background-color: var(--pst-color-surface);
    color: var(--pst-color-text-muted);
}

.bd-sidebar-primary {
    border-right: none;
}

footer.bd-footer-content {
    border-top: none;
    margin-top: 8px;
    @media (min-width: 1200px) { /* adjust width of footer to span as far as article */ 
        max-width: calc(100% - var(--pst-sidebar-secondary));
    }
}

.bd-sidebar-secondary {
    top: var(--pst-header-height);
}

.sidebar-secondary-item {
    border-left: none;
}

.scrolled .bd-header-article {
    box-shadow: none;
}

.bd-header-article {
    position: unset;
    top: unset;
}

.bd-content .sd-card .sd-card-header {
    padding-top: 1rem;
    border-bottom: none;
    font-weight: 600;
}

.custom-home-banner {
    position: relative;
    margin-bottom: 32px;
}

.custom-home-banner img {
    border-radius: 32px !important;
    background-color: transparent !important;
    filter: none !important;
}

.custom-home-banner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.custom-home-banner-text p {
    color: #fff;
    font-size: 36px;
    font-weight: 700;
    text-align: center;
}

.bd-content .sd-tab-set .sd-tab-content {
    border: none;
}

.bd-content .sd-tab-set>input:checked+label {
    border-style: none none solid;
    border-width: 0 0 .125rem;
    border-color: transparent transparent var(--pst-color-primary);
    background-color: transparent;
}

.bd-content .sd-tab-set>label {
    background-color: transparent;
}

.bd-content .sd-tab-set .sd-tab-content, html[data-theme=dark] .bd-content .sd-tab-set>label {
    background-color: transparent;
}

@media (min-width:960px) {
    .sidebar-toggle.primary-toggle {
        display: none !important;
    }
}

.table tbody tr:nth-child(odd):hover {
    background-color: var(--pst-color-table-row-zebra-low-bg);
}

.table tbody tr:nth-child(2n):hover {
    background-color: var(--pst-color-table-row-zebra-high-bg);
}

html[data-theme=light] {
    .btn.theme-switch-button, .btn.dropdown-toggle {
        box-shadow: none !important;
        border-radius: 0.5rem !important;
    }
    
    .btn.theme-switch-button:hover, .btn.dropdown-toggle:hover {
        background-color: #F0F0F1 !important;
        box-shadow: none !important;
    }
    
    .btn.theme-switch-button:active:active, .btn.dropdown-toggle:active {
        background-color: #E6E7E8 !important;
        box-shadow: none !important;
    }    
}

html[data-theme=dark] {
    .btn.theme-switch-button, .btn.dropdown-toggle {
        box-shadow: none !important;
        color: var(--pst-color-text-base);
        border-radius: 0.5rem !important;
    }
    
    .btn.theme-switch-button:hover:hover, .btn.dropdown-toggle:hover {
        background-color: var(--pst-color-primary) !important;
        box-shadow: none !important;
    }
    
    .btn.theme-switch-button:active:active, .btn.dropdown-toggle:active {
        background-color: var(--pst-color-primary) !important;
        box-shadow: none !important;
    }    
}

.icon-middle {
    vertical-align: text-bottom;
}

.footer-links li>a {
    box-shadow: none;
    color: var(--pst-color-text-muted);
    display: block;
    margin-right: .1875rem;
    padding: .25rem .65rem;
    text-decoration: none;
}
