.aist-switcher__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 6px;
}

.aist-switcher__item {
	display: inline-block;
}

.aist-switcher a {
	display: flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	padding: 5px 12px;
	border-radius: 6px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	color: inherit;
	white-space: nowrap;
}

.aist-switcher .is-current a {
	font-weight: 600;
	background: var(--aist-accent, rgba(0, 0, 0, 0.06));
	border-color: var(--aist-accent, rgba(0, 0, 0, 0.12));
	color: #fff;
}

.aist-switcher__flag {
	font-size: 1.1em;
	line-height: 1;
}

.aist-switcher__heading {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.6;
	padding: 2px 8px 6px;
}

.aist-switcher__check {
	margin-inline-start: auto;
	font-weight: 700;
}

.aist-switcher a {
	position: relative;
}

.aist-switcher__select {
	padding: 6px 10px;
	border-radius: 6px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	max-width: 200px;
}

/* Inline (shortcode) rendering */
.aist-switcher--inline .aist-switcher__list {
	flex-wrap: wrap;
}

/* Floating auto-injected widget */
.aist-switcher--floating {
	position: fixed;
	z-index: 99999;
	background: #fff;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
	border-radius: 10px;
	padding: 8px;
}

.aist-switcher--floating .aist-switcher__list {
	flex-direction: column;
	gap: 4px;
}

.aist-switcher--pos-bottom-right {
	bottom: 20px;
	inset-inline-end: 20px;
}

.aist-switcher--pos-bottom-left {
	bottom: 20px;
	inset-inline-start: 20px;
}

.aist-switcher--pos-top-right {
	top: 20px;
	inset-inline-end: 20px;
}

.aist-switcher--pos-top-left {
	top: 20px;
	inset-inline-start: 20px;
}

/* Compact "icon" style: a round globe button that expands a panel on click */
.aist-switcher--icon.aist-switcher--floating {
	background: transparent;
	box-shadow: none;
	padding: 0;
}

