/* ==== FONTS ==== */

/* Import Lato font */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap');

/* Set Lato font with high specificity */
:root {
    --sy-f-text: "Lato" !important;
    --sy-f-heading: "Lato" !important;
}

/* Adjust monospace font size (by default it's a bit too big) */
code, pre, .highlight {
    font-size: 0.9em !important;
}



/* ==== COLORS ==== */

/* Some generic colors (see https://shibuya.lepture.com/customisation/css/)  */
html.light {
    --sy-c-background: #fdfdfd;
    --sy-c-text: #294a59;
    --sy-c-heading: #002333;
}

/* Main article links: blue + bold (leave nav/sidebar link styles untouched) */
article.yue a,
article.yue a:visited {
    color: #c45400 !important;
    font-weight: 700;
}

/* Background color of left sidebar (table of contents)  */
.sy-lside {
    background-color: #f6f6f6 !important;
    border: 2px solid #d6d6d6 !important;
    border-top: none !important;
    font-size: 0.85em !important;
}

/* More visible color for marker */
.yue ul>li::marker {
    color:#666666;
}

/* Custom seealso admonition colors */
.admonition.seealso {
    background-color: #FFF4E6;
    border-left-color: #FFA01E;
}

/* Code blocks with no specific language (i.e. plain text): slighly different color (this better differentiatesbetween "python script" from "python output") */
.highlight-none .highlight pre {
    background: #f7f5f2 !important;
}

/* For landing pages using nested line-blocks:
 * keep the first "heading" line flush-left and indent nested follow-up lines.
 */
.yue .line-block > .line-block {
    margin-left: 1em;
}

/* Copy button placed inline (e.g., next to Downloads) */
.copybtn.inline-copybtn {
    position: static;
    opacity: 1;
    display: inline-flex;
    vertical-align: middle;
    margin-left: 0.05em;
}



/* ==== GENERIC LAYOUT ADJUSTMENETS ==== */

/* Always show breadcrumbs */
.sy-breadcrumbs {
    display: block !important;
    visibility: visible !important;
    position: static !important;
    margin-top: 0.25rem !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-size: 0.95em !important;
}

.sy-breadcrumbs-inner {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    border-bottom: none !important;
    box-shadow: none !important;
    font-size: 0.95em !important;
}

.sy-breadcrumbs {
    border-bottom: none !important;
    box-shadow: none !important;
}

.sy-breadcrumbs li,
.sy-breadcrumbs a,
.sy-breadcrumbs span,
.sy-breadcrumbs strong {
    font-size: 0.95em !important;
}

@media (min-width: 1280px) {
    .sy-breadcrumbs-inner {
        padding-left: 3rem !important;
        padding-right: 3rem !important;
    }
}

/* Reduce vertical padding in tables */
.yue .table-wrapper td,
.yue .table-wrapper th {
    padding: 0.1rem 1rem;
}

/* Keep dataframe table headers left-aligned */
table.dataframe thead th {
    text-align: left !important;
}

/* Reduce gap between breadcrumb separator and page content */
.sy-main > .flex.flex-col > .min-w-0.max-w-6xl {
    padding-top: 1rem !important;
}

 /* Explicit size of SCM logo in top left corner (important to avoid "bar flickering" when loading the page) */
.sy-head-brand .light-logo,
.sy-head-brand .dark-logo {
    width: 130px !important;
    height: 34px !important;
    min-width: 130px !important;
    min-height: 34px !important;
}

/* Hide the color mode toggle button */
.theme-switch {
    display: none !important;
}

/* Make the "ON THIS PAGE" header a bit more visible */
.sy-rside-inner > div > h3 {
    font-weight: 800;
}

/* Reduce font size in right sidebar */
.sy-rside {
    font-size: 0.9em !important;
}

/* Reduce line separation in bullet lists (including TOC) */
.yue li, .yue li p, .yue li ul {
    margin-top: 0;
    margin-bottom: 0;
}

/* Fix TOC expand/collapse button positioning to prevent overlap with text */
.globaltoc li {
    position: relative !important;
    padding-right: 20px !important;
}
.sy-lside .globaltoc li > ul {
    font-size: 0.85rem !important;
}
.globaltoc li > button {
    position: absolute !important;
    right: 0 !important;
    top: 4 !important;
    width: 20px !important;
}

/* Formatting of the table of contents (note: I don't mean the side bar here, but the TOCs like in 'index.html') */
.sy-main .toctree-wrapper.compound a {
    color: var(--sy-c-text) !important;
    font-weight: bold;
}

