/* =========================================================================
 * Noronha Total – Seletor de idiomas (alinhado ao tema Tourm)
 * Cores do tema: --theme-color #1CA8CB / --title-color #113D48 / fonte Inter
 * ========================================================================= */
:root {
	--nt-lang-accent: var(--theme-color, #1CA8CB);
	--nt-lang-ink: var(--title-color, #113D48);
	--nt-lang-bg: rgba(255, 255, 255, .92);
	--nt-lang-border: rgba(17, 61, 72, .12);
	--nt-lang-flag: 22px;
}

/* Item do menu (reseta estilos herdados do .main-menu do Tourm) */
.nt-lang-item {
	display: inline-flex !important;
	align-items: center;
	margin-left: 14px !important;
	padding: 0 !important;
}
.nt-lang-item::before,
.nt-lang-item::after { display: none !important; }

.nt-lang {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 3px;
	border-radius: 999px;
	background: var(--nt-lang-bg);
	border: 1px solid var(--nt-lang-border);
	line-height: 1;
}

.nt-lang .nt-lang__link,
.main-menu .nt-lang .nt-lang__link,
.th-mobile-menu .nt-lang .nt-lang__link {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	padding: 4px 9px 4px 4px !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 999px;
	font: 600 12px/1 Inter, system-ui, sans-serif !important;
	letter-spacing: .04em;
	color: var(--nt-lang-ink) !important;
	text-decoration: none !important;
	text-transform: uppercase;
	background: transparent;
	opacity: .6;
	filter: grayscale(.35);
	transition: opacity .2s ease, filter .2s ease, background-color .2s ease, box-shadow .2s ease;
}
/* remove sublinhados/ícones decorativos que o tema injeta nos links do menu */
.nt-lang .nt-lang__link::before,
.nt-lang .nt-lang__link::after { display: none !important; content: none !important; }

.nt-lang .nt-lang__link:hover {
	opacity: 1;
	filter: none;
	background: #fff;
}

/* Idioma ativo */
.nt-lang .nt-lang__link.is-active {
	opacity: 1;
	filter: none;
	background: #fff;
	box-shadow: 0 1px 4px rgba(17, 61, 72, .12);
	pointer-events: none;
}
.nt-lang .nt-lang__link.is-active .nt-flag {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--nt-lang-accent);
}

/* Idioma sem tradução para esta página (leva à home do idioma) */
.nt-lang .nt-lang__link.is-untranslated { opacity: .4; }

.nt-lang .nt-lang__link:focus-visible {
	outline: 2px solid var(--nt-lang-accent);
	outline-offset: 2px;
	opacity: 1;
}

.nt-flag {
	flex: 0 0 var(--nt-lang-flag);
	width: var(--nt-lang-flag);
	height: var(--nt-lang-flag);
	border-radius: 50%;
	overflow: hidden;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
	transition: box-shadow .2s ease;
}
.nt-flag svg { display: block; width: 100%; height: 100%; }

.nt-lang__name { display: none; }

/* Pílula sempre clara: legível tanto no header transparente (sobre o banner) quanto no header fixo branco */
.nt-lang { box-shadow: 0 2px 10px rgba(0, 0, 0, .12); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.nt-lang .nt-lang__link.is-active { background: var(--nt-lang-accent); color: #fff !important; box-shadow: none; }
.nt-lang .nt-lang__link.is-active .nt-flag { box-shadow: 0 0 0 2px #fff; }
.nt-lang .nt-lang__link:hover { background: rgba(28, 168, 203, .12); }

/* ---------- Mobile / menu lateral do Tourm ---------- */
.th-mobile-menu .nt-lang-item {
	display: block !important;
	margin: 18px 0 0 !important;
	padding-top: 18px !important;
	border-top: 1px solid var(--nt-lang-border);
}
.th-mobile-menu .nt-lang {
	display: flex;
	width: 100%;
	justify-content: space-between;
	padding: 4px;
}
.th-mobile-menu .nt-lang .nt-lang__link {
	flex: 1;
	justify-content: center;
	padding: 8px 6px !important;
	font-size: 13px !important;
	text-transform: none;
	letter-spacing: 0;
}
.th-mobile-menu .nt-lang__code { display: none; }
.th-mobile-menu .nt-lang__name { display: inline; }

@media (max-width: 1199px) {
	/* em telas médias, só bandeiras no header para não quebrar o menu */
	.main-menu .nt-lang__code { display: none; }
	.main-menu .nt-lang .nt-lang__link { padding: 4px !important; }
}

@media (prefers-reduced-motion: reduce) {
	.nt-lang .nt-lang__link,
	.nt-flag { transition: none; }
}
