.ecpt-switcher {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	position: relative;
}

/* One row: Settings → EC Path Translate → “Keep language buttons on one row”, or shortcode single_line="true" */
.ecpt-switcher--single-line {
	flex-wrap: nowrap;
	max-width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.ecpt-switcher--single-line .ecpt-switcher__link {
	flex-shrink: 0;
}

.ecpt-switcher--dropdown.ecpt-switcher--single-line {
	max-width: 100%;
}

.ecpt-switcher--dropdown.ecpt-switcher--single-line .ecpt-switcher__summary {
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
}

.ecpt-switcher__link,
.ecpt-switcher__summary-current {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	line-height: 1;
	color: inherit;
}

.ecpt-switcher__flag {
	font-size: 1.1rem;
	line-height: 1;
}

.ecpt-switcher__label {
	font-size: 0.92rem;
	color: inherit;
	line-height: 1.2;
}

.ecpt-switcher--pills .ecpt-switcher__link,
.ecpt-switcher__summary-current {
	min-width: 2.5rem;
	min-height: 2.5rem;
	padding: 0.4rem 0.65rem;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 999px;
	background: #fff;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.ecpt-switcher--pills .ecpt-switcher__link:hover,
.ecpt-switcher--pills .ecpt-switcher__link:focus-visible,
.ecpt-switcher__summary:focus-visible .ecpt-switcher__summary-current,
.ecpt-switcher[open] .ecpt-switcher__summary-current {
	transform: translateY(-1px);
	border-color: rgba(0, 0, 0, 0.3);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
	outline: none;
}

.ecpt-switcher--pills .ecpt-switcher__link.is-active,
.ecpt-switcher__summary-current.is-active {
	border-color: #1f4b99;
	box-shadow: inset 0 0 0 1px #1f4b99;
}

.ecpt-switcher--plain {
	gap: 0.4rem;
}

.ecpt-switcher--plain .ecpt-switcher__link {
	padding: 0.28rem 0.42rem;
	text-decoration: none;
	border-radius: 999px;
	transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.ecpt-switcher--plain .ecpt-switcher__flag {
	font-size: 1.35rem;
}

.ecpt-switcher--plain .ecpt-switcher__label {
	font-size: 0.88rem;
	letter-spacing: 0.01em;
}

.ecpt-switcher--plain .ecpt-switcher__link:hover,
.ecpt-switcher--plain .ecpt-switcher__link:focus-visible {
	transform: translateY(-1px);
	opacity: 1;
	background: rgba(31, 75, 153, 0.06);
	outline: none;
}

.ecpt-switcher--plain .ecpt-switcher__link:not(.is-active) {
	opacity: 0.82;
}

.ecpt-switcher--plain .ecpt-switcher__link.is-active {
	background: rgba(31, 75, 153, 0.1);
	box-shadow: inset 0 0 0 1px rgba(31, 75, 153, 0.18);
	opacity: 1;
}

.ecpt-switcher--plain .ecpt-switcher__link.is-active .ecpt-switcher__flag {
	transform: scale(1.04);
}

.ecpt-switcher--plain .ecpt-switcher__link.is-active .ecpt-switcher__label {
	color: #1f4b99;
	font-weight: 700;
}

.ecpt-switcher--dropdown {
	display: inline-block;
	min-width: 11rem;
}

.ecpt-switcher__summary {
	display: block;
	list-style: none;
	cursor: pointer;
}

.ecpt-switcher__summary::-webkit-details-marker {
	display: none;
}

.ecpt-switcher__summary-current {
	justify-content: space-between;
	width: 100%;
}

.ecpt-switcher__summary-current::after {
	content: "";
	width: 0.55rem;
	height: 0.55rem;
	margin-left: 0.45rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-1px);
	flex: 0 0 auto;
}

.ecpt-switcher[open] .ecpt-switcher__summary-current::after {
	transform: rotate(-135deg) translateY(-1px);
}

.ecpt-switcher__menu {
	position: absolute;
	top: calc(100% + 0.35rem);
	left: 0;
	z-index: 20;
	min-width: 100%;
	padding: 0.35rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 0.85rem;
	background: #fff;
	box-shadow: 0 16px 35px rgba(0, 0, 0, 0.12);
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.ecpt-switcher__menu-link {
	justify-content: flex-start;
	width: 100%;
	padding: 0.55rem 0.7rem;
	border-radius: 0.65rem;
	text-decoration: none;
}

.ecpt-switcher__menu-link:hover,
.ecpt-switcher__menu-link:focus-visible {
	background: rgba(31, 75, 153, 0.08);
	outline: none;
}

.ecpt-switcher__menu-link.is-active {
	background: rgba(31, 75, 153, 0.12);
	font-weight: 600;
}