.sy-main .toctree-wrapper.compound a:visited {
    color: var(--sy-c-text) !important;
}

.sy-main .toctree-wrapper.compound a:hover {
    color: var(--sy-c-text) !important;
    text-decoration: underline;
    text-decoration-color: currentColor;
    text-underline-offset: 3px;
}

/* More left margin for second-depth entries in the toc (I think it's more readable) */
.sy-main .toctree-wrapper.compound ul li ul {
    margin-left: 25px !important;
}

/* In genindex pages (i.e. the "alphabetical index", like AMS/genindex.html): reduce whitespace between sections */
article.yue .genindex-jumpbox ~ h2 {
    margin-top: 0.5em;
    margin-bottom: 0.1em;
}
article.yue .genindex-jumpbox ~ table.indextable.genindextable {
    margin-bottom: 0.1em;
}


/* On mobile, hide nested menu items by default */
@media (max-width: 767px) {
    .sy-head-links ul li.link ul {
        display: none !important;
    }
}

/* Reduce vertical spacing in nav_links dropdown menu items (the bar at the very top) (also, shifts menus a bit to the lef...)*/
.sy-head-links ul li.link ul li {
    padding-top: 0px !important;
    padding-bottom: 0px !important;
}
/* Smaller font for top-level nav items and dropdown items */
.sy-head-links ul li.link > a {
    font-size: 0.85em !important;
    font-weight: 700 !important;
}
.sy-head-links ul li.link ul li a {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    font-size: 0.9em !important;
    font-weight: 400 !important;
}

/* Smaller search box */
.searchbox {
    font-size: 0.9em !important;
}
.searchbox input {
    font-size: 0.9em !important;
    padding: 4px 8px !important;
}
.sy-head-links ul li ul {
    margin-left: -15px !important;
}



/* ==== STUFF FOR SCMAUTODOC EXTENSION ==== */

/* Field list tabular layout (used by the scmautodoc extension) */
dl.field-list {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0;
    align-items: start;
}

dl.field-list dt {
    font-weight: bold;
    padding-right: 15px;
    margin: 0;
}

dl.field-list dd, dl.field-list dd p {
    margin: 0;
}

/* Nested field list visual indicators */
dd:has(dl.field-list) {
    border-left: 2px solid #e0e0e0;
    margin-left: 10px;
    padding-left: 15px;
}

dd:has(dl.field-list) dl.field-list {
    border-left: none;
    margin-left: 0;
    padding-left: 0;
}



/* ==== CUSTOM "TUTORIALS STEPS" ==== */

.steps.line-block{
    background-color: #FFF4E6;
    border-left: 10px solid #FFA01E;
    border-right: 0px; border-top: 0px; border-bottom: 0px;
    padding-left: 10px
}



/* ==== TABS ==== */

/* Styling for the the tabs extension (tab-set) */

/* Style for tab */
.sd-tab-content {
    border: 1px solid #FFA01E;
    border-radius: 1px;
    padding: 10px !important;
}

/* Style for tab-label */
.sd-tab-label {
    padding: 8px 8px !important;
    line-height: 1.2 !important;
}

/* Style for selected tab-label */
.sd-tab-set input[type="radio"]:checked + .sd-tab-label {
    background-color: #ffdba9;
    font-weight: 800;
}

/* ==== DROPDOWNS ==== */

/* Make sphinx-design dropdowns tighter and give only the title bar an orange background */
details.sd-dropdown,
.sd-dropdown {
    margin-top: 0.35rem !important;
    margin-bottom: 0.35rem !important;
}

details.sd-dropdown summary.sd-summary-title,
.sd-dropdown .sd-summary-title {
    background-color: #FFE8CC !important;
    padding: 0.3rem 0.55rem !important;
    line-height: 1.2 !important;
    position: relative !important;
}

/* Keep open/close arrow centered, darker, and visually stronger */
details.sd-dropdown summary.sd-summary-title .sd-summary-down,
details.sd-dropdown summary.sd-summary-title .sd-summary-up,
.sd-dropdown .sd-summary-title .sd-summary-down,
.sd-dropdown .sd-summary-title .sd-summary-up {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    right: 0.55rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    line-height: 1 !important;
    color: #7a4a00 !important;
}

