/*
 * Prima Language Switcher
 * Inherits the theme's font. Override the variables below in your theme to restyle.
 */
.prima-ls,
.prima-ls-float,
.prima-ls-prompt {
	--prima-ls-ink: #1d2a44;
	--prima-ls-paper: #ffffff;
	--prima-ls-accent: #2b4acb;
	--prima-ls-muted: #6b7489;
	--prima-ls-line: rgba(29, 42, 68, 0.16);
	--prima-ls-radius: 999px;
}

@media (prefers-color-scheme: dark) {
	.prima-ls-float,
	.prima-ls-prompt {
		--prima-ls-ink: #eef1f8;
		--prima-ls-paper: #1b2233;
		--prima-ls-accent: #8ea4ff;
		--prima-ls-muted: #a3abbe;
		--prima-ls-line: rgba(238, 241, 248, 0.2);
	}
}

.prima-ls .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.prima-ls__flag {
	font-size: 1.1em;
	line-height: 1;
}

.prima-ls abbr {
	text-decoration: none;
	border: 0;
}

/* Links */
.prima-ls--list .prima-ls__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25em 1em;
	margin: 0;
	padding: 0;
	list-style: none;
}

.prima-ls--list .prima-ls__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.2em 0;
	color: inherit;
	text-decoration: none;
	border-bottom: 2px solid transparent;
}

.prima-ls--list .prima-ls__link:hover {
	border-bottom-color: currentColor;
}

.prima-ls--list .is-active .prima-ls__link {
	font-weight: 600;
	border-bottom-color: var(--prima-ls-accent);
}

/* Toggle: both languages in one pill, the active one filled */
.prima-ls--toggle {
	display: inline-flex;
	align-items: stretch;
	padding: 3px;
	border: 1px solid var(--prima-ls-line);
	border-radius: var(--prima-ls-radius);
	background: var(--prima-ls-paper);
	color: var(--prima-ls-muted);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1;
	text-decoration: none;
}

.prima-ls--toggle .prima-ls__option {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	padding: 0.45em 0.8em;
	border-radius: var(--prima-ls-radius);
	transition: background-color 0.18s ease, color 0.18s ease;
}

.prima-ls--toggle .prima-ls__option.is-active {
	background: var(--prima-ls-accent);
	color: #fff;
}

.prima-ls--toggle:hover .prima-ls__option:not(.is-active) {
	color: var(--prima-ls-ink);
}

/* Keep theme and Elementor Kit link colors off the toggle */
.prima-ls.prima-ls--toggle,
.prima-ls.prima-ls--toggle:hover,
.prima-ls.prima-ls--toggle:focus,
.prima-ls.prima-ls--toggle:visited {
	color: var(--prima-ls-muted);
	text-decoration: none;
	background: var(--prima-ls-paper);
}

/* Dropdown */
.prima-ls__select {
	padding: 0.4em 2em 0.4em 0.7em;
	border: 1px solid var(--prima-ls-line);
	border-radius: 8px;
	background-color: var(--prima-ls-paper);
	color: var(--prima-ls-ink);
	font: inherit;
	cursor: pointer;
}

/* Focus */
.prima-ls a:focus-visible,
.prima-ls__select:focus-visible,
a.prima-ls:focus-visible {
	outline: 2px solid var(--prima-ls-accent);
	outline-offset: 3px;
}

/* Floating */
.prima-ls-float {
	position: fixed;
	z-index: 99990;
	color: var(--prima-ls-ink);
}

.prima-ls-float--bottom-right { right: 20px; bottom: 20px; }
.prima-ls-float--bottom-left  { left: 20px;  bottom: 20px; }
.prima-ls-float--top-right    { right: 20px; top: 20px; }
.prima-ls-float--top-left     { left: 20px;  top: 20px; }

.admin-bar .prima-ls-float--top-right,
.admin-bar .prima-ls-float--top-left {
	top: 52px;
}

.prima-ls-float .prima-ls--toggle,
.prima-ls-float .prima-ls--list,
.prima-ls-float .prima-ls__select {
	box-shadow: 0 6px 20px -6px rgba(16, 24, 48, 0.35);
}

.prima-ls-float .prima-ls--list {
	padding: 0.5em 1em;
	border: 1px solid var(--prima-ls-line);
	border-radius: var(--prima-ls-radius);
	background: var(--prima-ls-paper);
}

