/* -- Fonts ----------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');

/* -- Page layout ----------------------------------------------------------- */

div.related-pages {
    display: none;
}

/* -- Body styles ----------------------------------------------------------- */

a {
    /*color: rgb(84, 105, 212);*/
    text-decoration: none;
    border-bottom: none;
}

a:hover {
    /*color: rgb(61, 78, 172);*/
    text-decoration: none;
    border-bottom: none;
}

a.reference {
    text-decoration: none;
    border-bottom: none;
}

a.reference:hover {
    text-decoration: none;
    border-bottom: none;
}

.guilabel {
    font-weight: bold;
    background-color: inherit;
    border: none;
    color: none;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

h1 {
    margin-top: 0;
}

h4,
h5,
h6 {
    text-transform: initial;
}

img {
    margin-top: 10px;
    margin-bottom: 15px;
    margin-right: 2px;
    margin-left: 2px;
    vertical-align: top;
}

img.inline {
    margin: 0;
    vertical-align: middle;
}

input {
    line-height: initial;
}

.responsive-toc {
    display: inline-block;
    width: 230px;
    margin-right: 12px;
    margin-bottom: 20px;
    margin-top: 20px;
    /*border: 1px solid #339900;*/
    text-align: center;
    vertical-align: top;
}

ol {
    list-style: none !important;
    counter-reset: steps;
}

ol>li {
    position: relative;
    counter-increment: steps;
    padding-left: 0.8rem;
    margin-top: 10px;
}

*:not(li)>ol>li::before {
    content: counter(steps);
    margin-left: -34px;
    border-radius: 50%;
    background: none;
    position: absolute;
    width: 20px;
    border: 1.6px solid;
    height: 20px;
    text-align: center;
    font-size: 16px;
    line-height: 18px;
    font-weight: 400;
    padding: 1px;
    top: 1px
}

ol>li::before {
    content: counter(steps)".";
    margin-left: -20px;
    position: absolute;
    font-size: 18px;
    font-weight: 500;
}

.sidebar-brand-text {
    font-weight: light;
    color: var(--color-foreground-primary);
}

/* Disable scrolling to currently selected item in table of contents. */
*:not(.sidebar-scroll) {
    scroll-behavior: smooth;
}

.sidebar-scroll {
    scroll-behavior: auto !important;
}

/* -- Table styles----------------------------------------------------------- */

table.align-default {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

thead,
th.stub {
    background-color: rgba(84, 105, 212, 0.05);
    text-align: left;
}

table.docutils {
    border: 0px;
    box-shadow: none;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
}

table.docutils td,
table.docutils th {
    border: 0px;
    /*padding: 0.25em 0.7em;*/
    vertical-align: top;
}

table.docutils tr.row-even {
    border-top: 1px solid rgba(84, 105, 212, 0.15);
}

table.docutils tr.row-odd {
    border-top: 1px solid rgba(84, 105, 212, 0.15);
}

table.layout {
    border: 0px;
    box-shadow: none;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
}

table.layout td,
table.layout th {
    border: 0px;
    padding: 4px 5px;
    vertical-align: top;
}

table.layout tr.row-even {
    border-top: 0px;
}

table.layout tr.row-odd {
    border-top: 0px;
}

.table-wrapper {
    padding: 0px;
}

/* -- gif: on hover replace png w/ gif -------------------------------------- */

.gif img:last-child {
    display: none;
}

.gif:hover img:first-child {
    display: none;
}

.gif:hover img:last-child {
    display: inline-block;
}

/* -- Tutorial styles-------------------------------------------------------- */

.start-tutorial-button {
    margin-top: 25px;
}

.start-tutorial-button p {
    margin-top: 8px;
    margin-bottom: 8px;
}

.start-tutorial-button,
.start-tutorial-button a,
.start-tutorial-button a:hover {
    display: inline-block;
    padding: 2px 25px;
    border-radius: 8px;
    background: #0085FF;
    color: white;
}

.previous-next-buttons {
    margin-top: 35px;
}

.previous-next-buttons p a:first-child span::before {
    line-height: 1.2;
}

.previous-next-buttons p a:first-child span::before {
    content: url('../_static/images/system/next.svg');
    transform: rotate(180deg);
    display: inline-block;
    margin-right: 5px;
}

.previous-next-buttons p a:nth-child(2) span {
    float: right;
    line-height: 1.3;
}

.previous-next-buttons p a:nth-child(2) span::after {
    content: url('../_static/images/system/previous.svg');
    transform: rotate(180deg);
    display: inline-block;
    margin-left: 5px;
}

.theme-toggle-container {
    display: inherit;
}

/* -------------- toc filter -------------- */

/* Filter input styling */
.toc-filter-container {
    position: relative;
    margin-top: 1rem;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 0.8rem;
}

.toc-filter-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--color-sidebar-search-border);
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    background-color: var(--color-sidebar-search-background);
    color: var(--color-sidebar-search-foreground);
}

