/* Nordic Translate frontend. Override the variables in your theme. */
:root {
	--ntr-bg: #ffffff;
	--ntr-fg: #1d2327;
	--ntr-muted: #646970;
	--ntr-accent: #2271b1;
	--ntr-accent-fg: #ffffff;
	--ntr-border: #dcdcde;
	--ntr-radius: 6px;
	--ntr-gap: 0.5em;
	--ntr-font-size: 0.95rem;
	--ntr-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	--ntr-z: 99990;
}

/* Language suggestion */
.ntr-suggest {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: var(--ntr-z);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ntr-gap);
	max-width: calc(100vw - 2rem);
	padding: 0.75em 1em;
	background: var(--ntr-bg);
	color: var(--ntr-fg);
	border: 1px solid var(--ntr-border);
	border-radius: var(--ntr-radius);
	box-shadow: var(--ntr-shadow);
	font-size: var(--ntr-font-size);
	line-height: 1.4;
}
.ntr-suggest__yes {
	padding: 0.35em 0.9em;
	border-radius: var(--ntr-radius);
	background: var(--ntr-accent);
	color: var(--ntr-accent-fg);
	text-decoration: none;
}
.ntr-suggest__yes:hover,
.ntr-suggest__yes:focus {
	filter: brightness(1.1);
	color: var(--ntr-accent-fg);
}
.ntr-suggest__no {
	padding: 0.35em 0.6em;
	border: 0;
	background: transparent;
	color: var(--ntr-muted);
	font: inherit;
	cursor: pointer;
}
.ntr-suggest__no:hover,
.ntr-suggest__no:focus {
	color: var(--ntr-fg);
	text-decoration: underline;
}

/* Language switcher */
.ntr-switcher {
	--ntr-switcher-gap: 0.75em;
	display: inline-flex;
	align-items: center;
	gap: var(--ntr-switcher-gap);
	font-size: var(--ntr-font-size);
	line-height: 1.2;
}
.ntr-switcher__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ntr-switcher-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}
.ntr-switcher__item {
	margin: 0;
	padding: 0;
}
.ntr-switcher__link,
.ntr-switcher__current {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	color: inherit;
	text-decoration: none;
}
.ntr-switcher__link:hover,
.ntr-switcher__link:focus-visible {
	text-decoration: underline;
}
.ntr-switcher__link.is-current {
	font-weight: 700;
}
.ntr-switcher__flag {
	display: block;
	width: 1.25em;
	height: auto;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.ntr-switcher .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* Dropdown (details/summary: works without JavaScript) */
.ntr-switcher__dropdown {
	position: relative;
}
.ntr-switcher__current {
	cursor: pointer;
	list-style: none;
	padding: 0.25em 0;
}
.ntr-switcher__current::-webkit-details-marker {
	display: none;
}
.ntr-switcher__caret {
	width: 0.45em;
	height: 0.45em;
	margin-left: 0.1em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-25%) rotate(45deg);
	transition: transform 0.15s ease;
}
.ntr-switcher__dropdown[open] .ntr-switcher__caret {
	transform: translateY(15%) rotate(-135deg);
}
.ntr-switcher__dropdown .ntr-switcher__list {
	position: absolute;
	top: 100%;
	right: 0;
	z-index: var(--ntr-z);
	flex-direction: column;
	gap: 0;
	min-width: 100%;
	padding: 0.25em 0;
	background: var(--ntr-bg);
	color: var(--ntr-fg);
	border: 1px solid var(--ntr-border);
	border-radius: var(--ntr-radius);
	box-shadow: var(--ntr-shadow);
}
.ntr-switcher__dropdown .ntr-switcher__link {
	display: flex;
	padding: 0.45em 1em;
	white-space: nowrap;
}
.ntr-switcher__dropdown .ntr-switcher__link:hover,
.ntr-switcher__dropdown .ntr-switcher__link:focus-visible {
	background: rgba(0, 0, 0, 0.05);
	text-decoration: none;
}

/* Menu items */
.ntr-menu-item img.ntr-switcher__flag {
	display: inline-block;
	vertical-align: middle;
	margin-right: 0.35em;
}
