/* Marco GTranslate Switcher — deliberately scoped to avoid theme conflicts. */
.mgts-switcher,
.mgts-panel {
	--mgts-accent: #0061ff;
	--mgts-panel: #061f31;
	--mgts-trigger: #fff;
	--mgts-text: #fff;
	--mgts-muted: #9fb5c6;
	--mgts-highlight: #62a8ff;
	box-sizing: border-box;
	font-family: Arial, Helvetica, sans-serif;
}

.mgts-switcher *,
.mgts-panel * {
	box-sizing: border-box;
	font-family: Arial, Helvetica, sans-serif !important;
}

.mgts-switcher {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	z-index: 99990;
	line-height: 1;
}

/* Auto mode is emitted in the footer, then moved beside the site's native selector. */
.mgts-switcher--auto:not(.is-mounted) {
	position: fixed !important;
	left: -10000px !important;
	top: -10000px !important;
	visibility: hidden !important;
}

.mgts-native-hidden {
	display: none !important;
}

.mgts-switcher--auto.is-mounted {
	flex: 0 0 auto;
	visibility: visible;
}

.mgts-trigger {
	min-width: 164px;
	height: 64px;
	margin: 0;
	padding: 0 20px;
	border: 2px solid var(--mgts-accent);
	border-radius: 14px;
	background: var(--mgts-trigger);
	color: var(--mgts-accent);
	box-shadow: 0 7px 22px rgba(0, 39, 102, .08);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 13px;
	font-family: inherit;
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}

.mgts-trigger:hover,
.mgts-trigger:focus-visible,
.mgts-trigger[aria-expanded="true"] {
	border-color: var(--mgts-accent);
	color: var(--mgts-accent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--mgts-accent) 12%, transparent), 0 12px 30px rgba(0, 39, 102, .12);
	outline: none;
}

.mgts-trigger:active {
	transform: translateY(1px);
}

.mgts-current-flag {
	width: 40px;
	height: 28px;
	margin: 0;
	padding: 0;
	display: block;
	object-fit: cover;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}

.mgts-current-code {
	display: inline-block;
	color: inherit;
}

.mgts-caret {
	width: 18px;
	height: 18px;
	margin: 0;
	padding: 0;
	display: block;
	transition: transform .18s ease;
}

.mgts-trigger[aria-expanded="true"] .mgts-caret {
	transform: rotate(180deg);
}

.mgts-panel {
	position: fixed;
	left: 12px;
	top: 90px;
	width: min(520px, calc(100vw - 24px));
	max-height: min(600px, calc(100vh - 110px));
	margin: 0;
	padding: 18px;
	border: 1px solid color-mix(in srgb, var(--mgts-accent) 42%, transparent);
	border-radius: 17px;
	background: var(--mgts-panel);
	color: var(--mgts-text);
	box-shadow: 0 24px 68px rgba(0, 23, 36, .38);
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	z-index: 2147483000;
	text-align: left;
	white-space: normal;
	scrollbar-color: rgba(255, 255, 255, .52) transparent;
	scrollbar-width: thin;
}

.mgts-panel[hidden] {
	display: none !important;
}

.mgts-option[hidden],
.mgts-group[hidden] {
	display: none !important;
}

.mgts-panel::-webkit-scrollbar {
	width: 9px;
}

.mgts-panel::-webkit-scrollbar-track {
	background: transparent;
}

.mgts-panel::-webkit-scrollbar-thumb {
	border: 2px solid var(--mgts-panel);
	border-radius: 999px;
	background: rgba(255, 255, 255, .5);
}

.mgts-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 2px 4px 15px;
	border-bottom: 1px solid rgba(255, 255, 255, .11);
}

.mgts-panel__head strong {
	margin: 0;
	padding: 0;
	color: var(--mgts-text);
	font-family: inherit;
	font-size: 22px;
	font-weight: 750;
	line-height: 1.2;
	letter-spacing: .01em;
}

.mgts-panel__head small {
	margin: 0;
	padding: 0;
	color: var(--mgts-highlight);
	font-family: inherit;
	font-size: 10px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: .13em;
	text-transform: uppercase;
	white-space: nowrap;
}

.mgts-group {
	margin: 0;
	padding: 16px 0 0;
	border: 0;
}

.mgts-group__title {
	margin: 0;
	padding: 0 6px 9px;
	border: 0;
	background: none;
	color: var(--mgts-highlight);
	font-family: inherit;
	font-size: 11px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.mgts-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
	margin: 0;
	padding: 0;
}

