:root {
	--gp-language-red: #e31b23;
	--gp-language-panel: #15181d;
	--gp-language-card: #20242b;
	--gp-language-border: #343942;
	--gp-language-muted: #9ea5af;
}

.gp-language-switcher {
	position: relative;
	display: flex;
	align-items: center;
	margin-left: 8px;
	font-family: Inter, sans-serif;
}

.member-links .gp-language-switcher,
.member-links .gp-language-switcher:hover {
	background: none;
	border: 0;
	border-radius: 0;
	padding: 0;
	line-height: normal;
}

.member-links .gp-language-switcher::after {
	display: none;
}

.gp-language-trigger {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 32px;
	max-width: 150px;
	padding: 6px 10px;
	border: 1px solid #353a43;
	border-radius: 7px;
	background: #181b20;
	color: #f5f6f8;
	font: 700 11px/1 Inter, sans-serif;
	letter-spacing: .03em;
	cursor: pointer;
}

.gp-language-trigger:hover,
.gp-language-trigger:focus-visible,
.gp-language-switcher.is-open .gp-language-trigger {
	border-color: #656d79;
	background: #242830;
	outline: none;
}

.gp-language-trigger img,
.gp-language-option img {
	display: block;
	flex: 0 0 auto;
	object-fit: cover;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, .16);
}

.gp-language-trigger span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.gp-language-trigger svg {
	width: 10px;
	height: 7px;
	margin-left: 1px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
	transition: transform .18s ease;
}

.gp-language-switcher.is-open .gp-language-trigger svg {
	transform: rotate(180deg);
}

.gp-language-panel {
	position: absolute;
	z-index: 10020;
	top: calc(100% + 9px);
	right: 0;
	width: min(510px, calc(100vw - 28px));
	padding: 16px;
	border: 1px solid var(--gp-language-border);
	border-radius: 12px;
	background: var(--gp-language-panel);
	box-shadow: 0 20px 56px rgba(0, 0, 0, .55);
	color: #fff;
}

.gp-language-panel[hidden],
.gp-language-backdrop[hidden],
.gp-language-no-results[hidden],
.gp-language-option[hidden] {
	display: none !important;
}

.gp-language-panel::before {
	position: absolute;
	top: -6px;
	right: 25px;
	width: 10px;
	height: 10px;
	border-top: 1px solid var(--gp-language-border);
	border-left: 1px solid var(--gp-language-border);
	background: var(--gp-language-panel);
	content: "";
	transform: rotate(45deg);
}

.gp-language-panel-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 13px;
}

.gp-language-panel-header strong {
	display: block;
	margin-bottom: 4px;
	font: 700 17px/1.2 Inter, sans-serif;
}

.gp-language-panel-header small {
	display: block;
	color: var(--gp-language-muted);
	font: 400 11px/1.4 Inter, sans-serif;
}

.gp-language-close {
	display: inline-grid;
	place-items: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #272c34;
	color: #cbd0d7;
	cursor: pointer;
}

.gp-language-close:hover,
.gp-language-close:focus-visible {
	background: #373d47;
	color: #fff;
	outline: none;
}

.gp-language-close svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-width: 1.8;
}

.gp-language-search {
	display: flex;
	align-items: center;
	gap: 9px;
	height: 38px;
	margin-bottom: 11px;
	padding: 0 12px;
	border: 1px solid #383e48;
	border-radius: 7px;
	background: #0f1115;
}

.gp-language-search:focus-within {
	border-color: #727b88;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, .06);
}

.gp-language-search svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: #8f97a3;
	stroke-linecap: round;
	stroke-width: 1.6;
}

.gp-language-search input {
	width: 100%;
	min-width: 0;
	border: 0;
	background: transparent;
	color: #fff;
	font: 500 12px/1 Inter, sans-serif;
	outline: 0;
}

.gp-language-search input::placeholder {
	color: #7f8792;
}

