/**
 * Country + language selector — top utility bar.
 * Design: consecutive dropdowns separated by a thin vertical bar,
 * flag + country name | globe + language tag (NL/FR), dropdown panels below.
 */

.lameris-locale-bar {
	--llb-ink: #12414f;
	--llb-muted: #4a6a75;
	--llb-accent: #00a4b4;
	--llb-line: #dde6e9;
	--llb-hover-bg: #eef6f7;

	display: inline-flex;
	align-items: center;
	gap: 16px;
	font-family: "filision-pro", "Poppins", Sans-serif;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	color: var(--llb-ink);
	position: relative;
	z-index: 100;
	white-space: nowrap;
}

/* Thin bar between country and language — as in the reference design */
.lameris-locale-bar__divider {
	display: inline-block;
	width: 1px;
	height: 18px;
	background: var(--llb-line);
	flex-shrink: 0;
}

.lameris-locale-bar__dropdown {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.lameris-locale-bar__toggle {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	/* Theme styles all <button> with dark #55555e / white — reset to nav look */
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	cursor: pointer;
	font: inherit;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: 1;
	color: var(--llb-ink) !important;
	padding: 8px 0;
	min-height: 36px;
	white-space: nowrap;
	border-radius: 6px;
	-webkit-appearance: none;
	appearance: none;
	transition: color 0.15s ease;
	box-sizing: border-box;
}

.lameris-locale-bar__toggle:hover,
.lameris-locale-bar__toggle:focus-visible {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	color: var(--llb-accent) !important;
}

.lameris-locale-bar__toggle:focus-visible {
	outline: 2px solid var(--llb-accent);
	outline-offset: 2px;
}

.lameris-locale-bar__toggle:hover .lameris-locale-bar__chevron path,
.lameris-locale-bar__toggle:focus-visible .lameris-locale-bar__chevron path {
	stroke: var(--llb-accent);
}

.lameris-locale-bar__toggle:hover .lameris-locale-bar__globe,
.lameris-locale-bar__toggle:focus-visible .lameris-locale-bar__globe {
	stroke: var(--llb-accent);
}

.lameris-locale-bar__flag {
	display: inline-flex;
	width: 20px;
	height: 14px;
	border-radius: 2px;
	overflow: hidden;
	box-shadow: 0 0 0 1px rgba(18, 65, 79, 0.15);
	flex-shrink: 0;
}

.lameris-locale-bar__flag img,
.lameris-locale-bar__flag svg {
	display: block;
	width: 20px;
	height: 14px;
	object-fit: cover;
}

.lameris-locale-bar__globe {
	flex-shrink: 0;
	stroke: var(--llb-muted);
	transition: stroke 0.15s ease;
}

.lameris-locale-bar__chevron {
	transition: transform 0.15s ease;
	flex-shrink: 0;
}

.lameris-locale-bar__chevron path {
	stroke: var(--llb-muted);
	transition: stroke 0.15s ease;
}

.lameris-locale-bar__dropdown.is-open .lameris-locale-bar__chevron {
	transform: rotate(180deg);
}

/* Dropdown panel */
.lameris-locale-bar__menu {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 8px 28px rgba(18, 65, 79, 0.18);
	border: 1px solid #e8eef0;
	min-width: 180px;
	z-index: 9999;
	color: var(--llb-ink);
	font-weight: 500;
	font-size: 13px;
	line-height: 1.3;
}

.lameris-locale-bar__dropdown--lang .lameris-locale-bar__menu {
	min-width: 190px;
}

.lameris-locale-bar__item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 9px 12px;
	border-radius: 7px;
	cursor: pointer;
	box-sizing: border-box;
	transition: background 0.12s ease;
}

.lameris-locale-bar__item:hover,
.lameris-locale-bar__item.is-active {
	background: var(--llb-hover-bg);
}

.lameris-locale-bar__item-label {
	flex: 1;
	text-align: left;
}

.lameris-locale-bar__item-tag {
	font-size: 11px;
	color: #8aa3ac;
	flex-shrink: 0;
}

.lameris-locale-bar__check {
	flex-shrink: 0;
	margin-left: 4px;
}