details.sd-dropdown summary.sd-summary-title .sd-summary-down svg,
details.sd-dropdown summary.sd-summary-title .sd-summary-up svg,
.sd-dropdown .sd-summary-title .sd-summary-down svg,
.sd-dropdown .sd-summary-title .sd-summary-up svg {
    width: 1.5em !important;
    height: 1.5em !important;
    opacity: 1 !important;
    color: #7a4a00 !important;
    fill: #7a4a00 !important;
}

/* Disable sphinx-design hover animation on dropdown chevrons */
details.sd-dropdown summary:hover .sd-summary-up svg,
details.sd-dropdown summary:hover .sd-summary-down svg,
.sd-dropdown summary:hover .sd-summary-up svg,
.sd-dropdown summary:hover .sd-summary-down svg {
    transform: none !important;
    transition: none !important;
}

details.sd-dropdown summary.sd-summary-title .sd-summary-down svg path,
details.sd-dropdown summary.sd-summary-title .sd-summary-up svg path,
.sd-dropdown .sd-summary-title .sd-summary-down svg path,
.sd-dropdown .sd-summary-title .sd-summary-up svg path {
    fill: #7a4a00 !important;
    stroke: #7a4a00 !important;
    stroke-width: 0.8 !important;
}

/* Shibuya/sphinx-design state chevron (newer markup): center + darken + strengthen */
details.sd-dropdown summary.sd-summary-title .sd-summary-state,
.sd-dropdown .sd-summary-title .sd-summary-state,
details.sd-dropdown summary.sd-summary-title .sd-summary-state svg,
.sd-dropdown .sd-summary-title .sd-summary-state svg {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #7a4a00 !important;
    stroke: #7a4a00 !important;
    fill: #7a4a00 !important;
    font-weight: 900 !important;
}

/* Fallback when the chevron is drawn via summary pseudo-element */
details.sd-dropdown summary.sd-summary-title::after,
.sd-dropdown .sd-summary-title::after {
    top: 50% !important;
    margin-top: 0 !important;
    color: #7a4a00 !important;
    border-color: #7a4a00 !important;
}

details.sd-dropdown .sd-summary-content,
.sd-dropdown .sd-summary-content {
    background-color: transparent !important;
    padding: 0.25rem 0.55rem !important;
}

/* Remove extra gap before the first content element when expanded */
details.sd-dropdown .sd-summary-content > :first-child,
.sd-dropdown .sd-summary-content > :first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

details.sd-dropdown .sd-summary-content ul,
.sd-dropdown .sd-summary-content ul {
    margin-top: 0 !important;
}

/* Slightly darker card borders for dropdown wrapper and grid-item cards */
.yue .sd-card,
.yue details.sd-dropdown:not([open]) > .sd-card-header {
    border-color: #b8b8b8 !important;
}



/* ==== PYTHIN API DOCS ==== */

/* Change color of method names in API docs */
span.sig-name, span.sig-prename {
    color: #F76B15 !important;
}

/* Fix missing space after comma in Python function signatures */
.sig-param::after {
    content: " ";
}

/* Add gray vertical line to Python API docs (classes, functions, methods) */
.py.class > dd,
.py.function > dd,
.py.method > dd,
.py.attribute > dd,
.py.property > dd,
.py.exception > dd {
    border-left: 2px solid #e0e0e0;
    margin-left: 12px;
    padding-left: 15px;
}

/* Make sure that the permalink symbol for python API is shown when you mouse-hover... */
dt:hover .headerlink {
    visibility: visible;
}



/* ==== SIDEBAR SCROLLBAR ==== */

/* Always show scrollbar and make it thicker/more visible */
.sy-scrollbar::-webkit-scrollbar-thumb {
    background-color: #888 !important;
    background-clip: padding-box !important;
    border: 1px solid transparent !important;
}

.sy-scrollbar:hover::-webkit-scrollbar-thumb {
    background-color: #555 !important;
}

/* Increase scrollbar width */
.sy-scrollbar::-webkit-scrollbar {
    width: 12px !important;
}

/* Apply same scrollbar styling to right sidebar */
.sy-rside .sy-scrollbar::-webkit-scrollbar-thumb {
    background-color: #888 !important;
    background-clip: padding-box !important;
    border: 1px solid transparent !important;
}

.sy-rside .sy-scrollbar:hover::-webkit-scrollbar-thumb {
    background-color: #555 !important;
}