.mgts-option {
	width: 100%;
	min-width: 0;
	min-height: 50px;
	margin: 0;
	padding: 10px 10px;
	border: 1px solid transparent;
	border-radius: 7px;
	background: transparent;
	color: var(--mgts-text);
	display: grid;
	grid-template-columns: 32px minmax(0, 1fr) 28px;
	align-items: center;
	gap: 10px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 650;
	line-height: 1.2;
	text-align: left;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.mgts-option:hover,
.mgts-option:focus-visible {
	border-color: color-mix(in srgb, var(--mgts-highlight) 34%, transparent);
	background: rgba(255, 255, 255, .075);
	color: var(--mgts-text);
	outline: none;
}

.mgts-option:focus-visible {
	box-shadow: inset 0 0 0 1px var(--mgts-highlight);
}

.mgts-option:active {
	transform: scale(.985);
}

.mgts-option.is-active {
	border-color: color-mix(in srgb, var(--mgts-accent) 84%, white 16%);
	background: color-mix(in srgb, var(--mgts-accent) 24%, transparent);
	color: var(--mgts-text);
}

.mgts-option img {
	width: 32px;
	height: 22px;
	margin: 0;
	padding: 0;
	display: block;
	object-fit: cover;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, .18);
}

.mgts-option span {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mgts-option b {
	justify-self: end;
	color: var(--mgts-muted);
	font-family: inherit;
	font-size: 10px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: .08em;
}

.mgts-option.is-active b {
	color: var(--mgts-highlight);
}

/* The real GTranslate shortcode remains loaded for its engine and URL logic. */
.mgts-provider {
	position: fixed !important;
	left: -10000px !important;
	top: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	overflow: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
	z-index: -1 !important;
}

.mgts-provider #gt_float_wrapper,
.mgts-provider .gt_float_switcher,
.mgts-provider .switcher,
.mgts-provider .gtranslate_wrapper {
	position: static !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	box-shadow: none !important;
}

.mgts-switcher--compact .mgts-trigger,
.mgts-menu-item .mgts-trigger {
	min-width: 100px;
	height: 40px;
	padding: 0 10px;
	border-radius: 9px;
	gap: 7px;
	font-size: 14px;
}

.mgts-switcher--compact .mgts-current-flag,
.mgts-menu-item .mgts-current-flag {
	width: 24px;
	height: 17px;
}

.mgts-switcher--compact .mgts-caret,
.mgts-menu-item .mgts-caret {
	width: 12px;
	height: 12px;
}

.mgts-switcher--floating {
	position: fixed;
	z-index: 2147482000;
}

.mgts-switcher--top-right { top: 24px; right: 24px; }
.mgts-switcher--top-left { top: 24px; left: 24px; }
.mgts-switcher--bottom-right { right: 24px; bottom: 24px; }
.mgts-switcher--bottom-left { left: 24px; bottom: 24px; }

.admin-bar .mgts-switcher--top-right,
.admin-bar .mgts-switcher--top-left {
	top: 56px;
}

.mgts-menu-item {
	display: flex !important;
	align-items: center;
}

@media (max-width: 782px) {
	.admin-bar .mgts-switcher--top-right,
	.admin-bar .mgts-switcher--top-left { top: 70px; }
}

@media (max-width: 700px) {
	.mgts-trigger {
		min-width: 118px;
		height: 48px;
		padding: 0 13px;
		border-radius: 11px;
		gap: 9px;
		font-size: 16px;
	}

	.mgts-current-flag {
		width: 30px;
		height: 20px;
	}

	.mgts-caret {
		width: 15px;
		height: 15px;
	}

	.mgts-panel {
		left: 12px !important;
		right: 12px !important;
		width: auto !important;
		max-height: calc(100vh - 96px);
		padding: 14px;
		border-radius: 13px;
	}

	.mgts-panel__head strong { font-size: 18px; }
	.mgts-panel__head small { font-size: 8px; }
	.mgts-option { min-height: 48px; font-size: 14px; }
}

@media (max-width: 460px) {
	.mgts-grid { grid-template-columns: minmax(0, 1fr); }
	.mgts-panel__head { align-items: flex-start; flex-direction: column; gap: 7px; }
	.mgts-panel__head small { white-space: normal; }
	.mgts-option span { white-space: normal; }
	.mgts-switcher--top-right { top: 14px; right: 14px; }
	.mgts-switcher--top-left { top: 14px; left: 14px; }
	.mgts-switcher--bottom-right { right: 14px; bottom: 14px; }
	.mgts-switcher--bottom-left { left: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	.mgts-trigger,
	.mgts-caret,
	.mgts-option { transition: none; }
}