.lameris-locale-bar.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* Elementor header glue — widget behaves like a right-aligned flex   */
/* ------------------------------------------------------------------ */
.elementor-widget-shortcode.lameris-locale-bar-widget,
.elementor-widget-shortcode.lameris-locale-bar-widget .elementor-widget-container,
.elementor-widget-shortcode.lameris-locale-bar-widget .elementor-shortcode {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	height: 100%;
	margin: 0;
	padding: 0;
}

.innertopmenu .lameris-locale-bar,
.firsttopheader ~ .e-con .lameris-locale-bar,
.elementor-widget-shortcode .lameris-locale-bar {
	justify-content: flex-end;
}

/*
 * Reference design: utility links and locale live on ONE consecutive line —
 * Home  Nieuws  Agenda  Werken bij Laméris | Nederland | (globe) NL
 * Divider before the country dropdown, only when links precede it (Elementor headers).
 */
.lameris-locale-bar-widget .lameris-locale-bar::before {
	content: "";
	display: inline-block;
	width: 1px;
	height: 18px;
	background: var(--llb-line);
	flex-shrink: 0;
}

/* Top utility row (home #1160 + inner #137): everything right-aligned, one line.
 * Bottom-align the two equal-height columns: the home row uses a -60px pull-up,
 * so content position is defined by the row's bottom edge. */
.elementor-1160 .elementor-element-6c55bc9,
.elementor-137 .elementor-element-f45756c {
	--justify-content: flex-end !important;
	--align-items: flex-end !important;
	--flex-wrap: nowrap !important;
	--gap: 0px 16px !important;
	--row-gap: 0px !important;
	--column-gap: 16px !important;
}

/*
 * Columns hug their content instead of the 65% / 35% split.
 * CRITICAL: both columns get the SAME fixed height with centered content —
 * equal heights + equal bottoms = links and dropdowns on one exact line.
 */
.elementor-1160 .elementor-element-9f1d346,
.elementor-1160 .elementor-element-19963b0,
.elementor-137 .elementor-element-ae134c3,
.elementor-137 .elementor-element-9355c0e {
	--width: auto !important;
	width: auto !important;
	max-width: none !important;
	flex: 0 1 auto !important;
	min-width: 0 !important;
	--min-height: 44px !important;
	height: 44px !important;
	--justify-content: flex-end !important;
	--align-items: center !important;
	align-self: flex-end !important;
	--padding-top: 0px !important;
	--padding-bottom: 0px !important;
	--padding-left: 0px !important;
	--padding-right: 0px !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	--margin-top: 0px !important;
	--margin-bottom: 0px !important;
}

/*
 * Inner header (#137) logo uses Elementor margin-top:-72px, tuned for the
 * original 60px utility row. Forcing 44px above made the logo sit ~16px above
 * the viewport and get clipped (home #1160 is fine — different geometry).
 */
@media (min-width: 1025px) {
	.elementor-137 .elementor-element-ae134c3,
	.elementor-137 .elementor-element-9355c0e {
		--min-height: 60px !important;
		height: 60px !important;
	}

	/* Extra clearance so the blob tip isn’t flush with the viewport (home ~25px). */
	.elementor-137 .elementor-element-b1288a0 > .elementor-widget-container {
		margin-top: -60px !important;
	}
}

/*
 * Home header row is pulled up -60px (legacy design), so its box is invisible.
 * Content is only visible because the columns push DOWN into the logo band.
 * Both columns get the same 58px push — same line, same visible position.
 */
@media (min-width: 1025px) {
	.elementor-1160 .elementor-element-9f1d346,
	.elementor-1160 .elementor-element-19963b0 {
		margin-top: 58px !important;
		--margin-top: 58px !important;
		align-self: flex-start !important;
	}
}

/* Both widgets vertically centered inside their 44px columns */
.elementor-1160 .elementor-element-dfaee05.elementor-element,
.elementor-137 .elementor-element-a91ed1e.elementor-element {
	--align-self: center !important;
	align-self: center !important;
}

.elementor-1160 .elementor-element-dfaee05 > .elementor-widget-container,
.elementor-137 .elementor-element-a91ed1e > .elementor-widget-container {
	margin: 0 !important;
}