.sy-rside .sy-scrollbar::-webkit-scrollbar {
    width: 12px !important;
}


  /* ==== NAVBAR SOLID BACKGROUND ==== */

  .sy-head-blur {
      display: none !important;
      backdrop-filter: none !important;
  }

  .sy-head {
       background-color: #ffffff !important;
   }


  /* ==== ANNOUNCEMENT PANEL ==== */

  .announcement {
      background-color: #FFE8CC !important;
      padding: 6px 40px 6px 15px !important;
      position: sticky !important;
      top: 0 !important;
      z-index: 10 !important;
  }

  .announcement-inner {
      display: block !important;
  }

  .announcement-inner p {
      font-size: 0.85em !important;
      margin: 0 !important;
      color: black !important;
      text-align: center !important;
  }

  .announcement-close {
       display: none !important;
   }

  /* ==== FOOTER ==== */

  .sy-foot {
      background-color: #FFE8CC !important;
      padding: 6px 40px 6px 15px !important;
  }

  .sy-foot-inner {
      padding: 0 !important;
  }

  .sy-foot-copyright p {
      font-size: 0.85em !important;
      margin: 0 !important;
      color: black !important;
      text-align: center !important;
  }

  .sy-foot-copyright a {
       text-decoration: underline !important;
   }

   /* ==== VERSION SELECTOR ==== */

   .nav-versions button {
        font-size: 0.85em !important;
        font-weight: bold !important;
    }

    .nav-versions-choices ul li a {
        font-size: 0.85em !important;
        font-weight: bold !important;
    }

   /* ==== HAMBURGER MENU BREAKPOINT ==== */
   
   @media (max-width: 992px) {
       body[data-expanded-headnav=true] {
           overflow: hidden;
       }
       
       .sy-head-nav {
           display: none;
           position: fixed;
           top: var(--sy-s-offset-top);
           bottom: 0;
           left: 0;
           right: 0;
           padding: 4rem 1.8rem 0;
           width: 100%;
           box-sizing: border-box;
           border-top: 1px solid var(--sy-c-divider);
           background-color: var(--sy-c-background);
           overflow-y: auto;
       }
       
       .sy-head-nav._expanded {
           display: block;
       }
       
       .sy-head-links {
           margin-left: auto;
           margin-right: auto;
       }
       
       .sy-head-links .link {
           margin: .5rem 0;
       }
       
       .sy-head-links .link i.chevron {
           display: none;
       }
       
       .sy-head-links .link>ul {
           margin: .5rem 0 .5rem 1rem;
       }
       
       .sy-head-extra form.searchbox {
           position: absolute;
           top: 1rem;
           left: 1.8rem;
           right: 1.8rem;
       }
       
       .sy-head-extra {
           flex-direction: column;
           padding: 2rem 0 1rem;
           width: 100%;
       }
       
       .sy-head-actions button {
           display: block;
       }
   }
   
   @media (min-width: 993px) {
       .sy-head-nav {
           display: flex;
           flex-grow: 1;
           align-items: center;
           justify-content: space-between;
       }
       
       .sy-head-actions button {
           display: none;
       }
   }


   /* ==== SEARCH MODAL ==== */

   .search-trigger {
   background: none;
   border: none;
   cursor: pointer;
   padding: 0;
   display: flex;
   align-items: center;
   color: inherit;
   font-size: 0.8em;
   }

   .search-trigger:hover {
   opacity: 0.7;
   }

   .search-modal {
   position: fixed;
   inset: 0;
   z-index: 1000;
   display: flex;
   align-items: center;
   justify-content: center;
   }

   .search-modal.hidden {
   display: none;
   }

   .search-modal-backdrop {
   position: absolute;
   inset: 0;
   background: rgba(0, 0, 0, 0.5);
   }

   .search-modal-content {
   position: relative;
   background: var(--sy-c-background);
   border-radius: 8px;
   padding: 24px;
   width: 90%;
   max-width: 500px;
   box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
   }

   .search-modal .searchbox {
   gap: 8px;
   width: 100%;
   }

   .search-modal .searchbox input[type="text"] {
   flex: 1;
   padding: 10px 12px;
   border: 1px solid var(--sy-c-divider);
   border-radius: 4px;
   font-size: 14px;
   background: var(--sy-c-background);
   color: var(--sy-c-text);
   }

   .search-modal .searchbox button {
   background: none;
   border: none;
   padding: 0;
   cursor: pointer;
   display: flex;
   align-items: center;
   }

   .search-modal .searchbox kbd {
   font-size: 12px;
   padding: 4px 8px;
   border: 1px solid var(--sy-c-divider);
   border-radius: 3px;
   background: var(--sy-c-neutral-5, #f0f0f0);
   color: var(--sy-c-text);
   }
