/*
 * Mobile menu as a side panel (owner request 2026-11-19).
 * Applies to the Elementor Nav Menu widget in the mobile header (element b3f29a1).
 * The panel slides in from the left under the header row (the row with the close
 * button stays visible); the rest of the page is dimmed and closes the menu on tap.
 *
 * Colours to tune (can be overridden in Elementor → Site Settings → Custom CSS):
 *   --qiso-menu-overlay       dimming colour
 *   --qiso-menu-width         panel width
 *   --qiso-menu-accordion-bg  pale background of an opened section (item + its subcategories)
 * Text colours are the widget's own settings (Elementor → header → Nav Menu → Dropdown;
 * an opened section's title uses the hover/active colour).
 */
:root {
	--qiso-menu-overlay: rgba(0, 0, 0, 0.45);
	--qiso-menu-width: min(82vw, 360px);
	--qiso-menu-accordion-bg: #f5efec;
}

@media (max-width: 767px) {
	.elementor-element-b3f29a1 .elementor-nav-menu--dropdown.elementor-nav-menu__container {
		position: fixed !important;
		top: var(--qiso-menu-top, 0px) !important;
		left: 0 !important;
		margin-top: 0 !important; /* the widget's "dropdown top distance" would leave a gap under the header */
		width: var(--qiso-menu-width) !important;
		height: calc(100vh - var(--qiso-menu-top, 0px));
		height: calc(100dvh - var(--qiso-menu-top, 0px));
		max-height: none !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
		overscroll-behavior: contain;
		transform: translateX(-100%) !important;
		transform-origin: left center;
		transition: transform 0.3s ease, visibility 0s linear 0.3s !important;
		animation: none !important;
		visibility: hidden;
		z-index: 9999 !important;
		box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
	}

	.elementor-element-b3f29a1 .elementor-menu-toggle.elementor-active + .elementor-nav-menu__container {
		transform: translateX(0) !important;
		visibility: visible;
		transition: transform 0.3s ease, visibility 0s !important;
	}

	/* Opened section: the item and all its subcategories share one pale background,
	   so it reads as one group (owner feedback 2026-11-19). */
	.elementor-element-b3f29a1 .elementor-nav-menu--dropdown a.has-submenu.highlighted,
	.elementor-element-b3f29a1 .elementor-nav-menu--dropdown a.has-submenu.highlighted + .sub-menu,
	.elementor-element-b3f29a1 .elementor-nav-menu--dropdown a.has-submenu.highlighted + .sub-menu a {
		background-color: var(--qiso-menu-accordion-bg) !important;
	}

	.qiso-menu-overlay {
		position: fixed;
		top: var(--qiso-menu-top, 0px);
		right: 0;
		bottom: 0;
		left: 0;
		background: var(--qiso-menu-overlay);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.3s ease, visibility 0s linear 0.3s;
		z-index: 9998;
		-webkit-tap-highlight-color: transparent;
	}

	html.qiso-menu-open .qiso-menu-overlay {
		opacity: 1;
		visibility: visible;
		transition: opacity 0.3s ease, visibility 0s;
	}

	html.qiso-menu-open,
	html.qiso-menu-open body {
		overflow: hidden;
	}
}