/* Utility links — 13px muted, teal hover (reference style), all viewports */
.elementor-1160 .elementor-element-dfaee05 a.hfe-menu-item,
.elementor-1160 .elementor-element-dfaee05 a.hfe-sub-menu-item,
.elementor-137 .elementor-element-a91ed1e a.hfe-menu-item,
.elementor-137 .elementor-element-a91ed1e a.hfe-sub-menu-item {
	font-size: 13px !important;
	font-weight: 500 !important;
	color: #4a6a75 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	line-height: 44px !important;
	display: inline-block;
}

@media (min-width: 1025px) {
	.elementor-137 .elementor-element-a91ed1e a.hfe-menu-item,
	.elementor-137 .elementor-element-a91ed1e a.hfe-sub-menu-item {
		line-height: 60px !important;
	}
}

/* Equal gap around the "|": last link has no trailing pad;
 * the 16px column-gap IS the space before the divider;
 * ::before is flush at the bar start, then 16px bar gap to the toggle. */
.elementor-1160 .elementor-element-dfaee05 .hfe-nav-menu > li.menu-item:not(:last-child),
.elementor-137 .elementor-element-a91ed1e .hfe-nav-menu > li.menu-item:not(:last-child) {
	margin-right: 22px !important;
}

.elementor-1160 .elementor-element-dfaee05 .hfe-nav-menu > li.menu-item:last-child a.hfe-menu-item,
.elementor-137 .elementor-element-a91ed1e .hfe-nav-menu > li.menu-item:last-child a.hfe-menu-item {
	padding-right: 0 !important;
}

.elementor-1160 .elementor-element-dfaee05 a.hfe-menu-item:hover,
.elementor-137 .elementor-element-a91ed1e a.hfe-menu-item:hover {
	color: #00a4b4 !important;
}

/* Kill HFE menu-item bottom margins that skew the baseline */
body:not(.rtl) .elementor-1160 .elementor-element-dfaee05 .hfe-nav-menu__layout-horizontal .hfe-nav-menu > li.menu-item,
body:not(.rtl) .elementor-137 .elementor-element-a91ed1e .hfe-nav-menu__layout-horizontal .hfe-nav-menu > li.menu-item {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

/* Pack links right with NO distributed space — link padding (11px) is the gap,
 * so the last link sits exactly 16px (4px pad + 12px column gap) before the "|". */
.elementor-1160 .elementor-element-dfaee05 .hfe-nav-menu,
.elementor-137 .elementor-element-a91ed1e .hfe-nav-menu {
	display: flex !important;
	align-items: center !important;
	justify-content: flex-end !important;
	gap: 0 !important;
	column-gap: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Inner pages Header: keep locale vertically centered with top menu */
.innertopmenu > .e-con-inner {
	align-items: center;
}

.innertopmenu .e-con:has(.lameris-locale-bar-widget) {
	display: flex;
	align-items: center;
	min-height: 0;
}

/* ------------------------------------------------------------------ */
/* Tablet                                                              */
/* ------------------------------------------------------------------ */
@media (max-width: 1024px) {
	.lameris-locale-bar {
		gap: 8px;
		justify-content: flex-end;
		flex-wrap: nowrap;
	}

	/* Elementor headers only — compact theme topbar stays slim */
	.ehf-header .lameris-locale-bar__toggle {
		padding: 8px 5px;
		min-height: 40px;
	}

	.header-mobile .lameris-locale-bar__toggle {
		padding: 0;
		min-height: 0;
		height: 32px;
	}
}

/* ------------------------------------------------------------------ */
/* Mobile — lives in the fixed theme header strip                     */
/* ------------------------------------------------------------------ */
@media (max-width: 767px) {
	.lameris-locale-bar {
		gap: 6px;
		font-size: 12px;
	}

	.lameris-locale-bar__divider {
		height: 16px;
	}

	.ehf-header .lameris-locale-bar__toggle {
		padding: 8px 4px;
		gap: 5px;
		min-height: 44px;
	}

	.header-mobile .lameris-locale-bar__toggle {
		padding: 0;
		min-height: 0;
		height: 32px;
		gap: 5px;
	}

	.lameris-locale-bar__country-name {
		max-width: 82px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	/* Language shows compact tag (NL/FR) — no truncation needed */
	.lameris-locale-bar__lang-name {
		max-width: none;
	}

	/* Keep dropdown panels on screen from the right edge */
	.lameris-locale-bar__menu {
		right: -4px;
		min-width: 170px;
		max-width: calc(100vw - 24px);
	}
}