.toc-filter-input:focus {
    outline: none;
    border-color: var(--color-sidebar-search-border);
    box-shadow: 0 0 0 2px rgba(65, 134, 255, 0.5);
}

.toc-filter-clear {
    position: absolute;
    right: 16px;
    top: 8px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--color-sidebar-search-foreground);
    opacity: 0.7;
    padding: 0;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
}

.toc-filter-clear:hover {
    opacity: 1;
}

/* Highlighting matches */
.toc-highlight {
    background-color: rgba(84, 105, 212, 0.8);
    font-weight: bold;
}

/* Status message when no results found */
.toc-no-results {
    padding: 10px;
    color: var(--color-sidebar-search-foreground);
    opacity: 0.7;
    text-align: center;
    font-size: 14px;
}

/* Ensure consistent display of sidebar items */
.sidebar-tree li {
    transition: display 0.1s ease;
}

.toc-filtered-hidden {
    display: none !important;
}

.sidebar-tree.filtering-active li[data-toc-filter-show="false"] {
    display: none !important;
}

.sidebar-tree.filtering-active li[data-toc-filter-show="true"] {
    display: block !important;
}

.toc-filter-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.svg-icon.filter-icon {
    position: absolute;
    left: 10px;
    stroke: var(--color-foreground-border);
    z-index: 1;
}

.toc-filter-input {
    padding-left: 37px;
}

/* -------- Styles for search containers ------------- */

/* Common styles for search containers */
.search-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-right: 16px;
}

.header-search-container,
.content-search-container {
    display: flex;
    align-items: center;
    position: relative;
    background: var(--color-sidebar-search-background, rgba(0, 0, 0, 0.05));
    border-radius: 0.25rem;
}

.header-search-container:hover,
.content-search-container:hover,
.header-search-container:focus-within,
.content-search-container:focus-within {
    background: var(--color-sidebar-search-background--focus, rgba(0, 0, 0, 0.1));
}

/* Styles for the SVG icon */
.search-icon {
    position: absolute;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    stroke: var(--color-foreground-primary);
}

/* Common input styles */
.header-search,
.content-search {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid var(--color-sidebar-search-border, #e1e4e5);
    border-radius: 4px;
    box-sizing: border-box;
    background: transparent;
    font-size: var(--sidebar-search-input-font-size, 0.875rem);
}

.header-search:focus,
.content-search:focus {
    outline: none;
    border-color: var(--color-sidebar-search-border, #e1e4e5);
    box-shadow: 0 0 0 2px rgba(65, 134, 255, 0.5);
}

/* Input sizing */
.header-search {
    width: 120px;
}

.content-search {
    width: 150px;
    color: var(--color-foreground-primary);
}

/* Hide the sidebar search */
.sidebar-search-container {
    display: none !important;
}

/* Theme toggle in footer */
.right-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.right-details .theme-toggle {
    padding: 0;
    margin: 0;
    height: 1.5rem;
    width: 1.5rem;
    background: transparent;
    border: none;
    color: var(--color-foreground-primary);
    cursor: pointer;
}

.right-details .theme-toggle:hover {
    color: var(--color-sidebar-link-text--hover, #1a73e8);
}

/* Hide content search on narrow screens, show header search */
@media (max-width: 1072px) {
    .content-search-container {
        display: none !important;
    }

    .header-search-container {
        display: flex !important;
        width: 120px;
    }

    /* Also hide the search-container wrapper in content area */
    .content .search-container {
        display: none !important;
    }
}

/* Hide header search on wide screens, show content search */
@media (min-width: 1073px) {
    .mobile-header .search-container,
    .header-search-container {
        display: none !important;
    }

    .content-search-container {
        display: flex !important;
    }

    .search-container {
        margin-top: 10px;
    }

    .content {
        justify-content: flex-start !important;
        min-height: calc(100vh - 4rem) !important;
    }
    
    .content > article {
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
    }
    
    .content > footer {
        margin-top: auto !important;
    }
}

@media (min-width: 1073px) and (max-width: 1312px) {
    .search-container {
        margin-right: 40px;
    }
}