@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Source+Sans+Pro&family=Inconsolata:wdth,wght@75,300&display=swap");

html {
  --pst-font-family-heading: 'Montserrat', sans-serif;
  --pst-font-family-base: 'Source Sans Pro', sans-serif;
  --pst-sidebar-secondary: 15rem;
}

html[data-theme="light"] {
  --pst-color-primary: #005187;
}

html[data-theme="dark"] {
  --pst-color-primary: #459db9;
}

.navbar-brand img {
  padding: 0.5rem;
}

.rsm-example {
  display: flex;
  gap: 2%;
}

.rsm-example.vertical {
  flex-direction: column;
  gap: 1rem;
}

.rsm-example-code {
  width: 49% !important;
  margin-top: 0 !important;
}

.rsm-example.vertical .rsm-example-code {
  width: 100% !important;
}

.rsm-example-code .highlight {
  height: 100%;
}

.rsm-example-code .highlight pre {
  height: 100%;
}

.rsm-example .manuscriptwrapper.embedded {
  width: 49%;
  border-radius: 0.25rem;
  border: 1px solid var(--pst-color-border);
  padding-block: 1rem;
  margin-bottom: 1em;
}

.rsm-example.vertical .manuscriptwrapper.embedded {
  width: 100%;
}

.rsm-example-iframe {
  width: 49%;
  border: 1px solid var(--pst-color-border);
  border-radius: 0.25rem;
  background: white;
  overflow: hidden;
}

.rsm-example.vertical .rsm-example-iframe {
  width: 100%;
}

.bd-sidebar-primary {
  max-width: 20%;
}

h1, h2 {
  font-weight: var(--semi);
}

.footer-item {
  display: inline-block;
}

.footer-item:not(:last-child) {
  border-right: 1px solid var(--pst-color-text-base);
  margin-right: .5em;
  padding-right: .5em;
}

/* these are copied directly from sphinx_copybutton styles */
/* and from pydata-sphinx overrides of sphinx_copybutton */
.openlive {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;    
  bottom: .3em;
  right: .3em;
  width: 1.7em;
  height: 1.7em;
  opacity: 0;
  transition: opacity 0.3s, border .3s, background-color .3s;
  user-select: none;
  padding: 0;
  outline: none;
  border: none;  
  border-radius: 0.4em;
  background-color: unset;
  background-color: var(--pst-color-surface);  
  color: var(--pst-color-muted);
}

.openlive svg {
  stroke: currentColor;
  width: 1.5em;
  height: 1.5em;
  padding: 0.1em;
}

.highlight:hover button.openlive {
  opacity: 1;
}

.highlight button.openlive:hover {
  background-color: rgb(235, 235, 235);
}

.highlight button.openlive:active {
  background-color: rgb(187, 187, 187);
}

/**
 * A minimal CSS-only tooltip copied from copybutton, which coped it from:
 *   https://codepen.io/mildrenben/pen/rVBrpK
 *
 * To use, write HTML like the following:
 *
 * <p class="o-tooltip--left" data-tooltip="Hey">Short</p>
 */
/* .o-tooltip--left { */
/*   position: relative; */
/* } */

.o-tooltip--left:after {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  content: attr(data-tooltip);
  padding: .2em;
  font-size: .8em;
  left: -.2em;
  white-space: nowrap;
  z-index: 2;
  border-radius: 2px;
  transform: translateX(-102%) translateY(0);
  transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
  background-color: var(--pst-color-surface);
  color: var(--pst-color-text);  
}

.o-tooltip--left:hover:after {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateX(-100%) translateY(0);
  transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
  transition-delay: .5s;
}

@media print {
  button.openlive {
    display: none;
  }
}
