/* Shared Scalar theme for every language page (/index.html, /ru/index.html). Language-independent
   by design, so the per-language pages stay thin — only their locale, title and spec URL differ. */

/* Enspire brand palette (green) mapped onto Scalar's theme variables. */
.light-mode,
.dark-mode {
  --scalar-color-accent: rgb(0, 198, 111);            /* brand-600 */
  --scalar-link-color: rgb(0, 198, 111);
  --scalar-link-color-hover: rgb(0, 158, 89);         /* brand-700 */
  --scalar-button-1: rgb(0, 198, 111);
  --scalar-button-1-hover: rgb(0, 158, 89);
  --scalar-button-1-color: rgb(255, 255, 255);
}
.light-mode {
  --scalar-background-accent: rgb(229, 249, 241);     /* brand-50 */
  --scalar-sidebar-color-active: rgb(0, 158, 89);     /* brand-700 */
  --scalar-sidebar-item-active-background: rgb(229, 249, 241);
  --scalar-sidebar-indent-border-active: rgb(0, 198, 111);
}
.dark-mode {
  --scalar-color-accent: rgb(38, 207, 133);           /* brand-500 */
  --scalar-link-color: rgb(89, 218, 161);             /* brand-400 */
  --scalar-link-color-hover: rgb(128, 226, 183);      /* brand-300 */
  --scalar-background-accent: rgba(0, 198, 111, 0.16);
  --scalar-sidebar-color-active: rgb(89, 218, 161);   /* brand-400 */
  --scalar-sidebar-item-active-background: rgb(0, 79, 44); /* brand-950 */
  --scalar-sidebar-indent-border-active: rgb(38, 207, 133);
}

/* Brand logo at the top of the sidebar (Scalar has no logo config option).
   Light/dark variants so the mark stays legible in both themes. */
.t-doc__sidebar::before {
  content: "";
  display: block;
  height: 40px;
  margin: 16px 12px 4px;
  background: url("/logo-light.svg") left center / contain no-repeat;
}
.dark-mode .t-doc__sidebar::before {
  background-image: url("/logo-dark.svg");
}

/* No dedicated config flags exist for these, so hide them via CSS:
   the top toolbar (Developer tools / Configure / Share / Publish) … */
.api-reference-toolbar { display: none !important; }
/* … and the "Ask AI" button beside the sidebar search (any button that
   follows the role="search" search box), plus the MCP layer if present. */
.t-doc__sidebar [role="search"] ~ button,
.scalar-mcp-layer { display: none !important; }

/* Language switcher, pinned above the sidebar logo. */
.docs-lang-switcher {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 10;
  font: 500 13px/1 var(--scalar-font, system-ui, sans-serif);
  color: var(--scalar-link-color);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--scalar-background-accent);
}
.docs-lang-switcher:hover { color: var(--scalar-link-color-hover); }
