/* ---------------------------------------------------------------------------
   SparkNavi — readthedocs theme tweaks
   --------------------------------------------------------------------------- */

/* Language switcher — sits inside the blue header band, under the search box */
.sn-lang-switcher {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 10px 0 6px;
  font-size: 12px;
  line-height: 1.6;
}
.sn-lang-switcher a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  padding: 2px 8px;
  border-radius: 3px;
  transition: background-color 0.15s, color 0.15s;
}
.sn-lang-switcher a:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.12);
}
.sn-lang-switcher a.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.22);
  font-weight: 600;
}
.sn-lang-switcher a + a {
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}
.sn-lang-switcher a:first-child {
  border-left: none;
}

/* Slight polish to the readthedocs sidebar logo area */
.wy-side-nav-search img.logo {
  max-width: 80%;
  background: transparent;
}

/* Responsive 16:9 video embed (YouTube / Vimeo) */
.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;   /* 16:9 */
  height: 0;
  margin: 24px 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background: #000;
}
.video-embed iframe,
.video-embed video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-caption {
  font-size: 0.85em;
  color: #6b7785;
  text-align: center;
  margin-top: -12px;
  margin-bottom: 24px;
}

/* Vertical 9:16 video embed (YouTube Shorts) */
.video-embed-short {
  position: relative;
  padding-bottom: 177.78%;  /* 9:16 */
  height: 0;
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background: #000;
}
.video-embed-short iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Two-column row for Shorts; stacks on mobile */
.video-shorts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px auto;
  max-width: 600px;
}
@media (max-width: 640px) {
  .video-shorts-row {
    grid-template-columns: 1fr;
    max-width: 320px;
  }
}
