.md-country-switcher {
	position: relative;
	display: inline-block;
	font-size: 14px;
	line-height: 1.35;
	color: var(--md-cs-text, #1d2327);
}

.md-country-switcher__trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0;
	padding: 0.35rem 0.45rem;
	border: 0;
	border-radius: var(--md-cs-radius, 4px);
	background: var(--md-cs-bg, transparent);
	color: inherit;
	cursor: pointer;
	text-align: left;
}

.md-country-switcher__trigger:hover,
.md-country-switcher__trigger:focus-visible {
	color: var(--md-cs-text-hover, #000);
}

.md-country-switcher__trigger:hover .md-country-switcher__chevron,
.md-country-switcher__trigger:focus-visible .md-country-switcher__chevron {
	border-right-color: var(--md-cs-chevron-hover, #fff);
	border-bottom-color: var(--md-cs-chevron-hover, #fff);
	opacity: 1;
}

.md-country-switcher__label {
	display: block;
	font-size: 11px;
	opacity: 0.75;
}

.md-country-switcher__current {
	display: inline-flex;
	align-items: center;
	min-width: 0;
}

.md-country-switcher__name {
	display: none;
}

.md-country-switcher__chevron {
	width: 0.45rem;
	height: 0.45rem;
	margin-left: 0.1rem;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-1px);
	opacity: 0.75;
	flex-shrink: 0;
}

.md-country-switcher__panel {
	position: absolute;
	z-index: 100050;
	top: calc(100% + 4px);
	right: 0;
	left: auto;
	min-width: min(280px, 92vw);
	max-width: 92vw;
	background: var(--md-cs-dropdown-bg, #fff);
	border-radius: var(--md-cs-radius, 4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	overflow: visible;
}

.md-country-switcher__panel[hidden] {
	display: none !important;
}

.md-country-switcher__countries {
	position: relative;
	overflow: hidden;
	border-radius: var(--md-cs-radius, 4px) var(--md-cs-radius, 4px) 0 0;
}

.md-country-switcher__countries-heading,
.md-country-switcher__languages-heading {
	margin: 0;
	padding: 0.65rem 0.85rem 0.35rem;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	opacity: 1;
}

.md-country-switcher__list {
	list-style: none;
	margin: 0;
	padding: 0.15rem 0 0.35rem;
	max-height: 220px;
	overflow-y: auto;
}

.md-country-switcher__language-list {
	list-style: none;
	margin: 0;
	padding: 0.15rem 0 0.35rem;
	max-height: none;
	overflow: visible;
}

.md-country-switcher__scroll-hint {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 0.15rem 0 0.45rem;
	pointer-events: none;
	background: linear-gradient(
		to bottom,
		color-mix(in srgb, var(--md-cs-dropdown-bg, #fff) 0%, transparent),
		color-mix(in srgb, var(--md-cs-dropdown-bg, #fff) 85%, transparent)
	);
	margin-top: -1.1rem;
	position: relative;
	z-index: 1;
}

.md-country-switcher__scroll-hint.is-hidden {
	display: none;
}

.md-country-switcher__scroll-chevron {
	width: 0.55rem;
	height: 0.55rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	opacity: 0.85;
}

.md-country-switcher__option,
.md-country-switcher__language-link {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	width: 100%;
	padding: 0.55rem 0.85rem;
	border: 0;
	background: transparent;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	text-align: left;
	box-sizing: border-box;
}

.md-country-switcher__option:hover,
.md-country-switcher__option:focus-visible,
.md-country-switcher__language-link:hover,
.md-country-switcher__language-link:focus-visible,
.md-country-switcher__option.is-active,
.md-country-switcher__language-link.is-active {
	color: var(--md-cs-text-hover, #000);
	background: color-mix(in srgb, var(--md-cs-text, #1d2327) 8%, transparent);
}

.md-country-switcher__flag {
	height: var(--md-cs-flag-height, 20px);
	width: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: 2px;
	flex-shrink: 0;
	display: block;
}

.md-country-switcher__flag--code {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: calc(var(--md-cs-flag-height, 20px) * 1.5);
	height: var(--md-cs-flag-height, 20px);
	font-size: 0.55rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	background: color-mix(in srgb, var(--md-cs-text, #1d2327) 12%, transparent);
}

.md-country-switcher__option-name,
.md-country-switcher__language-name {
	font-weight: 500;
	white-space: nowrap;
}

.md-country-switcher__languages {
	border-top: 3px solid color-mix(in srgb, var(--md-cs-text, #1d2327) 28%, transparent);
}