.aist-switcher__icon-btn {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: none;
	background: var(--aist-accent, #2271b1);
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1px;
}

.aist-switcher__icon-flag {
	font-size: 18px;
	line-height: 1;
}

.aist-switcher__icon-code {
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.03em;
	line-height: 1;
	opacity: 0.9;
}

.aist-switcher__icon-panel {
	display: none;
	position: absolute;
	bottom: 56px;
	inset-inline-end: 0;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
	padding: 8px;
	min-width: 140px;
}

.aist-switcher--pos-top-right .aist-switcher__icon-panel,
.aist-switcher--pos-top-left .aist-switcher__icon-panel {
	bottom: auto;
	top: 56px;
}

.aist-switcher--pos-bottom-left .aist-switcher__icon-panel,
.aist-switcher--pos-top-left .aist-switcher__icon-panel {
	inset-inline-end: auto;
	inset-inline-start: 0;
}

.aist-switcher--icon.is-open .aist-switcher__icon-panel {
	display: block;
}

.aist-switcher--icon .aist-switcher__list {
	flex-direction: column;
	gap: 4px;
}

/* Inline (shortcode) icon style needs relative positioning for its panel */
.aist-switcher--inline.aist-switcher--icon {
	position: relative;
	display: inline-block;
}

.aist-switcher--inline.aist-switcher--icon .aist-switcher__icon-panel {
	bottom: auto;
	top: 56px;
	inset-inline-end: auto;
	inset-inline-start: 0;
}

/* ---------- "Pill" style: expands sideways from a compact flag/code button ---------- */
.aist-switcher--pill.aist-switcher--floating {
	background: transparent;
	box-shadow: none;
	padding: 0;
	display: flex;
	align-items: center;
}

.aist-switcher__pill-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: none;
	border-radius: 999px;
	background: var(--aist-accent, #2271b1);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
	white-space: nowrap;
	flex: none;
}

.aist-switcher__pill-code {
	font-size: 11px;
	letter-spacing: 0.03em;
}

.aist-switcher__pill-track {
	display: flex;
	align-items: center;
	gap: 6px;
	max-width: 0;
	opacity: 0;
	overflow: hidden;
	transition: max-width 0.28s ease, opacity 0.2s ease;
}

.aist-switcher--pill.is-open .aist-switcher__pill-track {
	max-width: 640px;
	opacity: 1;
	margin-inline-start: 8px;
}

.aist-switcher__pill-item {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 7px 10px;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
	text-decoration: none;
	color: inherit;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}

.aist-switcher__pill-item.is-current {
	background: var(--aist-accent, #2271b1);
	color: #fff;
}

/* Anchored to the right edge — expand the track to the left instead of
   growing off the edge of the screen. */
.aist-switcher--pos-bottom-right.aist-switcher--pill,
.aist-switcher--pos-top-right.aist-switcher--pill {
	flex-direction: row-reverse;
}

.aist-switcher--pos-bottom-right.aist-switcher--pill.is-open .aist-switcher__pill-track,
.aist-switcher--pos-top-right.aist-switcher--pill.is-open .aist-switcher__pill-track {
	margin-inline-start: 0;
	margin-inline-end: 8px;
}

/* Inline (shortcode) rendering needs relative positioning + no flex-grow oddities. */
.aist-switcher--inline.aist-switcher--pill {
	display: inline-flex;
	align-items: center;
}

/* ---------- "Edge tab" style: a vertical ribbon fixed to the screen edge ---------- */
.aist-switcher--edge-tab.aist-switcher--floating {
	background: transparent;
	box-shadow: none;
	padding: 0;
	top: 50%;
	bottom: auto;
	transform: translateY(-50%);
}

.aist-switcher__edge-toggle {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 16px 9px;
	border: none;
	border-radius: 10px 0 0 10px;
	background: var(--aist-accent, #2271b1);
	color: #fff;
	cursor: pointer;
	box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.2);
	writing-mode: vertical-rl;
	text-orientation: mixed;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.03em;
}

.aist-switcher__edge-toggle .dashicons {
	writing-mode: horizontal-tb;
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.aist-switcher__edge-panel {
	display: none;
	position: absolute;
	top: 50%;
	inset-inline-end: 100%;
	transform: translateY(-50%);
	margin-inline-end: 8px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
	padding: 8px;
	min-width: 160px;
}

.aist-switcher--edge-tab.is-open .aist-switcher__edge-panel {
	display: block;
}

.aist-switcher--edge-tab .aist-switcher__list {
	flex-direction: column;
	gap: 4px;
}

/* Left-edge positions: mirror the tab's rounded corner and flyout side. */
.aist-switcher--edge-tab.aist-switcher--pos-bottom-left .aist-switcher__edge-toggle,
.aist-switcher--edge-tab.aist-switcher--pos-top-left .aist-switcher__edge-toggle {
	border-radius: 0 10px 10px 0;
	box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
}

.aist-switcher--edge-tab.aist-switcher--pos-bottom-left .aist-switcher__edge-panel,
.aist-switcher--edge-tab.aist-switcher--pos-top-left .aist-switcher__edge-panel {
	inset-inline-end: auto;
	inset-inline-start: 100%;
	margin-inline-end: 0;
	margin-inline-start: 8px;
}

/* Browser-language suggestion banner */
.aist-browser-suggestion {
	position: fixed;
	bottom: 0;
	inset-inline-start: 0;
	inset-inline-end: 0;
	z-index: 100000;
	background: #1d2327;
	color: #fff;
	padding: 12px 16px;
	display: none;
	align-items: center;
	justify-content: center;
	gap: 14px;
	flex-wrap: wrap;
	font-size: 14px;
}

.aist-browser-suggestion__accept {
	color: #66c0ff;
	font-weight: 600;
	text-decoration: underline;
}

.aist-browser-suggestion__dismiss {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

/* ---------- "Liquid glass" style ---------- */
.aist-switcher--glass {
	font-family: inherit;
}

.aist-switcher--glass .aist-switcher__glass-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 18px;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 999px;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.12) 100%);
	-webkit-backdrop-filter: blur(16px) saturate(1.7);
	backdrop-filter: blur(16px) saturate(1.7);
	box-shadow:
		0 8px 32px rgba(0, 0, 0, 0.16),
		inset 0 1px 0 rgba(255, 255, 255, 0.55),
		inset 0 -1px 0 rgba(255, 255, 255, 0.12);
	color: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.aist-switcher--glass .aist-switcher__glass-toggle:hover {
	transform: translateY(-2px) scale(1.02);
	box-shadow:
		0 14px 40px rgba(0, 0, 0, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.65),
		inset 0 -1px 0 rgba(255, 255, 255, 0.15);
}

.aist-switcher--glass .aist-switcher__glass-flag {
	font-size: 18px;
	line-height: 1;
}

.aist-switcher--glass .aist-switcher__glass-caret {
	font-size: 11px;
	opacity: 0.65;
	transition: transform 0.25s ease;
}

.aist-switcher--glass.is-open .aist-switcher__glass-caret {
	transform: rotate(180deg);
}

.aist-switcher--glass .aist-switcher__glass-panel {
	position: absolute;
	inset-inline-end: 0;
	bottom: calc(100% + 12px);
	min-width: 210px;
	padding: 10px;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 18px;
	background: linear-gradient(160deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.22) 100%);
	-webkit-backdrop-filter: blur(22px) saturate(1.8);
	backdrop-filter: blur(22px) saturate(1.8);
	box-shadow:
		0 20px 60px rgba(0, 0, 0, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.6);
	opacity: 0;
	transform: translateY(8px) scale(0.97);
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.aist-switcher--glass.aist-switcher--pos-top-right .aist-switcher__glass-panel,
.aist-switcher--glass.aist-switcher--pos-top-left .aist-switcher__glass-panel {
	bottom: auto;
	top: calc(100% + 12px);
}

.aist-switcher--glass.aist-switcher--pos-bottom-left .aist-switcher__glass-panel,
.aist-switcher--glass.aist-switcher--pos-top-left .aist-switcher__glass-panel {
	inset-inline-end: auto;
	inset-inline-start: 0;
}

.aist-switcher--glass.is-open .aist-switcher__glass-panel {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.aist-switcher--glass .aist-switcher__heading {
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	opacity: 0.7;
	padding: 4px 10px 8px;
}

.aist-switcher--glass .aist-switcher__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.aist-switcher--glass .aist-switcher__item a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border-radius: 12px;
	text-decoration: none;
	color: inherit;
	transition: background 0.15s ease;
}

.aist-switcher--glass .aist-switcher__item a:hover {
	background: rgba(255, 255, 255, 0.45);
}

.aist-switcher--glass .aist-switcher__item.is-current a {
	background: rgba(255, 255, 255, 0.55);
	font-weight: 700;
}

/* ---------- "Orb" style ---------- */
@keyframes aist-orb-spin {
	to {
		transform: rotate(360deg);
	}
}

.aist-switcher--orb .aist-switcher__orb-toggle {
	position: relative;
	width: 56px;
	height: 56px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
}

.aist-switcher--orb .aist-switcher__orb-toggle::before {
	content: '';
	position: absolute;
	inset: -3px;
	border-radius: 50%;
	background: conic-gradient(from 0deg, var(--aist-accent, #2271b1), #8b5cf6, #06b6d4, var(--aist-accent, #2271b1));
	animation: aist-orb-spin 6s linear infinite;
}

.aist-switcher--orb .aist-switcher__orb-core {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: #fff;
	font-size: 24px;
	line-height: 1;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
	transition: transform 0.25s ease;
}

.aist-switcher--orb .aist-switcher__orb-toggle:hover .aist-switcher__orb-core {
	transform: scale(1.06);
}

.aist-switcher--orb .aist-switcher__orb-stack {
	position: absolute;
	inset-inline-end: 4px;
	bottom: calc(100% + 12px);
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: center;
	opacity: 0;
	transform: translateY(12px);
	pointer-events: none;
	transition: opacity 0.28s ease, transform 0.28s ease;
}

.aist-switcher--orb.aist-switcher--pos-top-right .aist-switcher__orb-stack,
.aist-switcher--orb.aist-switcher--pos-top-left .aist-switcher__orb-stack {
	bottom: auto;
	top: calc(100% + 12px);
	transform: translateY(-12px);
}

.aist-switcher--orb.aist-switcher--pos-bottom-left .aist-switcher__orb-stack,
.aist-switcher--orb.aist-switcher--pos-top-left .aist-switcher__orb-stack {
	inset-inline-end: auto;
	inset-inline-start: 4px;
}

.aist-switcher--orb.is-open .aist-switcher__orb-stack {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.aist-switcher--orb .aist-switcher__orb-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #fff;
	text-decoration: none;
	color: #1d2327;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.aist-switcher--orb .aist-switcher__orb-item:hover {
	transform: scale(1.1);
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26);
}

.aist-switcher--orb .aist-switcher__orb-item.is-current {
	outline: 3px solid var(--aist-accent, #2271b1);
	outline-offset: 2px;
}

.aist-switcher--orb .aist-switcher__orb-item-flag {
	font-size: 17px;
	line-height: 1.1;
}

.aist-switcher--orb .aist-switcher__orb-item-code {
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.03em;
}

/* ---------- RTL correctness ---------- */
/* The corner positions are VISUAL corners. All offsets above use logical
 * inset properties, which resolve against the element's own direction — on
 * an RTL page they used to flip (end = left), moving the widget to the
 * wrong corner and pushing its panels off-screen. Forcing an LTR resolution
 * context on the floating wrapper pins every offset to the same physical
 * corner on every page, LTR and RTL alike. */
.aist-switcher--floating {
	direction: ltr;
}

/* …while the visible language list itself still follows the page's
 * direction, so Arabic/Hebrew/Farsi language names read naturally. */
[dir="rtl"] .aist-switcher--floating .aist-switcher__list,
[dir="rtl"] .aist-switcher--floating .aist-switcher__heading {
	direction: rtl;
	text-align: right;
}

[dir="rtl"] .aist-switcher--floating .aist-switcher__select {
	direction: rtl;
}
/* HalaCham / GoFly header integration. The theme keeps ownership of layout
   and open/close behavior; these rules only normalize our replacement rows. */
.aist-theme-language-area .language-list a {
	display: flex;
	align-items: center;
	gap: 9px;
}

.aist-theme-language-area .aist-header-language-flag {
	display: inline-flex;
	width: 1.35em;
	justify-content: center;
	font-size: 1.05em;
	line-height: 1;
}

.aist-theme-language-area .language-list .is-current > a {
	color: var(--aist-accent, #526d50);
	font-weight: 700;
}

.aist-theme-language-area .language-btn:focus-visible {
	outline: 2px solid var(--aist-accent, #526d50);
	outline-offset: 4px;
}
.aist-lang-en,
.aist-lang-tr {
	direction: ltr;
}

.aist-lang-en :where(h1, h2, h3, h4, h5, h6, p, li, label),
.aist-lang-tr :where(h1, h2, h3, h4, h5, h6, p, li, label) {
	unicode-bidi: plaintext;
}