@media (max-width: 600px) {
	.prima-ls-float--bottom-right { right: 12px; bottom: 12px; }
	.prima-ls-float--bottom-left  { left: 12px;  bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.prima-ls--toggle .prima-ls__option {
		transition: none;
	}
}

/* Menu items */
.prima-ls-menu-item .prima-ls__flag + .prima-ls__name {
	margin-left: 0.35em;
}

/* Language pop-up */
.prima-ls-prompt {
	position: fixed;
	z-index: 99991;
	box-sizing: border-box;
	width: min(340px, calc(100vw - 24px));
	padding: 16px 44px 16px 18px;
	border: 1px solid var(--prima-ls-line);
	border-radius: 14px;
	background: var(--prima-ls-paper);
	color: var(--prima-ls-ink);
	box-shadow: 0 14px 36px -12px rgba(16, 24, 48, 0.45);
	font-size: 0.9375rem;
	line-height: 1.45;
	text-align: left;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.22s ease, transform 0.22s ease;
}

.prima-ls-prompt.is-visible {
	opacity: 1;
	transform: none;
}

.prima-ls-prompt--bottom-left   { left: 20px;  bottom: 20px; }
.prima-ls-prompt--bottom-right  { right: 20px; bottom: 20px; }
.prima-ls-prompt--top-left      { left: 20px;  top: 20px; }
.prima-ls-prompt--top-right     { right: 20px; top: 20px; }
.prima-ls-prompt--bottom-center { left: 50%;   bottom: 20px; margin-left: calc(min(340px, calc(100vw - 24px)) / -2); }

.prima-ls-prompt--bottom-left.prima-ls-prompt--stacked,
.prima-ls-prompt--bottom-right.prima-ls-prompt--stacked { bottom: 76px; }
.prima-ls-prompt--top-left.prima-ls-prompt--stacked,
.prima-ls-prompt--top-right.prima-ls-prompt--stacked { top: 76px; }

.admin-bar .prima-ls-prompt--top-left,
.admin-bar .prima-ls-prompt--top-right { top: 52px; }
.admin-bar .prima-ls-prompt--top-left.prima-ls-prompt--stacked,
.admin-bar .prima-ls-prompt--top-right.prima-ls-prompt--stacked { top: 108px; }

.prima-ls-prompt .prima-ls-prompt__message {
	display: flex;
	gap: 0.6em;
	align-items: flex-start;
	margin: 0 0 12px;
	padding: 0;
	color: inherit;
	font: inherit;
}

.prima-ls-prompt .prima-ls-prompt__flag {
	font-size: 1.35em;
	line-height: 1.1;
}

.prima-ls-prompt .prima-ls-prompt__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	align-items: center;
}

/* Reset theme / Elementor Kit button and link styles, including their hover states */
.prima-ls-prompt .prima-ls-prompt__switch,
.prima-ls-prompt .prima-ls-prompt__switch:hover,
.prima-ls-prompt .prima-ls-prompt__switch:focus,
.prima-ls-prompt .prima-ls-prompt__switch:visited,
.prima-ls-prompt .prima-ls-prompt__dismiss,
.prima-ls-prompt .prima-ls-prompt__dismiss:hover,
.prima-ls-prompt .prima-ls-prompt__dismiss:focus,
.prima-ls-prompt .prima-ls-prompt__close,
.prima-ls-prompt .prima-ls-prompt__close:hover,
.prima-ls-prompt .prima-ls-prompt__close:focus {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.prima-ls-prompt .prima-ls-prompt__switch,
.prima-ls-prompt .prima-ls-prompt__switch:visited,
.prima-ls-prompt .prima-ls-prompt__switch:focus {
	padding: 0.6em 1.05em;
	border-radius: var(--prima-ls-radius);
	background: var(--prima-ls-accent);
	color: #fff;
	transition: filter 0.15s ease;
}

.prima-ls-prompt .prima-ls-prompt__switch:hover {
	padding: 0.6em 1.05em;
	border-radius: var(--prima-ls-radius);
	background: var(--prima-ls-accent);
	color: #fff;
	filter: brightness(1.1);
}

.prima-ls-prompt .prima-ls-prompt__dismiss,
.prima-ls-prompt .prima-ls-prompt__dismiss:hover,
.prima-ls-prompt .prima-ls-prompt__dismiss:focus {
	padding: 0.6em 0.2em;
	color: var(--prima-ls-muted);
}

.prima-ls-prompt .prima-ls-prompt__dismiss:hover {
	color: var(--prima-ls-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.prima-ls-prompt .prima-ls-prompt__close,
.prima-ls-prompt .prima-ls-prompt__close:hover,
.prima-ls-prompt .prima-ls-prompt__close:focus {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	color: var(--prima-ls-muted);
}

.prima-ls-prompt .prima-ls-prompt__close:hover {
	background: var(--prima-ls-line);
	color: var(--prima-ls-ink);
}

.prima-ls-prompt .prima-ls-prompt__switch:focus-visible,
.prima-ls-prompt .prima-ls-prompt__dismiss:focus-visible,
.prima-ls-prompt .prima-ls-prompt__close:focus-visible {
	outline: 2px solid var(--prima-ls-accent);
	outline-offset: 2px;
}

@media (max-width: 600px) {
	.prima-ls-prompt--bottom-left,
	.prima-ls-prompt--bottom-right,
	.prima-ls-prompt--bottom-center {
		left: 12px;
		right: 12px;
		bottom: 12px;
		width: auto;
		margin-left: 0;
	}
	.prima-ls-prompt--bottom-left.prima-ls-prompt--stacked,
	.prima-ls-prompt--bottom-right.prima-ls-prompt--stacked {
		bottom: 68px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.prima-ls-prompt,
	.prima-ls-prompt .prima-ls-prompt__switch {
		transition: none;
	}
	.prima-ls-prompt {
		transform: none;
	}
}

/* Elementor editor: outline elements limited to one language */
.elementor-editor-active [class*="prima-only-"] {
	outline: 2px dashed rgba(43, 74, 203, 0.45);
	outline-offset: -2px;
}
