/**
 * Global sticky sidebar override — Noxora Enterprise v5.6.0.
 *
 * Removes independent sidebar scrollbars and converts every module sidebar
 * into a viewport-sticky panel that scrolls naturally with the page.
 *
 * @package Noxora\Core
 */

/*
 * Core rule: sidebars are sticky within the viewport, not independently
 * scrollable. The page itself provides the scrollbar, matching SaaS layouts.
 */
.nx-sidebar,
.nx-sidebar--sticky,
.ns-tube-sidebar,
.ns-tube-sidebar--sticky,
.ns-story-sidebar,
.ns-story-sidebar--sticky,
.ns-pro-sidebar,
.ns-pro-sidebar--sticky,
.ns-live-sidebar,
.ns-live-sidebar--sticky,
.nx-comm-sidebar-left,
.nx-comm-sidebar-right,
.nx-comm-sidebar--right,
.ns-comm-sidebar,
.ns-comm-sidebar--sticky,
.ns-discover-sidebar,
.ns-growth-sidebar,
.ns-academy-sidebar,
.ns-ops-sidebar {
	position: -webkit-sticky !important;
	position: sticky !important;
	top: var(--nx-header-height, 64px) !important;
	height: calc(100dvh - var(--nx-header-height, 64px)) !important;
	max-height: calc(100dvh - var(--nx-header-height, 64px)) !important;
	overflow-y: visible !important;
	overflow-x: hidden !important;
	scrollbar-width: none !important;
	-ms-overflow-style: none !important;
	align-self: flex-start !important;
	box-sizing: border-box !important;
}

.nx-sidebar::-webkit-scrollbar,
.nx-sidebar--sticky::-webkit-scrollbar,
.ns-tube-sidebar::-webkit-scrollbar,
.ns-story-sidebar::-webkit-scrollbar,
.ns-pro-sidebar::-webkit-scrollbar,
.ns-live-sidebar::-webkit-scrollbar,
.nx-comm-sidebar-left::-webkit-scrollbar,
.nx-comm-sidebar-right::-webkit-scrollbar,
.ns-comm-sidebar::-webkit-scrollbar,
.ns-discover-sidebar::-webkit-scrollbar,
.ns-growth-sidebar::-webkit-scrollbar,
.ns-academy-sidebar::-webkit-scrollbar,
.ns-ops-sidebar::-webkit-scrollbar {
	display: none !important;
	width: 0 !important;
}

/*
 * Mobile / tablet: sidebars become part of the flow, not sticky, to avoid
 * taking over the small viewport. Bottom nav safe-area is respected.
 */
@media (max-width: 899px) {
	.nx-sidebar,
	.nx-sidebar--sticky,
	.ns-tube-sidebar,
	.ns-tube-sidebar--sticky,
	.ns-story-sidebar,
	.ns-story-sidebar--sticky,
	.ns-pro-sidebar,
	.ns-pro-sidebar--sticky,
	.ns-live-sidebar,
	.ns-live-sidebar--sticky,
	.nx-comm-sidebar-left,
	.nx-comm-sidebar-right,
	.nx-comm-sidebar--right,
	.ns-comm-sidebar,
	.ns-comm-sidebar--sticky,
	.ns-discover-sidebar,
	.ns-growth-sidebar,
	.ns-academy-sidebar,
	.ns-ops-sidebar {
		position: relative !important;
		top: auto !important;
		height: auto !important;
		max-height: none !important;
		overflow-y: visible !important;
		width: 100% !important;
		max-width: none !important;
	}
}

/*
 * Drawer / overlay sidebars are intentionally fixed and must NOT be affected.
 */
.nx-sidebar--fixed,
.nx-drawer__panel,
.nx-offcanvas,
.ns-tube-drawer__panel,
.ns-story-drawer__panel,
.ns-pro-drawer__panel,
.ns-live-drawer__panel {
	position: fixed !important;
}
