.text-right {
  text-align: right;
}

html {
  color-scheme: light dark;
}

.code-block-caption {
  padding: 0.2em !important;
  border-radius: 1em 1em 0 0;
}


a:hover code {
  text-decoration: underline;
}

span.lang-tag {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.4em 1em;
  background: #00000044;
  border-radius: 0 0 0 0.5em;
  z-index: 100;
  font-size: small;
}

button.copybtn {
  z-index: 200;
}

.codeblock-container {
  position: relative;
  margin: 1px 0 24px;

  & div.highlight {
    margin: 0;
  }

  &:has(div.test-error) {
    border: 2px solid light-dark(#f29f97, #450e08);
  }
  
  &:has(div.test-error) span.lang-tag {
    top: calc(1em + 11px);
  }

  & div.test-error:before {
    content: "Error";
    font-weight: bold;
    display: block;
    color: light-dark(#ffffff, #cdc8c2);
    background: light-dark(#f29f97, #450e08);
    padding: 2px 2px 2px 10px;
  }
}

@media (prefers-color-scheme: light) {
    a code {
      color: #2980b9 !important;
    }

    .code-block-caption {
      background: #d9d9d9;
    }

    .wy-menu-vertical li.toctree-l2.current a,
    .wy-menu-vertical li.toctree-l3.current a {
        background-color: #c9c9c9;
    }

    .sphinx-tabs {
        margin-bottom: 1rem;
      }
      
      [role="tablist"] {
        border-bottom: 1px solid #a0b3bf;
      }
      
      .sphinx-tabs-tab {
        position: relative;
        font-family: Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;
        color: #1D5C87;
        line-height: 24px;
        margin: 0;
        font-size: 16px;
        font-weight: 400;
        background-color: rgba(255, 255, 255, 0);
        border-radius: 5px 5px 0 0;
        border: 0;
        padding: 1rem 1.5rem;
        margin-bottom: 0;
      }
      
      .sphinx-tabs-tab[aria-selected="true"] {
        font-weight: 700;
        border: 1px solid #a0b3bf;
        border-bottom: 1px solid white;
        margin: -1px;
        background-color: white;
      }
      
      .sphinx-tabs-tab:focus {
        z-index: 1;
        outline-offset: 1px;
      }
      
      .sphinx-tabs-panel {
        position: relative;
        padding: 1rem;
        border: 1px solid #a0b3bf;
        margin: 0px -1px -1px -1px;
        border-radius: 0 0 5px 5px;
        border-top: 0;
        background: white;
      }
      
      .sphinx-tabs-panel.code-tab {
        padding: 0.4rem;
      }
      
      .sphinx-tab img {
          margin-bottom: 24 px;
      }
}
