/* docs/_static/custom.css */

:root{
  --etamu-blue:#0033A0;
  --etamu-gold:#F2A900;
  --etamu-gold-light: rgba(242,169,0,.15);
}

/* If sphinx_exercise renders as an admonition with extra classes */
div.admonition.exercise{
  background-color: var(--etamu-gold-light);
  border-left: 5px solid var(--etamu-gold);
}
div.admonition.exercise > .admonition-title{
  background-color: var(--etamu-gold);
  color:#222;
  font-weight:600;
}

/* If sphinx_exercise uses a custom wrapper class */
div.exercise{
  background-color: var(--etamu-gold-light);
  border-left: 5px solid var(--etamu-gold);
}
div.exercise > .admonition-title,
div.exercise > p.admonition-title{
  background-color: var(--etamu-gold);
  color:#222;
  font-weight:600;
}

blockquote {
  /* background-color: rgba(255, 255, 255, 0.873);  */
  border-left: 4px solid #0033A0;
  padding: 0.75em 1em;
  margin: 1em 0;
  /* color: #222; */
  color: inherit;
}

figure figcaption {
  color: var(--pst-color-text-base, inherit);
  opacity: 1;                 /* avoid low-contrast fade-outs */
}

/* If the theme sets a data-theme attribute (Sphinx Book / PyData) */
html[data-theme="light"] figure figcaption {
  color: #222;
}

html[data-theme="dark"] figure figcaption {
  color: rgba(255, 255, 255, 0.85);
}

/* Fallback for environments without data-theme */
@media (prefers-color-scheme: dark) {
  figure figcaption {
    color: rgba(255, 255, 255, 0.85);
  }
}

figure figcaption .caption-number {
  font-weight: 700;
}

/* Ensure captions inside admonitions stay readable */
.admonition figure figcaption,
.bd-content figure figcaption {
  color: var(--pst-color-text-base, inherit);
}


/* -----------------------------
   Dark-mode compatibility
   ----------------------------- */

/* Let the browser know we support both */
:root { color-scheme: light dark; }

/* Default (light mode) stays as you wrote it */
@media (prefers-color-scheme: dark) {
  :root{
    /* darker-tinted gold background so it doesn't glow */
    --etamu-gold-light: rgba(242,169,0,.18);
  }

  /* Exercises/admonitions */
  div.admonition.exercise,
  div.exercise{
    background-color: rgba(242,169,0,.10);
    border-left-color: var(--etamu-gold);
  }

  /* Title bar: keep gold but make text dark enough / readable */
  div.admonition.exercise > .admonition-title,
  div.exercise > .admonition-title,
  div.exercise > p.admonition-title{
    background-color: var(--etamu-gold);
    color: #111;
  }

  /* Blockquotes: remove “light card” styling and use darker surface */
  blockquote{
    background-color: rgba(255,255,255,.06);
    border-left-color: var(--etamu-blue);
    color: rgba(255,255,255,.88);
  }

  /* Figure captions: do NOT force #222 in dark mode */
  figure figcaption{
    color: rgba(255,255,255,.80);
  }
  figure figcaption .caption-number{
    color: rgba(255,255,255,.90);
  }
}

.video-container {
    /* Optional: ensures the container doesn't collapse if inline styles fail */
    width: 100%; 
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    /* Important: The iframe must fill the aspect-ratio container */
    display: block; 
}

/* Optional styling for your caption */
.video-caption {
    font-size: 0.95em;
    color: #666;
    text-align: center;
    margin-top: 0.5em;
}


