<style>
	.p-pageWrapper .p-navSticky {
		top: {{ $uix_stickyStaffBarHeight }} !important;
	}

	<xf:if is="{$uix_responsiveStaffBar} && !{$uix_alwaysStaffBar}">
		@media (max-width: {{ property('uix_staffBarBreakpoint')}}) {
			.p-pageWrapper .p-navSticky {
				top: 0 !important;
			}
		}
	</xf:if>

	<xf:set var="$uix_stickyTabsHeight" value="0" />
	<xf:if is="$uix_hasMainTabs && ({{property('uix_tabBarLocation')}} == 'header') && {{property('uix_mainTabsSticky')}}">
	<xf:set var="$uix_stickyTabsHeight" value="{{ property('uix_mainTabsHeight')}}" />
	</xf:if>

	<xf:set var="$uix_stickyNavHeightTotal" value="0" />
	<xf:set var="$uix_stickyNavPrimary" value="0" />
	<xf:if is="!{$uix_hideNavigation}">
		<xf:if is="property('publicNavSticky') == 'primary'">
			<xf:set var="$uix_stickyNavHeightTotal" value="{{property('uix_stickyNavHeight')}}" />
			<xf:set var="$uix_stickyNavPrimary" value="{{property('uix_stickyNavHeight')}}" />
		<xf:elseif is="property('publicNavSticky') == 'all'" />
			<xf:set var="$uix_stickyNavPrimary" value="{{property('uix_stickyNavHeight')}}" />
			<xf:if is="{{property('uix_viewportWidthRemoveSubNav')}} != '100%'">
				<xf:set var="$uix_stickyNavHeightTotal" value="{{property('uix_stickyNavHeight') + property('uix_stickySectionLinkHeight')}}" />
			<xf:else />
				<xf:set var="$uix_stickyNavHeightTotal" value="{{property('uix_stickyNavHeight')}}" />
			</xf:if>
		</xf:if>
	</xf:if>

	<xf:set var="$uix_subNavBreakpoint" value="{{ property('uix_viewportWidthRemoveSubNav')}}"/>

	<xf:if is="!{$uix_subNavContentStatic}">
		<xf:set var="$uix_subNavBreakpoint" value="$uix_sidebarBreakpoint"/>
	</xf:if>

	<xf:if is="(!{$uix_subNavContentStatic}) || {$uix_subNavContentStatic}">	
		<xf:set var="$uix_stickyTotal" value="{{ $uix_stickyStaffBarHeight + $uix_stickyNavHeightTotal + property('elementSpacer') + $uix_stickyTabsHeight}}" />
		.uix_mainTabBar {top: {{$uix_stickyStaffBarHeight + $uix_stickyNavHeightTotal}}px !important;}
		.uix_stickyBodyElement:not(.offCanvasMenu) {
			top: {{$uix_stickyTotal}}px !important;
			min-height: calc(100vh - {{$uix_stickyTotal}}px) !important;
		}
		.uix_sidebarInner .uix_sidebar--scroller {margin-top: {{$uix_stickyTotal}}px;}
		.uix_sidebarInner {margin-top: -{{$uix_stickyTotal}}px;}
		.p-body-sideNavInner .uix_sidebar--scroller {margin-top: {{$uix_stickyTotal}}px;}
		.p-body-sideNavInner {margin-top: -{{$uix_stickyTotal}}px;}
		.uix_stickyCategoryStrips {top: {{$uix_stickyTotal}}px !important;}
		#XF .u-anchorTarget {
			height: {{$uix_stickyTotal}}px;
			margin-top: -{{$uix_stickyTotal}}px;
		}
	
		<xf:if is="{$uix_responsiveStaffBar} && !{$uix_alwaysStaffBar}">
			
			@media(max-width: {{ property('uix_staffBarBreakpoint') }}) {
				<xf:set var="$uix_stickyTotal" value="{{ $uix_stickyNavHeightTotal + property('elementSpacer') + $uix_stickyTabsHeight}}" />
				.uix_mainTabBar {top: {{$uix_stickyNavHeightTotal}}px !important;}
				.uix_stickyBodyElement:not(.offCanvasMenu) {
					top: {{$uix_stickyTotal}}px !important;
					min-height: calc(100vh - {{$uix_stickyTotal}}px) !important;
				}
				.uix_sidebarInner .uix_sidebar--scroller {margin-top: {{$uix_stickyTotal}}px;}
				.uix_sidebarInner {margin-top: -{{$uix_stickyTotal}}px;}
				.p-body-sideNavInner .uix_sidebar--scroller {margin-top: {{$uix_stickyTotal}}px;}
				.p-body-sideNavInner {margin-top: -{{$uix_stickyTotal}}px;}
				.uix_stickyCategoryStrips {top: {{$uix_stickyTotal}}px !important;}
				#XF .u-anchorTarget {
					height: {{$uix_stickyTotal}}px;
					margin-top: -{{$uix_stickyTotal}}px;
				}
			}
		</xf:if>

		<xf:if is="{$uix_subNavBreakpoint} != '100%'">
			@media (max-width: {$uix_subNavBreakpoint}) {
		</xf:if>
				.p-sectionLinks {display: none;}

				<xf:set var="$uix_stickyTotal" value="{{ $uix_stickyStaffBarHeight + $uix_stickyNavPrimary + property('elementSpacer') + $uix_stickyTabsHeight}}" />

				.uix_mainTabBar {top: {{$uix_stickyStaffBarHeight + $uix_stickyNavPrimary}}px !important;}
				.uix_stickyBodyElement:not(.offCanvasMenu) {
					top: {{$uix_stickyTotal}}px !important;
					min-height: calc(100vh - {{$uix_stickyTotal}}px) !important;
				}
				.uix_sidebarInner .uix_sidebar--scroller {margin-top: {{$uix_stickyTotal}}px;}
				.uix_sidebarInner {margin-top: -{{$uix_stickyTotal}}px;}
				.p-body-sideNavInner .uix_sidebar--scroller {margin-top: {{$uix_stickyTotal}}px;}
				.p-body-sideNavInner {margin-top: -{{$uix_stickyTotal}}px;}
				.uix_stickyCategoryStrips {top: {{$uix_stickyTotal}}px !important;}
				#XF .u-anchorTarget {
					height: {{$uix_stickyTotal}}px;
					margin-top: -{{$uix_stickyTotal}}px;
				}

				<xf:if is="{$uix_responsiveStaffBar} && !{$uix_alwaysStaffBar}">
					@media(max-width: {{ property('uix_staffBarBreakpoint') }}) {
						<xf:set var="$uix_stickyTotal" value="{{ $uix_stickyNavPrimary + property('elementSpacer') + $uix_stickyTabsHeight }}" />

						.uix_mainTabBar {top: {{$uix_stickyNavPrimary}} !important;}
						.uix_stickyBodyElement:not(.offCanvasMenu) {
							top: {{$uix_stickyTotal}}px !important;
							min-height: calc(100vh - {{$uix_stickyTotal}}px) !important;
						}
						.uix_sidebarInner .uix_sidebar--scroller {margin-top: {{$uix_stickyTotal}}px;}
						.uix_sidebarInner {margin-top: -{{$uix_stickyTotal}}px;}
						.p-body-sideNavInner .uix_sidebar--scroller {margin-top: {{$uix_stickyTotal}}px;}
						.p-body-sideNavInner {margin-top: -{{$uix_stickyTotal}}px;}
						.uix_stickyCategoryStrips {top: {{$uix_stickyTotal}}px !important;}
						#XF .u-anchorTarget {
							height: {{$uix_stickyTotal}}px;
							margin-top: -{{$uix_stickyTotal}}px;
						}
					}
				</xf:if>
		<xf:if is="{$uix_subNavBreakpoint} != '100%'">
			}
		</xf:if>
	<xf:else />
		<xf:set var="$uix_stickyTotal" value="{{ $uix_stickyStaffBarHeight + $uix_stickyNavPrimary + property('elementSpacer') + $uix_stickyTabsHeight}}" />

		.uix_mainTabBar {top: {{$uix_stickyStaffBarHeight + $uix_stickyNavPrimary}}px !important;}
		.uix_stickyBodyElement:not(.offCanvasMenu) {
			top: {{$uix_stickyTotal}}px !important;
			min-height: calc(100vh - {{$uix_stickyTotal}}px) !important;
		}
		.uix_sidebarInner .uix_sidebar--scroller {margin-top: {{$uix_stickyTotal}}px;}
		.uix_sidebarInner {margin-top: -{{$uix_stickyTotal}}px;}
		.p-body-sideNavInner .uix_sidebar--scroller {margin-top: {{$uix_stickyTotal}}px;}
		.p-body-sideNavInner {margin-top: -{{$uix_stickyTotal}}px;}
		.uix_stickyCategoryStrips {top: {{$uix_stickyTotal}}px !important;}
		#XF .u-anchorTarget {
			height: {{$uix_stickyTotal}}px;
			margin-top: -{{$uix_stickyTotal}}px;
		}
	
		<xf:if is="{$uix_responsiveStaffBar} && !{$uix_alwaysStaffBar}">
			<xf:if is="{{ property('uix_staffBarBreakpoint')}} != '100%'">
			@media(max-width: {{ property('uix_staffBarBreakpoint') }}) {
			</xf:if>
				<xf:set var="$uix_stickyTotal" value="{{ $uix_stickyNavHeightTotal + property('elementSpacer') + $uix_stickyTabsHeight}}" />
				.uix_mainTabBar {top: {{$uix_stickyNavHeightTotal}} !important;}
				.uix_stickyBodyElement:not(.offCanvasMenu) {
					top: {{$uix_stickyTotal}}px !important;
					min-height: calc(100vh - {{$uix_stickyTotal}}px) !important;
				}
				.uix_sidebarInner .uix_sidebar--scroller {margin-top: {{$uix_stickyTotal}}px;}
				.uix_sidebarInner {margin-top: -{{$uix_stickyTotal}}px;}
				.p-body-sideNavInner .uix_sidebar--scroller {margin-top: {{$uix_stickyTotal}}px;}
				.p-body-sideNavInner {margin-top: -{{$uix_stickyTotal}}px;}
				.uix_stickyCategoryStrips {top: {{$uix_stickyTotal}}px !important;}
				#XF .u-anchorTarget {
					height: {{$uix_stickyTotal}}px;
					margin-top: -{{$uix_stickyTotal}}px;
				}
			<xf:if is="{{ property('uix_staffBarBreakpoint')}} != '100%'">
			}
			</xf:if>
		</xf:if>
	</xf:if>

	.uix_sidebarNav .uix_sidebar--scroller {max-height: calc(100vh - {$uix_stickyTotal}px);}
	<xf:if is="property('uix_scrollableSidebar')">
		.uix_sidebarInner .uix_sidebar--scroller {max-height: calc(100vh - {$uix_stickyTotal}px);}
	</xf:if>
	<xf:if is="property('uix_scrollableSidenav')">
		.p-body-sideNavInner .uix_sidebar--scroller {max-height: calc(100vh - {$uix_stickyTotal}px);}
	</xf:if>
</style>

<xf:if is="property('uix_stickySidebar') == 'sticky'">
<xf:js>
	$(".uix_sidebarInner .uix_sidebar--scroller").stick_in_parent({
		parent: '.p-body-main',
	});

	$(".p-body-sideNavInner .uix_sidebar--scroller").stick_in_parent({
		parent: '.p-body-main',
	});

	<xf:if is="{{property('uix_stickySidebarCalcDelay')}} != '0'">
		$(document).ready(function() {
			window.setTimeout(function() {
				themehouse.common[20210125].resizeFire()
			}, {{property('uix_stickySidebarCalcDelay')}});
		})
	</xf:if>
</xf:js>
</xf:if>