/**
 * Header dropdowns — layout owned here, appearance left to the theme.
 *
 * Two mistakes produced the header that pushed its own nav items apart:
 *
 *  1. Hiding with visibility:hidden. A hidden element still occupies its
 *     space in the flow, so the panel kept shoving the nav sideways even
 *     while invisible. Only display:none actually removes it.
 *
 *  2. Trusting the theme to position it. The live header styles its
 *     dropdown differently from the theme ZIP — the panel there is navy,
 *     not the white card in the ZIP — so .hbk-dropdown could not be relied
 *     on to make it absolute. When it did not, the panel sat in the flow.
 *
 * So position and visibility are forced here, with !important, and nothing
 * else is. Colours, padding, shadows and type still come from whatever the
 * theme puts on .hbk-dropdown; the :where() block below is only a floor for
 * the case where the theme styles nothing at all, and any theme rule beats
 * it because :where() carries no specificity.
 */

/* ── Layout: ours, unconditionally ─────────────────────────────────── */

.hbkqw-has-dropdown {
	position: relative !important;
}

.hbkqw-nav-submenu {
	position: absolute !important;
	top: 100% !important;
	left: 0 !important;
	right: auto !important;
	bottom: auto !important;
	z-index: 9999 !important;
	transform: none !important;
	float: none !important;
	width: auto !important;
	min-width: 240px;
	margin: 0 !important;

	/* display:none, not visibility:hidden — a hidden element still takes up
	   room, which is what widened the header and split the nav. */
	display: none !important;
}

.hbkqw-nav-submenu.hbkqw-visible {
	display: block !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
}

.hbkqw-nav-submenu > li {
	display: block !important;
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	list-style: none !important;
}

/* ── Appearance: a floor only, overridden by any theme rule ────────── */

:where(.hbkqw-nav-submenu) {
	padding: 8px 0;
	background: #0a192f;
	border-top: 3px solid #4caf50;
	box-shadow: 0 14px 30px rgba(10, 25, 47, 0.32);
	list-style: none;
}

:where(.hbkqw-nav-submenu a) {
	display: block;
	padding: 9px 22px;
	font-family: Lato, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.35;
	white-space: nowrap;
	color: #fff;
	text-decoration: none;
}

:where(.hbkqw-nav-submenu a:hover) {
	background: rgba(255, 255, 255, 0.08);
	color: #9fe2bf;
}

/* Small screens: the panel drops into the flow deliberately, since there is
   no hover and the theme's mobile drawer is a separate flat list. */
@media (max-width: 900px) {
	.hbkqw-nav-submenu.hbkqw-visible {
		position: static !important;
		min-width: 0;
		box-shadow: none;
	}
}
