/* =====================================================================
   10.8 — Bilingual language UX
   Menu dropdown switcher + first-visit language modal (text-only).
   Brand olive-green (#6C8066). RTL-aware. Cache-safe (state via JS+cookie).
   ===================================================================== */

/* ---------- Menu dropdown switcher ---------- */
.calma108-lang-switch {
	position: relative;
	list-style: none;
}
.calma108-lang-switch > .cl108-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	background: none;
	border: 0;
	font: inherit;
	color: inherit;
	padding: 8px 2px;
	line-height: 1;
}
.calma108-lang-switch > .cl108-toggle .cl108-caret {
	font-size: 9px;
	transition: transform .2s ease;
	opacity: .7;
}
.calma108-lang-switch.is-open > .cl108-toggle .cl108-caret {
	transform: rotate(180deg);
}
.calma108-lang-switch .cl108-panel {
	position: absolute;
	top: 100%;
	inset-inline-end: 0;
	min-width: 160px;
	margin: 10px 0 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 10px;
	box-shadow: 0 12px 34px rgba(0, 0, 0, .12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
	z-index: 1200;
}
.calma108-lang-switch.is-open .cl108-panel {
	opacity: 1;
	visibility: visible;
	transform: none;
}
.calma108-lang-switch .cl108-panel li {
	list-style: none;
	margin: 0;
	padding: 0;
}
.calma108-lang-switch .cl108-panel a {
	display: block;
	padding: 9px 14px;
	border-radius: 7px;
	text-decoration: none;
	color: #333;
	font-size: 14px;
	white-space: nowrap;
	transition: background .15s ease, color .15s ease;
}
.calma108-lang-switch .cl108-panel a:hover {
	background: #f3f6f3;
	color: #6C8066;
}
.calma108-lang-switch .cl108-panel a.is-active {
	color: #6C8066;
	font-weight: 600;
}
.calma108-lang-switch .cl108-panel a.is-active::after {
	content: "\2713"; /* check */
	margin-inline-start: 8px;
	font-size: 11px;
}

/* RTL: open the panel from the start edge cleanly (logical props already mirror,
   this is a safety net for menus that don't inherit dir) */
.rtl .calma108-lang-switch .cl108-panel {
	inset-inline-end: 0;
	text-align: right;
}

/* Mobile off-canvas menu: render the panel inline (expanded) so it isn't clipped */
@media (max-width: 1024px) {
	.bwp-canvas-menu .calma108-lang-switch .cl108-panel,
	.mobile-menu .calma108-lang-switch .cl108-panel,
	.canvas-menu .calma108-lang-switch .cl108-panel {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 0;
		min-width: 0;
		margin: 4px 0 0;
		padding-inline-start: 14px;
	}
}

/* ---------- First-visit language modal ---------- */
.calma108-langmodal {
	position: fixed;
	inset: 0;
	z-index: 1000001; /* above newsletter popup (1000000) */
	display: none;
}
.calma108-langmodal.is-open {
	display: block;
}
.calma108-langmodal .cl108-overlay {
	position: absolute;
	inset: 0;
	background: rgba(32, 32, 32, .62);
}
.calma108-langmodal .cl108-card {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: calc(100% - 40px);
	max-width: 430px;
	background: #fff;
	border-radius: 16px;
	padding: 38px 30px 32px;
	text-align: center;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
	z-index: 1;
}
.calma108-langmodal .cl108-title {
	margin: 0 0 6px;
	font-size: 22px;
	line-height: 1.3;
	color: #222;
}
.calma108-langmodal .cl108-sub {
	margin: 0 0 24px;
	font-size: 14px;
	color: #7a7a7a;
}
.calma108-langmodal .cl108-options {
	display: grid;
	gap: 12px;
}
.calma108-langmodal .cl108-opt {
	display: block;
	padding: 15px 18px;
	border: 1px solid #e3e3e3;
	border-radius: 12px;
	text-decoration: none;
	color: #2b2b2b;
	font-size: 16px;
	font-weight: 600;
	transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.calma108-langmodal .cl108-opt:hover {
	background: #6C8066;
	border-color: #6C8066;
	color: #fff;
}
.calma108-langmodal .cl108-opt.is-active {
	border-color: #6C8066;
}
.calma108-langmodal .cl108-close {
	position: absolute;
	top: 12px;
	inset-inline-end: 14px;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: none;
	color: #aaa;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	transition: color .2s ease;
}
.calma108-langmodal .cl108-close:hover {
	color: #333;
}

/* Body lock + suppress the newsletter popup while the language modal is open */
body.cl108-lang-open {
	overflow: hidden;
}
body.cl108-lang-open .newsletterpopup,
body.cl108-lang-open .popupshadow {
	display: none !important;
}

@media (max-width: 480px) {
	.calma108-langmodal .cl108-card {
		padding: 32px 22px 26px;
	}
	.calma108-langmodal .cl108-title {
		font-size: 20px;
	}
}
