/**
 * ZARE Theme generic sticky presentation runtime.
 * Authoring is optional-Companion owned; saved state is finite Core className tokens.
 */
.zare-sticky {
	--zare-sticky-offset: 0px;
	--zare-sticky-layer: 20;
	position: sticky;
	top: var(--zare-sticky-offset);
	z-index: var(--zare-sticky-layer);
}
.zare-sticky-offset-auto { --zare-sticky-offset: 0px; }
.zare-sticky-offset-compact { --zare-sticky-offset: var(--wp--preset--spacing--2, 0.5rem); }
.zare-sticky-offset-comfortable { --zare-sticky-offset: var(--wp--preset--spacing--4, 1rem); }
.zare-sticky-stack-normal { --zare-sticky-layer: 20; }
.zare-sticky-stack-raised { --zare-sticky-layer: 60; }
.zare-sticky-stack-overlay { --zare-sticky-layer: 1000; }
.zare-sticky-surface-inherit { background: inherit; color: inherit; }
.zare-sticky-surface-solid {
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--foreground);
}
.zare-sticky-surface-frosted {
	background: color-mix(in srgb, var(--wp--preset--color--background) 84%, transparent);
	color: var(--wp--preset--color--foreground);
	-webkit-backdrop-filter: blur(var(--zare-overlay-presentation-backdrop-blur-medium, 5px));
	backdrop-filter: blur(var(--zare-overlay-presentation-backdrop-blur-medium, 5px));
}
body.admin-bar .zare-sticky {
	top: calc(var(--zare-sticky-offset) + 32px);
}
@media (max-width: 782px) {
	body.admin-bar .zare-sticky { top: calc(var(--zare-sticky-offset) + 46px); }
}
@media (max-width: 782px) {
	.zare-sticky.zare-sticky-device-desktop { position: static; }
}
@media (max-width: 480px) {
	.zare-sticky.zare-sticky-device-tablet-desktop,
	.zare-sticky.zare-sticky-device-desktop,
	.zare-sticky.zare-sticky-mobile-normal { position: static; }
}

/* Generic Template Part sticky host for authored Header groups. */
.wp-block-template-part:has(> .zare-sticky-template-part-host) {
	--zare-sticky-host-offset: 0px;
	--zare-sticky-host-layer: 20;
	position: sticky;
	top: var(--zare-sticky-host-offset);
	z-index: var(--zare-sticky-host-layer);
}
.wp-block-template-part:has(> .zare-sticky-template-part-host.zare-sticky-offset-compact) {
	--zare-sticky-host-offset: var(--wp--preset--spacing--2, 0.5rem);
}
.wp-block-template-part:has(> .zare-sticky-template-part-host.zare-sticky-offset-comfortable) {
	--zare-sticky-host-offset: var(--wp--preset--spacing--4, 1rem);
}
.wp-block-template-part:has(> .zare-sticky-template-part-host.zare-sticky-stack-raised) {
	--zare-sticky-host-layer: 60;
}
.wp-block-template-part:has(> .zare-sticky-template-part-host.zare-sticky-stack-overlay) {
	--zare-sticky-host-layer: 1000;
}
body.admin-bar .wp-block-template-part:has(> .zare-sticky-template-part-host) {
	top: calc(var(--zare-sticky-host-offset) + 32px);
}
.wp-block-template-part > .zare-sticky-template-part-host.zare-sticky {
	position: relative;
	top: auto;
}

/* Generic bounded Header scroll-direction state. Positioning remains native sticky. */
.zare-scroll-hide-down-reveal-up {
	--zare-scroll-hide-extra-offset: 0px;
	transition: transform 180ms ease;
}
.zare-scroll-hide-down-reveal-up.zare-scroll-hidden {
	transform: translateY(calc(-100% - var(--zare-scroll-hide-extra-offset)));
}
@media (prefers-reduced-motion: reduce) {
	.zare-scroll-hide-down-reveal-up { transition: none; }
	.zare-scroll-hide-down-reveal-up.zare-scroll-hidden { transform: none !important; }
}
@media (max-width: 782px) {
	body.admin-bar .wp-block-template-part:has(> .zare-sticky-template-part-host) {
		top: calc(var(--zare-sticky-host-offset) + 46px);
	}
	.wp-block-template-part:has(> .zare-sticky-template-part-host.zare-sticky-device-desktop) {
		position: relative;
		top: auto;
	}
}
@media (max-width: 480px) {
	.wp-block-template-part:has(> .zare-sticky-template-part-host.zare-sticky-device-tablet-desktop),
	.wp-block-template-part:has(> .zare-sticky-template-part-host.zare-sticky-device-desktop),
	.wp-block-template-part:has(> .zare-sticky-template-part-host.zare-sticky-mobile-normal) {
		position: relative;
		top: auto;
	}
}

