/*!
 * playforge-lotusdocs — unscoped root rules
 *
 * Hand-written. Everything in playforge-lotusdocs.css is scoped under
 * .pfld-docs, which is correct for all but three things:
 *
 *   1. Smooth-scroll offset for in-page heading links belongs on the real
 *      <html> element. The scoping pass moved it onto the wrapper, where it
 *      does nothing.
 *   2. Bootstrap's border-box reset was likewise remapped onto the wrapper
 *      only, so it no longer reaches the wrapper's descendants reliably.
 *   3. Upstream's `body { overflow-x: hidden !important }` became
 *      `.pfld-docs { overflow-x: hidden !important }`, which turns the wrapper
 *      into a scroll container — and that silently kills `position: sticky` on
 *      both the sidebar and the table of contents.
 *
 * Load this *after* playforge-lotusdocs.css.
 */

/* Matches --pfld-scroll-offset in the docs bar; see build/scss/_wp-adapter.scss. */
html {
	scroll-padding-top: 80px;
}

@media (max-width: 1199px) {
	html {
		scroll-padding-top: 120px;
	}
}

.pfld-docs,
.pfld-docs *,
.pfld-docs *::before,
.pfld-docs *::after {
	box-sizing: border-box;
}

/*
 * Undoes the remapped `overflow-x: hidden`. A scroll container on an ancestor
 * makes `position: sticky` children stick to that container instead of the
 * viewport, so the sidebar and TOC would scroll away. The horizontal clipping
 * the sidebar slide-out actually needs is applied to .page-wrapper instead.
 */
.pfld-docs {
	overflow-x: visible !important;
}
