/* ---------------------------------------------------------
   REMOVE NAVIGATION BUTTONS (About, Dark toggle)
   --------------------------------------------------------- */
.button_nav_wrapper {
    display: none !important;
}

#mode_toggle {
  display: none !important;
}

@media (min-width: 992px) {
  a[title="Toggle sidebar"] {
    display: none !important;
  }
}

/* Style both right-sidebar toggle arrows (collapsed and expanded) */
#right_sidebar .toggle_right_sidebar .icon,
#show_right_sidebar .toggle_right_sidebar .icon {
    font-weight: 600 !important;
    color: #203246 !important;
}

/* Right sidebar title */
#right_sidebar .toggle_right_sidebar span:not(.icon),
#show_right_sidebar .toggle_right_sidebar span:not(.icon) {
    color: #203246 !important;
    position: relative;
    font-weight: 600 !important;
    content: "Contents" !important;
}

/* ---------------------------------------------------------
   Reduce whitespace above the main content area (before first title) 
   --------------------------------------------------------- */
div.document div.documentwrapper {
  padding-top: 0; 
}

/* ---------------------------------------------------------
   REMOVE FOOTER COPYRIGHT & THEME CREDIT
   --------------------------------------------------------- */
.footer[role="contentinfo"],
#theme_credit {
    display: none !important;
}

/* ---------------------------------------------------------
   CHANGE PICCOLO TOP NAV BAR COLOR
   --------------------------------------------------------- */

#top_nav,
#top_nav nav { 
  background: linear-gradient( 
    90deg, 
    #f5f7fa 0%, 
    #e3eaf2 10%, 
    #2a3e55 50%, 
    #203246 90%,   
    #162332 100% ) !important; 
}

@media (max-width: 991.98px) {

  #top_nav,
  #top_nav nav { 
    background: linear-gradient( 
      90deg, 
      #f5f7fa 0%, 
      #e3eaf2 20%, 
      #2a3e55 80%, 
      #203246 90%,   
      #162332 100% ) !important; 
  }

}

#top_nav {
  border-bottom: 1.5px solid #0d2b45;
}

#top_nav nav {
  border-bottom: none !important;
}


/* ---------------------------------------------------------
   SLIGHTLY MORE VERTICAL SPACE BETWEEN PARAGRAPHS
   --------------------------------------------------------- */
div.line-block {
    margin-bottom: 0.5em;
}
div.line-block .line {
    margin-bottom: 0.25em;
}
/* ---------------------------------------------------------
   LOGO 
   --------------------------------------------------------- */
img[src*="epw_logo"] {
  height: 44px !important;
  width: auto !important;
  border-radius: 0px !important;
  background: transparent !important;
  padding: 0px !important;
  box-sizing: border-box !important;
  display: block !important;
}

@media (min-width: 992px) {
  /* The link that wraps the logo */
  #top_nav a:has(img) {
    display: inline-flex;
    align-items: center;
  }
  /* The text itself */
  #top_nav a:has(img)::after {
    content: "EPW code";
    margin-left: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: #162332 !important;
    white-space: nowrap;
}
}

/* Prevent headings from hiding under the fixed top bar */
:root {
  scroll-padding-top: 90px !important;
}
body {
  padding-top: 5px !important; 
}
div.document {
  margin-top: 70px !important;
  padding-top: 0px !important;
}

div.document div.documentwrapper {
  padding-top: 0 !important;
}

/* ---------------------------------------------------------
   Sidebar vertical alignment under the top gray bar
   -------------------------------------------------------- */
div.sphinxsidebarwrapper {
  padding-top: 15px !important;  
}
#right_sidebar {
  padding-top: 77px ! important;
}

/* ---------------------------------------------------------
   Toctree caption in sidebar (e.g., "PROJECT") 
   --------------------------------------------------------- */

div.sphinxsidebar p.caption > .caption-text {
  color: #2863b3 !important;
}

div.sphinxsidebar p.caption > span.caption-text {
  text-transform: none;      /* disable ALL CAPS */
  font-weight: 550;       
  color: #203246 !important; 
}

/* ---------------------------------------------------------
   Highlight color
   --------------------------------------------------------- */
.highlight,
.highlight pre,
pre {
  background-color: #f6f8fa;
}

/* ---------------------------------------------------------
   Expand the main text on large screens 
   --------------------------------------------------------- */

@media (min-width: 1200px) {
  div.document div.documentwrapper {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
  }
}

/* ---------------------------------------------------------
   Author tag for tutorials
   --------------------------------------------------------- */

.author-tag{
  display:inline-block;
  font-size:0.78rem;
  font-weight:550;
  padding:0.12rem 0.45rem;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.15);
  background:rgba(0,0,0,.04);
  color:rgba(0,0,0,.75);
  line-height:1.2;
  margin:0.25rem 0 0.75rem 0;
}
.author-tag::before{
  content:"Author:";
  font-weight:700;
  opacity:.65;
  margin-right:0.35rem;
}

/* ---------------------------------------------------------
   Make the top gray bar thinner   
   --------------------------------------------------------- */

#top_nav,
#top_nav nav {
  padding-top: 5px !important;
  padding-bottom: 5px !important;
  min-height: 0 !important;
}

/* Remove default h1 spacing that inflates the bar */
#top_nav h1 {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

/* ---------------------------------------------------------
   Mobile: put hamburger on the right, next to search
   --------------------------------------------------------- */

@media (max-width: 991.98px) {

/* move hamburger group to the right */
  #top_nav nav #toggle_sidebar {
    order: 2 !important;
    margin-left: 0.8rem !important;   /* space from search */
  }

  /* keep the anchor itself tidy */
  #top_nav nav #toggle_sidebar a[title="Toggle sidebar"] {
    position: static !important;
    margin: 0 !important;
  }

}
