/* Site-wide pieces that used to come from add-on plugins. */

/* Header that overlays the page and stays at the top (was Sticky Header Effects).
   site.js gives the header template's wrapper the header's own height and bottom margin,
   so pinning the header does not move the page under it. */
.innovya-header-ready .innovya-header {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	left: 0;
	width: 100%;
	margin-bottom: 0 !important;
	z-index: 9999;
	transition: backdrop-filter .3s, -webkit-backdrop-filter .3s;
}
.innovya-scrolled .innovya-header {
	-webkit-backdrop-filter: blur(var(--innovya-header-blur, 0px)) saturate(var(--innovya-header-saturate, 1));
	backdrop-filter: blur(var(--innovya-header-blur, 0px)) saturate(var(--innovya-header-saturate, 1));
}

/* The site kit paints every <button> as a gradient pill; the menu's dropdown caret is a button too. */
.innovya-nav .e-n-menu-dropdown-icon,
.innovya-nav .e-n-menu-dropdown-icon:hover,
.innovya-nav .e-n-menu-dropdown-icon:focus {
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	padding: 0;
}

/* Tablet and phone: the menu opens as a full-screen panel, as the previous menu did. */
@media (max-width: 1024px) {
	/* The widget is only as wide as its button, so the header's own spacing places it. */
	.elementor-widget-n-menu.innovya-nav { flex: none; width: auto; max-width: none; }
	.elementor-widget-n-menu.innovya-nav .e-n-menu > .e-n-menu-toggle { align-self: flex-end; }
	.innovya-nav .e-n-menu-toggle {
		position: relative;
		z-index: 2;
		width: 45px;
		height: 43px;
		padding: 8px;
		border-radius: 3px;
	}
	.innovya-nav .e-n-menu-toggle svg { width: 22px; height: 22px; }
	.innovya-nav .e-n-menu-toggle[aria-expanded="true"] { margin-top: 0; }
	.innovya-nav .e-n-menu-toggle[aria-expanded="true"] {
		position: fixed;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 22px);
		right: 12px;
		z-index: 2147483641; /* one above the panel */
	}
	/* A blurred header would trap the fixed panel inside itself. */
	.innovya-header:has(.e-n-menu-toggle[aria-expanded="true"]) { -webkit-backdrop-filter: none; backdrop-filter: none; }
	.elementor-widget-n-menu.innovya-nav .e-n-menu[data-layout="dropdown"] > .e-n-menu-toggle[aria-expanded="true"] + .e-n-menu-wrapper {
		position: fixed;
		inset: var(--wp-admin--admin-bar--height, 0px) 0 0 0;
		width: 100%;
		max-height: none;
		margin: 0;
		padding: 84px 0 10px;
		overflow-y: auto;
		background: var(--innovya-nav-panel, #050F1E);
	}
	.elementor-widget-n-menu.innovya-nav .e-n-menu[data-layout="dropdown"] .e-n-menu-heading > .e-n-menu-item > .e-n-menu-title {
		justify-content: flex-start;
	}
}

/* Tablet only: the old menu button was 6px shorter and sat 3px higher than on phones. */
@media (min-width: 768px) and (max-width: 1024px) {
	.innovya-nav .e-n-menu-toggle { height: 37px; margin-top: -3px; }
}
