/* Thinklio docs — custom overrides for MkDocs Material.
 *
 * Primary sidebar: scroll independently when the nav is longer than the
 * viewport. Without this, the sidebar scrolls with the main page content,
 * and you cannot reach the bottom items on short pages (e.g. the homepage).
 *
 * Table-of-contents sidebar gets the same treatment so long per-page tables
 * of contents behave predictably too.
 */

.md-sidebar--primary .md-sidebar__scrollwrap,
.md-sidebar--secondary .md-sidebar__scrollwrap {
  max-height: calc(100vh - 4.8rem);
  overflow-y: auto;
}

/* Keep the scrollbar subtle — visible on hover but not distracting at rest. */
.md-sidebar__scrollwrap::-webkit-scrollbar {
  width: 0.3rem;
}

.md-sidebar__scrollwrap::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 0.15rem;
}

.md-sidebar__scrollwrap:hover::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.25);
}

[data-md-color-scheme="slate"] .md-sidebar__scrollwrap:hover::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.25);
}
