/* -------------------- THEME OVERRIDES -------------------- */

html[data-theme="light"] {
  --pst-color-primary: #015999;
  --pst-color-secondary: #4f4f4f;
  --pst-color-plot-background: rgb(255, 255, 255);
  --pst-color-inline-code: var(--pst-color-text-base);
  --pst-heading-color: var(--pst-color-primary);
  --pst-color-heading: var(--pst-color-primary);
  --pst-color-link: #085d6c;
  --pst-color-table-row-hover-bg: #a2b6c1;
}

a {
  text-decoration: none;
  /* Other link styling properties */
}

html[data-theme="dark"] {
  --pst-color-primary: rgb(0 192 191);
  --pst-color-secondary: rgb(238 144 64);
  --pst-color-plot-background: rgb(218, 219, 220);
}

/* PyDataSphinx link underlining overide */
.bd-header .navbar-nav li a.nav-link:hover {
  text-decoration: none !important;
  color: var(--pst-color-primary);
}

nav.bd-links li>a:hover {
  text-decoration: none !important;
  color: var(--pst-color-primary);
}

/* Thebe start button */
.custom-box {
  position: relative;
  transition: transform 0.2s ease-in-out;
  padding: 0 0.6rem 1.8rem;
}

.custom-box:hover {
  transform: scale(1.05);
}


.sidebar-button {
    transition: background-color 0.3s ease;
    background: var(--pst-color-secondary);
    color: #fff;
    border: none;
    padding: 6px 14px; /* Adjust padding for a smaller size */
    cursor: pointer;
    border-radius: 5px;
    font-size: 12px; /* Adjust font size for a smaller size */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    height: auto;
}

.sidebar-button:visited {
    color: #fff !important;
}

.thebelab-button {
    transition: background-color 0.3s ease;
    background: var(--pst-color-secondary);
    color: #fff;
    border: none;
    padding: 6px 14px; /* Adjust padding for a smaller size */
    cursor: pointer;
    border-radius: 5px;
    font-size: 12px; /* Adjust font size for a smaller size */
}

.thebelab-button:hover {
    background-color: var(--pst-color-secondary);
}

.thebe-launch-button {
  height: 5em;
  font-size: 0.8em;
  border: 0px black solid;
  padding: 0.5em 2em;
  background: var(--pst-color-primary);
}

/* Deactivates an ugly and empty "scroll bar" in the thebe cells */
/* Deactivates an ugly and empty "scroll bar" in the thebe cells */
div.nbinput.container div.prompt
{
    display:  none;
}

div.nboutput.container div.prompt
{
    display:  none;
}

.sidebar-button:hover {
    background-color: var(--pst-color-secondary);
	color: #ffffff;
}

.thebelab-cell {
    background-color: #F5F5F5;
    border: 1px solid var(--pst-color-border) !important;
    border-radius: 4px;
    margin-top: 8px;
    margin-bottom: 8px;
    padding: 0px 0px 19px;
}


.jp-OutputArea > :first-child {
    padding-top: 1em !important;
    border-top: 1px solid #aaa;
}

.thebelab-cell .jp-OutputArea {
  margin-top: 1em;
  margin-left: 1em;
}

/*Code mirror highlighting adjustment */

.cm-s-default .cm-keyword {
  color: #2838b0 !important;
}

.cm-s-default .cm-variable{
  color: #323232 !important;
}

.cm-s-default .cm-builtin {
  color: #388038 !important;
}

.cm-s-default .cm-comment {
  color: #888888 !important;
  font-style: italic !important;
}

.cm-s-default .cm-string {
  color: #b83838 !important;
}

/* run button */ 
button.sidebar-button.thebelab-run-button::before {
  font-family: 'Font Awesome 5 Free'; /* Ensure Font Awesome is loaded */
  content: '▶'; /* Unicode for the "play" icon */
  margin-right: 5px; /* Add spacing between the icon and text */
}



.CodeMirror {
  line-height: 1.2em !important;
  margin: 1.5em 0 !important;
  font-size: 0.875em !important;
  font-family: var(--jp-code-font-family);
  border-radius: 0.25 !important;
}

.cm-s-default{
  font-size: 0.875em !important;
}

.sidebar-launch-button {
  height: 5em;
  font-size: 0.8em;
  border: 0px black solid;
  padding: 0.5em 2em;
  background: var(--pst-color-primary);
}

.thebelab-cell button:nth-child(4) {
  display: none;
}

.thebelab-cell button:nth-child(3) {
  display: none;
}


