/*
 * Zero-theme-edit integration glue for this project's bundled "gdgoenka"
 * theme specifically. includes/renderer.php only enqueues this file when
 * get_template() === 'gdgoenka', so it's a no-op under any other theme —
 * nothing in wp-content/themes is ever modified by this plugin.
 *
 * Why this is needed at all: that theme's header ([data-gdg-header]) and
 * mobile nav panel (#mobile-nav) are both `position: fixed`, which takes
 * them out of normal document flow entirely. The Logo Bar itself renders
 * in normal flow (see wp_body_open() in includes/renderer.php), so without
 * this, the fixed header would just pin itself to the very top of the
 * viewport as always and render ON TOP of / hiding the bar, instead of
 * stacking below it.
 *
 * This file only sets the CORRECT INITIAL position (scrollY = 0): the
 * header offset by the bar's own height, the mobile nav panel offset by
 * that plus the solid header's own 60px height (a value specific to that
 * theme's header.php — see its $gdg_bar_state). It intentionally does NOT
 * try to track scroll position — CSS alone can't express "shrink this
 * `position: fixed` element's offset toward 0 as the user scrolls" (that's
 * exactly what `position: sticky` is for, but the header must stay `fixed`
 * — see theme-compat-gdgoenka.js for why switching it to sticky isn't an
 * option here). theme-compat-gdgoenka.js reduces these same `top` values
 * toward 0 as the page scrolls, using the exact same !important mechanism,
 * so this file's values are really just what's on screen for the instant
 * before that script's first run, and a reasonable fallback if JS is
 * unavailable.
 *
 * The !importants are deliberate, not a specificity shortcut: this plugin
 * doesn't control the theme's own stylesheet load order, so !important is
 * the only reliable way to guarantee these two rules win regardless of it
 * — and it lets the companion script override them straightforwardly too,
 * since an inline !important always wins over a stylesheet's !important.
 */
[data-gdg-header] {
	top: var(--gdg-logo-bar-height, 0px) !important;
}

#mobile-nav {
	top: calc(60px + var(--gdg-logo-bar-height, 0px)) !important;
}
