/**
 * Fix: the site header (logo + main menu + Sign In/Register, or the full
 * account dropdown when logged in) is an Elementor container that's marked
 * "hidden on tablet" AND "hidden on mobile" with nothing configured to
 * replace it below 1025px wide - so on any phone or tablet, the entire
 * header, nav included, simply disappeared.
 *
 * This restores it at those widths with a compact closed bar - small logo
 * on the left, a hamburger (nav) icon and a round account icon on the
 * right - matching the same closed-bar pattern already used by the site's
 * other header templates (About Us, Login, etc.), which have their own
 * built-in Offcanvas + account-icon widgets. Header 4997 (Home, Register,
 * Our Pricing) never had those widgets, so this recreates the same look
 * and the same two-separate-triggers behavior using the menu and account
 * markup Elementor already renders here - no second menu is created, and
 * nothing in either area's actual content/links is changed.
 *
 * The two icons are independent and mutually exclusive: the hamburger
 * opens only the nav links, the round icon opens only the account area
 * (Sign In/Register, or the full logged-in account menu). Desktop/laptop
 * (1025px+) is completely untouched.
 */
@media (max-width: 1024px) {
	.elementor-element-e62cea3.elementor-hidden-tablet.elementor-hidden-mobile {
		display: block !important;
		position: relative;
		z-index: 9999;
		background: #FBF6E7;
	}

	.elementor-element-e62cea3 > .e-con-inner {
		display: flex !important;
		flex-wrap: wrap;
		align-items: center;
		width: 100%;
	}

	.elementor-element-e62cea3 .elementor-element-c2e1e2e {
		flex: 0 1 auto;
	}

	/* Icon group (hamburger + account), injected by mobile-nav.js right
	   after the logo, pinned to the right like the reference design. */
	.jws-mobile-icons {
		display: flex;
		align-items: center;
		gap: 10px;
		margin-left: auto;
		flex-shrink: 0;
	}

	/* The nav links and the account/login area are hidden by default, and
	   each opens as its own full-width panel below the closed bar. */
	.elementor-element-e62cea3 .elementor-element-80ec36a,
	.elementor-element-e62cea3 .elementor-element-d4df464 {
		display: none !important;
	}

	.elementor-element-e62cea3.jws-mobile-nav-open .elementor-element-80ec36a,
	.elementor-element-e62cea3.jws-mobile-account-open .elementor-element-d4df464 {
		display: block !important;
		flex-basis: 100%;
		width: 100%;
		padding: 14px 4px 4px;
	}

	.elementor-element-e62cea3.jws-mobile-account-open .elementor-element-d4df464 {
		border-top: 1px solid rgba(176, 141, 87, 0.2);
		margin-top: 6px;
	}

	/* Keeps a very long logged-in account menu from pushing the rest of
	   the page too far down - scrolls within itself instead. */
	.elementor-element-e62cea3.jws-mobile-nav-open > .e-con-inner,
	.elementor-element-e62cea3.jws-mobile-account-open > .e-con-inner {
		max-height: calc(100vh - 70px);
		overflow-y: auto;
		padding-bottom: 16px;
	}

	.elementor-element-e62cea3 .jws_main_menu_inner.open > ul.nav {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
		width: 100%;
	}

	/* The logged-in account dropdown's own list (Edit Profile, Messages,
	   Memberships, Log Out, etc.) - just let it stack normally, full width. */
	.elementor-element-e62cea3 .account-menu-dropdown .nav {
		display: flex;
		flex-direction: column;
		gap: 10px;
		width: 100%;
	}

	/* Hamburger button - opens the nav links. */
	.jws-mobile-nav-toggle {
		display: inline-flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		width: 38px;
		height: 38px;
		gap: 5px;
		padding: 0;
		background: transparent;
		border: 0;
		cursor: pointer;
		flex-shrink: 0;
	}

	.jws-mobile-nav-toggle span {
		display: block;
		width: 22px;
		height: 2px;
		background: #b08d57;
		transition: transform 0.2s ease, opacity 0.2s ease;
	}

	.elementor-element-e62cea3.jws-mobile-nav-open .jws-mobile-nav-toggle span:nth-child(1) {
		transform: translateY(7px) rotate(45deg);
	}
	.elementor-element-e62cea3.jws-mobile-nav-open .jws-mobile-nav-toggle span:nth-child(2) {
		opacity: 0;
	}
	.elementor-element-e62cea3.jws-mobile-nav-open .jws-mobile-nav-toggle span:nth-child(3) {
		transform: translateY(-7px) rotate(-45deg);
	}

	/* Round account icon button - opens the Sign In/Register (or logged-in
	   account) area, matching the thin-outline circle icon style already
	   used by the other header templates' account widget.

	   -webkit-appearance/-moz-appearance reset is required here: without
	   it, mobile browsers (iOS Safari in particular) draw their own native
	   button chrome - a light grey filled pill/circle - on top of a plain
	   <button>, which overrides this background/border and makes the icon
	   look like a flat grey avatar placeholder instead of the intended
	   thin gold outline. The hamburger button doesn't need this because
	   its lines are <span> backgrounds, not inherited text/icon color. */
	.jws-mobile-account-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 38px;
		height: 38px;
		padding: 0;
		margin: 0;
		box-sizing: border-box;
		border-radius: 50%;
		appearance: none;
		-webkit-appearance: none;
		-moz-appearance: none;
		border: 1px solid rgba(176, 141, 87, 0.45) !important;
		background: transparent !important;
		background-image: none !important;
		box-shadow: none !important;
		color: #b08d57 !important;
		font-size: 19px;
		line-height: 1;
		cursor: pointer;
		flex-shrink: 0;
	}

	.elementor-element-e62cea3.jws-mobile-account-open .jws-mobile-account-toggle {
		background: rgba(176, 141, 87, 0.15);
	}

	/* Home page only (requested 2026-10-09): the logo was rendering at its
	   full 100px desktop size, centered - taking up most of the header's
	   height and crowding the icons on narrow screens. Scoped to body.home
	   (the WordPress front-page body class, unique to this page) so
	   Register and Our Pricing - which share this same header template -
	   keep their original logo size/position untouched. */
	body.home .elementor-element-e62cea3 {
		padding: 2px 16px !important;
	}

	body.home .elementor-element-bcbc278 {
		text-align: left !important;
		line-height: 0;
	}

	body.home .elementor-element-bcbc278 .elementor-logo img {
		width: 40px !important;
		height: auto !important;
	}
}