.thebelab-busy-spinner {
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--pst-color-primary) !important;
  border-radius: 50%;
  width: 19px !important;
  height: 23px !important;
  -webkit-animation: spin 2s linear infinite;
  animation: spin 0.5s linear infinite !important;
  margin-left: 0.8em;
}

/* Quantum Color */
.red { color: #FF0000; }
.orange { color: #FF7F00; }
.yellow { color: #e6e60e; }
.green { color: #00FF00; }
.blue { color: #10a2db; }
.indigo { color: #110df3; }
.violet { color: #8B00FF; }


html, body {
  scroll-behavior: smooth;
}

.sd-card.example-gallery:hover .sd-card-footer p.sd-card-text {
  color: var(--pst-color-primary);  /* Change text color on hover over card */
}



/* Hero */
#hero {
  display: flex;
  flex-direction: row;
  min-height: min(calc(80vh), 1100px); /* Make hero fill up most of the page on load */
}
#hero-left {
  max-width: 476px;
  width: 40%;
  margin: auto 0;
}
#hero-right {
  min-width: 476px;
  width: 60%;
  margin: auto 0;
}

.homepage-button-container {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}
.homepage-button-container-row {
  display: flex;
  flex-wrap: wrap;
}

.homepage-button-container a {
  transition: 0.1s;
}
.homepage-button {
  min-width: 144px;
  padding: 0.5em 1em;
  border: 1px solid var(--pst-color-primary);
  border-radius: 4px;
  margin: 1em 0.5em 0.5em 0;
  text-align: center;
}
.primary-button {
  background-color: var(--pst-color-primary);
  color: var(--pst-color-background);
}
.secondary-button {
  background-color: var(--pst-color-background);
  color: var(--pst-color-primary);
}
.homepage-button:hover {
  text-decoration: none;
  background-color: var(--pst-color-secondary);
  color: var(--pst-color-background);
  border: 1px solid var(--pst-color-secondary);
}
.homepage-button-link {
  text-decoration: underline;
}

/* Key Features */
#key-features .sd-card-body {
  display: flex;
  align-items: center;
}

/* CSS for mobile layout */
@media (max-width: 767px) {
  #key-features .sd-card-body {
      /* Vertical alignment for mobile */
      display: flex;
      flex-direction: column;
      align-items: center;
  }

  #key-features .sd-card-body .key-features-text {
    min-width: 70%;
    padding: 48px 0px;
  }
  
}

/* CSS for mobile layout */
@media (min-width: 767px) {

  #key-features .sd-card-body .key-features-text {
    min-width: 70%;
    padding: 0px 48px;
  }
  
}

/* Example Gallery */

/* Homepage + Example Gallery Body - Set dimensions */
.home-img-plot,
.bd-content div.sd-card.example-gallery .sd-card-body,
.home-img-plot-overlay,
.example-img-plot-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 10px;
}

.bd-content div.sd-card.example-gallery .sd-card-body,
.example-img-plot-overlay {
  width: 100%;
  height: 100%;
}
.home-img-plot img,
.bd-content div.sd-card.example-gallery .sd-card-body img {
  /* Images keep aspect ratio and fit in container */
  /* To make images stretch/fill container, change to min-width */
  max-width: 100%;
  max-height: 100%;
}

.home-img-plot-overlay,
.example-img-plot-overlay,
.bd-content div.sd-card.example-gallery .sd-card-body {
  border: 1px solid #dee2e6;  /* Same as img-thumbnail from pydata css */
  border-radius: 0.25rem;  /* Same as img-thumbnail from pydata css */
}

.home-img-plot-overlay,
.example-img-plot-overlay,
.example-img-plot-overlay p.sd-card-text {
  background: var(--pst-color-primary);
  position: absolute;
  color: var(--pst-color-background);
  opacity: 0;
  transition: .2s ease;
  text-align: center;
  padding: 10px;
  z-index: 998;  /* Make sure overlay is above image...this is here to handle dark mode */
  top: 0;
  left: 0;
}

.home-img-plot-overlay:hover,
.bd-content .example-img-plot-overlay:hover,
.example-img-plot-overlay p.sd-card-text {
  opacity: 0.9;
}

.example-img-plot-overlay p.sd-card-text {
  position: relative;
}


#key-features .sd-card img {
  width: 140px;
  height: 140px;
  max-width: none;
}

.bd-sidebar-primary {
  display: block
}


/** * Custom CSS for THEBE LAB */
/** When a ThebeLab cell is rendered inside an existing Jupyter notebook box, it should not have a border */
div.highlight>div.thebelab-cell {
  border: none !important;
  background-color: transparent !important;
  padding: 0px !important;
}