/* C++ / Python language toggle (shared by MkDocs + Doxygen pages). */
.lang-toggle {
  display: inline-flex;
  align-items: stretch;
  margin: 0 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 1em;
  overflow: hidden;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.6;
  flex-shrink: 0;
}
.lang-toggle a {
  padding: 0.1em 0.7em;
  color: inherit;
  text-decoration: none;
  opacity: 0.85;
  transition: background-color 0.15s, color 0.15s;
}
.lang-toggle a:hover { opacity: 1; }
.lang-toggle a.lang-toggle__active {
  background: #ffffff;
  color: #2196f3;
  opacity: 1;
}

/* Inside the MkDocs (Material) header the text is already light. */
.md-header__inner .lang-toggle { color: var(--md-primary-bg-color, #fff); }

/* Doxygen pages have no header slot: float a pill in the top-right. */
.lang-toggle--fixed {
  position: fixed;
  top: 8px;
  right: 12px;
  z-index: 1000;
  color: #333;
  background: #2196f3;
  border-color: #2196f3;
}
.lang-toggle--fixed a { color: #fff; }
.lang-toggle--fixed a.lang-toggle__active { background: #fff; color: #2196f3; }
