/* Language switcher: real flag images (Windows has no flag emoji) and header placement. */

.hmt-switcher .hmt-flag {
	display: inline-block;
	width: 20px;
	height: 14px;
	margin-right: 8px;
	border-radius: 2px;
	background: #cbd5e1 center / cover no-repeat;
	box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
	font-size: 0;
	line-height: 0;
	vertical-align: middle;
	flex: none;
}

[dir="rtl"] .hmt-switcher .hmt-flag {
	margin-right: 0;
	margin-left: 8px;
}

/* Menu items carry hreflang; the toggle shows the page language from <html lang>. */
.hmt-item[hreflang^="en"] .hmt-flag,
html[lang^="en"] .hmt-toggle .hmt-flag {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 42'%3E%3Crect width='60' height='42' fill='%23012169'/%3E%3Cpath d='M0 0l60 42M60 0L0 42' stroke='%23fff' stroke-width='8'/%3E%3Cpath d='M0 0l60 42M60 0L0 42' stroke='%23C8102E' stroke-width='3'/%3E%3Cpath d='M30 0v42M0 21h60' stroke='%23fff' stroke-width='14'/%3E%3Cpath d='M30 0v42M0 21h60' stroke='%23C8102E' stroke-width='8'/%3E%3C/svg%3E");
}

.hmt-item[hreflang^="es"] .hmt-flag,
html[lang^="es"] .hmt-toggle .hmt-flag {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 42'%3E%3Crect width='60' height='42' fill='%23AA151B'/%3E%3Crect y='10.500' width='60' height='21' fill='%23F1BF00'/%3E%3C/svg%3E");
}

.hmt-item[hreflang^="fr"] .hmt-flag,
html[lang^="fr"] .hmt-toggle .hmt-flag {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 42'%3E%3Crect width='60' height='42' fill='%23fff'/%3E%3Crect width='20' height='42' fill='%230055A4'/%3E%3Crect x='40' width='20' height='42' fill='%23EF4135'/%3E%3C/svg%3E");
}

.hmt-item[hreflang^="de"] .hmt-flag,
html[lang^="de"] .hmt-toggle .hmt-flag {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 42'%3E%3Crect width='60' height='42' fill='%23FFCE00'/%3E%3Crect width='60' height='28' fill='%23DD0000'/%3E%3Crect width='60' height='14' fill='%23000'/%3E%3C/svg%3E");
}

.hmt-item[hreflang^="pt"] .hmt-flag,
html[lang^="pt"] .hmt-toggle .hmt-flag {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 42'%3E%3Crect width='60' height='42' fill='%23009C3B'/%3E%3Cpath d='M30 5l24 16-24 16L6 21z' fill='%23FFDF00'/%3E%3Ccircle cx='30' cy='21' r='8.500' fill='%23002776'/%3E%3C/svg%3E");
}

.hmt-item[hreflang^="ar"] .hmt-flag,
html[lang^="ar"] .hmt-toggle .hmt-flag {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 42'%3E%3Crect width='60' height='42' fill='%23006C35'/%3E%3Cpath d='M16 15h28M19 20h22' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M17 29h24l3-1.500' stroke='%23fff' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
}

.hmt-item[hreflang^="hi"] .hmt-flag,
html[lang^="hi"] .hmt-toggle .hmt-flag {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 42'%3E%3Crect width='60' height='42' fill='%23fff'/%3E%3Crect width='60' height='14' fill='%23FF9933'/%3E%3Crect y='28' width='60' height='14' fill='%23138808'/%3E%3Ccircle cx='30' cy='21' r='5' fill='none' stroke='%23000080' stroke-width='1.500'/%3E%3Ccircle cx='30' cy='21' r='1' fill='%23000080'/%3E%3C/svg%3E");
}

.hmt-item[hreflang^="id"] .hmt-flag,
html[lang^="id"] .hmt-toggle .hmt-flag {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 42'%3E%3Crect width='60' height='42' fill='%23fff'/%3E%3Crect width='60' height='21' fill='%23CE1126'/%3E%3C/svg%3E");
}

.hmt-item[hreflang^="tr"] .hmt-flag,
html[lang^="tr"] .hmt-toggle .hmt-flag {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 42'%3E%3Crect width='60' height='42' fill='%23E30A17'/%3E%3Ccircle cx='23' cy='21' r='10' fill='%23fff'/%3E%3Ccircle cx='26' cy='21' r='8' fill='%23E30A17'/%3E%3Cpath d='M38 21l-6.200 2 3.800-5.300v6.600l-3.800-5.300z' fill='%23fff'/%3E%3C/svg%3E");
}

.hmt-item[hreflang^="ru"] .hmt-flag,
html[lang^="ru"] .hmt-toggle .hmt-flag {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 42'%3E%3Crect width='60' height='42' fill='%23D52B1E'/%3E%3Crect width='60' height='28' fill='%230039A6'/%3E%3Crect width='60' height='14' fill='%23fff'/%3E%3C/svg%3E");
}

/* In the dark header: quiet toggle, menu opens from the right edge so it never leaves the screen. */
.site-header .hmt-toggle {
	padding: 7px 10px;
	border-color: rgba(255, 255, 255, 0.22);
	border-radius: 6px;
	background: transparent;
	color: #fff;
	box-shadow: none;
}

.site-header .hmt-toggle:hover,
.site-header .hmt-toggle:focus-visible {
	border-color: rgba(255, 255, 255, 0.55);
	background: transparent;
	color: #fff;
}

.site-header .hmt-menu {
	right: 0;
	left: auto;
	border-radius: 8px;
	color: #0f172a;
}

[dir="rtl"] .site-header .hmt-menu {
	right: auto;
	left: 0;
}

.site-header .hmt-menu .hmt-item {
	border-radius: 5px;
	color: #0f172a;
}

/* Mobile header: the toggle shows the flag only; the list keeps the names. */
.site-mobile-header-wrap .hmt-toggle .hmt-name {
	display: none;
}

.mobile-html .hmt-toggle .hmt-flag,
.site-mobile-header-wrap .hmt-toggle .hmt-flag {
	margin: 0;
}

.site-header .hmt-switcher a,
.site-header .hmt-switcher a:hover {
	text-decoration: none;
}