/* Never show the injected icons above the tablet breakpoint - the normal
   desktop header (unchanged) takes over there. */
@media (min-width: 1025px) {
	.jws-mobile-icons {
		display: none !important;
	}
}

/**
 * Unrelated fix, same file for simplicity (already loaded site-wide):
 * the separate "Menu mobile" Elementor template (shown as a full-screen
 * popup on pages like /login/) has its nav links rendering invisible -
 * white text with no background color actually applying behind it, so it's
 * white-on-white. Root cause: the site's Elementor color system has all
 * four global colors (primary/secondary/text/accent) set to the same gold
 * value, which this template's design depended on being distinct. Rather
 * than touch that site-wide color system, this just makes the links in
 * this one popup visible again, matching the same gold already used by
 * this popup's own copyright text right below it.
 */
.elementor-100 .elementor-element-56adffd0 .jws_main_menu_inner .nav > li > a {
	color: #b08d57 !important;
}

/**
 * Temporarily hide the "Our Pricing" menu item (requested 2026-10-09).
 * The menu item itself, the Our Pricing page, and all membership/checkout
 * functionality are untouched - this only hides the nav link, on both
 * desktop and mobile (same <li>, tagged with this class via the menu
 * item's "CSS Classes" field, not duplicated or recreated). To restore:
 * remove this block, or remove the "jws-hidden-menu-item" class from the
 * "Our Pricing" item in Appearance > Menus > theelitenikah.
 */
.jws-hidden-menu-item {
	display: none !important;
}

/**
 * Bottom mobile toolbar icons (Discover/Message/Match/Activities/Search) -
 * custom icon set provided by the user (2026-10-14), replacing the ones
 * that previously matched desktop. Mobile-only by construction: this whole
 * toolbar (jws_toolbar_mobile() in the parent theme, wp-content/themes/
 * lovedate/inc/template-tags.php) is a completely separate, PHP-driven
 * component from desktop's "jws_dating_menu" Elementor widget (in the
 * "Header Dating" template, post 4312) - so this swap has zero effect on
 * desktop. Rather than touch that parent-theme PHP file (it has no
 * function_exists() guard, so redeclaring it in the child theme would
 * fatal-error) or duplicate its notification-badge/current-page/login-
 * gating logic, this swaps each icon-font glyph for the new SVG purely via
 * CSS. Matched by link destination, not position, so it keeps working if
 * items are reordered or toggled off in JWS Settings > Toolbar Popup.
 * Source files: assets/icons/mobile-toolbar/*.svg
 */
.jws-toolbar-item a[href*="/discover/"] i,
.jws-toolbar-item a[href*="/chat/"] i,
.jws-toolbar-item a[href*="/match/"] i,
.jws-toolbar-item a[href*="/activities"] i,
.jws-toolbar-item a[href*="/members/"] i {
	font-size: 0;
	display: inline-block;
	width: 22px;
	height: 22px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}
.jws-toolbar-item a[href*="/discover/"] i {
	background-image: url('https://theelitenikah.com/wp-content/themes/lovedate-child/assets/icons/mobile-toolbar/discover.svg');
}
.jws-toolbar-item a[href*="/chat/"] i {
	background-image: url('https://theelitenikah.com/wp-content/themes/lovedate-child/assets/icons/mobile-toolbar/message.svg');
}
.jws-toolbar-item a[href*="/match/"] i {
	background-image: url('https://theelitenikah.com/wp-content/themes/lovedate-child/assets/icons/mobile-toolbar/match.svg');
}
.jws-toolbar-item a[href*="/activities"] i {
	background-image: url('https://theelitenikah.com/wp-content/themes/lovedate-child/assets/icons/mobile-toolbar/activities.svg');
}
.jws-toolbar-item a[href*="/members/"] i {
	background-image: url('https://theelitenikah.com/wp-content/themes/lovedate-child/assets/icons/mobile-toolbar/search.svg');
}