.member-links .gp-language-option,
.member-links .gp-language-option:hover {
	display: flex;
	align-items: center;
	gap: 10px;
	box-sizing: border-box;
	min-width: 0;
	padding: 10px 11px;
	border: 1px solid transparent;
	border-radius: 7px;
	background: var(--gp-language-card);
	color: #fff;
	line-height: normal;
	text-decoration: none;
	transition: border-color .14s ease, background-color .14s ease, transform .14s ease;
}

.member-links .gp-language-option:hover,
.member-links .gp-language-option:focus-visible {
	border-color: #515965;
	background: #292e37;
	outline: none;
	transform: translateY(-1px);
}

.member-links .gp-language-option.is-current {
	border-color: rgba(227, 27, 35, .8);
	background: linear-gradient(135deg, rgba(227, 27, 35, .15), #242830 62%);
}

.gp-language-option > span {
	display: block;
	min-width: 0;
	flex: 1 1 auto;
}

.gp-language-option b,
.gp-language-option em {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.gp-language-option b {
	font: 700 12px/1.25 Inter, sans-serif;
}

.gp-language-option em {
	margin-top: 3px;
	color: var(--gp-language-muted);
	font: normal 400 10px/1.2 Inter, sans-serif;
}

.gp-language-option > small {
	color: #8f97a3;
	font: 700 9px/1 Inter, sans-serif;
	letter-spacing: .08em;
}

.gp-language-option > i {
	display: grid;
	place-items: center;
	width: 17px;
	height: 17px;
	border-radius: 50%;
	background: var(--gp-language-red);
	color: #fff;
	font: normal 700 10px/1 Inter, sans-serif;
}

.member-links .gp-language-featured {
	margin-bottom: 8px;
	background: linear-gradient(120deg, #292e36, #20242b);
}

.gp-language-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 7px;
	max-height: 286px;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-color: #505762 #171a1f;
}

.gp-language-no-results {
	margin: 12px 0 2px;
	padding: 18px;
	border: 1px dashed #3c424c;
	border-radius: 8px;
	color: var(--gp-language-muted);
	font: 500 12px/1.4 Inter, sans-serif;
	text-align: center;
}

.gp-language-backdrop {
	display: none;
}

html[dir="rtl"] .gp-language-panel {
	right: auto;
	left: 0;
}

html[dir="rtl"] .gp-language-panel::before {
	right: auto;
	left: 25px;
}

@media (max-width: 760px) {
	.gp-language-switcher {
		position: static;
		margin-left: 2px;
	}

	.gp-language-trigger {
		max-width: 43px;
		min-width: 39px;
		justify-content: center;
		padding: 6px 8px;
	}

	.gp-language-trigger span,
	.gp-language-trigger svg {
		display: none;
	}

	.gp-language-backdrop {
		position: fixed;
		z-index: 10018;
		inset: 0;
		display: block;
		width: 100%;
		height: 100%;
		padding: 0;
		border: 0;
		background: rgba(0, 0, 0, .66);
	}

	.gp-language-panel {
		position: fixed;
		z-index: 10020;
		top: auto;
		right: 0;
		bottom: 0;
		left: 0;
		width: auto;
		max-height: min(78vh, 620px);
		padding: 17px 14px max(17px, env(safe-area-inset-bottom));
		border-right: 0;
		border-bottom: 0;
		border-left: 0;
		border-radius: 16px 16px 0 0;
		box-shadow: 0 -20px 60px rgba(0, 0, 0, .65);
	}

	.gp-language-panel::before {
		display: none;
	}

	.gp-language-grid {
		grid-template-columns: 1fr;
		max-height: calc(min(78vh, 620px) - 190px);
	}

	body.gp-language-open {
		overflow: hidden;
	}
}

@media (max-width: 390px) {
	.gp-language-panel-header small {
		max-width: 250px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gp-language-trigger svg,
	.member-links .gp-language-option {
		transition: none;
	}
}
