/* Custom styles for Virtualitics SDK Documentation */

:root {
  --vt-primary-color: #4051b5;
  --vt-accent-color: #00bcd4;
}

/* Custom admonition colors */
.md-typeset .admonition.virtualitics {
  border-color: var(--vt-primary-color);
}

.md-typeset .admonition.virtualitics > .admonition-title {
  background-color: var(--vt-primary-color);
}

/* Code block styling */
.md-typeset code {
  font-size: 0.85em;
}

/* Improve readability of parameter lists */
.md-typeset dl dt {
  font-weight: 600;
}

/* Wrap long signatures instead of making them scrollable */
.doc-signature pre {
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
}

.doc-signature code {
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
}

/* Fix page jiggling/flashing during navigation */
html {
  scroll-behavior: auto !important;
}

/* Disable transitions that cause visual jitter */
.md-main,
.md-content,
.md-sidebar {
  transition: none !important;
}

/* Prevent layout shifts during navigation */
.md-content__inner {
  min-height: auto !important;
}

/* Stabilize navigation tracking */
.md-nav__link--active {
  transition: none !important;
}

/* Prevent font loading flash */
body {
  font-display: swap;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Prevent content jump during loading */
.md-typeset {
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

/* Prevent sidebar scroll position reset during navigation */
.md-sidebar__scrollwrap {
  scroll-behavior: auto !important;
}

/* Disable automatic scroll-into-view for active nav items */
.md-nav__link--active {
  scroll-margin: 0 !important;
}

/* Prevent instant loading from resetting scroll */
.md-nav--primary {
  overflow-anchor: none !important;
}

/* Version selector toggle link styling */
.md-version__toggle {
  font-style: italic;
  opacity: 0.7;
  font-size: 0.85em;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.4rem;
  margin-top: 0.2rem;
}
