/* Furo sidebar version switcher.
 *
 * Uses only Furo's own theme CSS custom properties so it tracks the
 * light/dark toggle automatically - no hardcoded colors.
 */

.docs-version-switcher {
  box-sizing: border-box;
  width: 100%;
  padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal);
  border-bottom: 1px solid var(--color-sidebar-background-border);
}

.docs-version-switcher label {
  display: block;
  margin-bottom: 0.35em;
  font-size: var(--sidebar-search-input-font-size, 0.8rem);
  font-family: var(--font-stack);
  color: var(--color-sidebar-caption-text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.docs-version-switcher select {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 0.4em 0.6em;
  font-family: var(--font-stack);
  font-size: var(--sidebar-search-input-font-size, 0.85rem);
  color: var(--color-sidebar-search-text);
  background-color: var(--color-sidebar-search-background);
  border: 1px solid var(--color-sidebar-search-border);
  border-radius: 0.2rem;
  /* Long prerelease labels (e.g. v2.0.0-beta.2) must not overflow the
     fixed-width sidebar. */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-version-switcher select:focus {
  background-color: var(--color-sidebar-search-background--focus);
  outline: none;
}

.docs-version-switcher select option {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile sidebar: Furo collapses the sidebar into a slide-out panel below
   its responsive breakpoint; the switcher just needs to keep filling the
   available width there too, which the rules above already do since they
   use relative sizing rather than a fixed pixel width. */
@media (max-width: 67em) {
  .docs-version-switcher {
    padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal);
  }
}
