/* Qreative Header Footer Designer sticky header behavior. */

.qt-header-section {
	box-sizing: border-box;
	max-width: 100%;
	overflow: visible;
}

:root {
	--qt-hf-admin-bar-offset: 0px;
	--qt-hf-announcement-height: 0px;
	--qt-hf-announcement-sticky-offset: 0px;
}

[data-qt-hf-sticky-header] {
	--qt-hf-sticky-offset: 0px;
	--qt-hf-sticky-offset-current: var(--qt-hf-sticky-offset);
	--qt-hf-sticky-top: calc(var(--qt-hf-admin-bar-offset) + var(--qt-hf-announcement-sticky-offset) + var(--qt-hf-sticky-offset-current));
	--qt-hf-sticky-z-index: 999;
	--qt-hf-sticky-transition: 260ms cubic-bezier(0.22, 1, 0.36, 1);
	position: relative;
	overflow-anchor: none;
	overflow: visible;
	z-index: var(--qt-hf-sticky-z-index);
	transition:
		background-color var(--qt-hf-sticky-transition),
		box-shadow var(--qt-hf-sticky-transition);
}

[data-qt-hf-floating-header],
body.qreative-header-footer-designer-header-preview > .elementor {
	--qt-hf-floating-top-offset: 0px;
	--qt-hf-floating-offset-current: var(--qt-hf-floating-top-offset);
	--qt-hf-floating-top: calc(var(--qt-hf-admin-bar-offset) + var(--qt-hf-announcement-height) + var(--qt-hf-floating-offset-current));
}

body.qreative-header-footer-designer-header-preview > .elementor {
	--qt-hf-sticky-offset-current: var(--qt-hf-sticky-offset, 0px);
	--qt-hf-sticky-top: calc(var(--qt-hf-admin-bar-offset) + var(--qt-hf-announcement-sticky-offset) + var(--qt-hf-sticky-offset-current));
}

[data-qt-hf-sticky-header].qt-hf-sticky-immediate.qt-hf-sticky-active {
	animation: none;
}

html.qt-hf-sticky-transitioning {
	overflow-anchor: none;
}

html.qt-hf-anchor-offset-ready {
	--qt-hf-anchor-gap: 16px;
	scroll-behavior: smooth;
	scroll-padding-top: max(
		var(--qt-hf-theme-anchor-offset, 0px),
		calc(var(--qt-hf-sticky-anchor-offset, 0px) + var(--qt-hf-anchor-gap))
	);
}

[data-qt-hf-sticky-header].qt-hf-sticky-active {
	animation: qt-hf-sticky-enter 180ms ease-out both;
	position: sticky;
	overflow: visible;
	top: var(--qt-hf-sticky-top);
}

@keyframes qt-hf-sticky-enter {
	from {
		opacity: 0.92;
		top: calc(var(--qt-hf-sticky-top) - 6px);
	}

	to {
		opacity: 1;
		top: var(--qt-hf-sticky-top);
	}
}

[data-qt-hf-sticky-header].qt-hf-sticky-immediate {
	position: sticky;
	top: var(--qt-hf-sticky-top);
}

[data-qt-hf-sticky-header].qt-hf-sticky-active .elementor-section,
[data-qt-hf-sticky-header].qt-hf-sticky-active .elementor-container,
[data-qt-hf-sticky-header].qt-hf-sticky-active .elementor-element,
[data-qt-hf-sticky-header].qt-hf-sticky-active .e-con {
	overflow: visible;
}

body.admin-bar {
	--qt-hf-admin-bar-offset: var(--wp-admin--admin-bar--height, 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar {
		--qt-hf-admin-bar-offset: var(--wp-admin--admin-bar--height, 46px);
	}
}

@media (prefers-reduced-motion: reduce) {
	html.qt-hf-anchor-offset-ready {
		scroll-behavior: auto;
	}

	[data-qt-hf-sticky-header] {
		animation: none;
		transition: none;
	}
}
