.ator-switcher {
	position: relative;
	display: inline-block;
	font-size: 14px;
	font-family: inherit;
	z-index: 9999;
}

.ator-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	background: #fff;
	border: 1px solid #d5d8dc;
	border-radius: 6px;
	padding: 6px 10px;
	cursor: pointer;
	color: #1f2937 !important;
}

.ator-toggle:hover {
	background: #1e3a8a !important;
	border-color: #1e3a8a !important;
	color: #fff !important;
}

.ator-caret {
	font-size: 10px;
	opacity: .6;
}

.ator-menu {
	display: none;
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	min-width: 180px;
	max-height: 320px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #d5d8dc;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0,0,0,.12);
	margin: 0;
	padding: 6px;
	list-style: none;
}

.ator-switcher.ator-open .ator-menu {
	display: block;
}

.ator-item a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px;
	border-radius: 6px;
	text-decoration: none !important;
	color: #1f2937 !important;
}

.ator-item a:hover,
.ator-item a:hover span {
	background: #1e3a8a !important;
	color: #fff !important;
}

.ator-item.ator-active a {
	font-weight: 600;
	background: #eef2ff;
}

.ator-flag {
	font-size: 16px;
	line-height: 1;
	display: inline-block;
}

/* Real flag icon images (flag-icons library) - fixed small size so they
   line up neatly wherever they appear, regardless of the library's default
   aspect ratio handling. */
span.ator-flag.fi {
	width: 20px;
	height: 15px;
	border-radius: 2px;
	background-size: cover;
	background-position: center;
	box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}

/* Floating corner widget - 4 selectable positions (exact offsets are set
   via inline style from the admin's X/Y fields; these are just fallbacks). */
.ator-floating {
	position: fixed;
	z-index: 2147483647;
	pointer-events: auto;
}

.ator-floating.ator-pos-bottom-right {
	bottom: 16px;
	right: 16px;
}
.ator-floating.ator-pos-bottom-left {
	bottom: 16px;
	left: 16px;
}
.ator-floating.ator-pos-top-right {
	top: 16px;
	right: 16px;
}
.ator-floating.ator-pos-top-left {
	top: 16px;
	left: 16px;
}

/* Flip the dropdown menu to open toward whichever side has room,
   based on the floating widget's position. */
.ator-pos-bottom-right .ator-menu,
.ator-pos-bottom-left .ator-menu {
	bottom: calc(100% + 4px);
	top: auto;
}
.ator-pos-top-right .ator-menu,
.ator-pos-top-left .ator-menu {
	top: calc(100% + 4px);
	bottom: auto;
}
.ator-pos-bottom-right .ator-menu,
.ator-pos-top-right .ator-menu {
	right: 0;
	left: auto;
}
.ator-pos-bottom-left .ator-menu,
.ator-pos-top-left .ator-menu {
	left: 0;
	right: auto;
}

/* "list" style: every language shown as a full text link, always visible */
.ator-style-list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	background: #fff;
	border: 1px solid #d5d8dc;
	border-radius: 8px;
	padding: 6px;
	box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

.ator-list-item {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border-radius: 6px;
	text-decoration: none !important;
	color: #1f2937 !important;
	white-space: nowrap;
}

.ator-list-item:hover,
.ator-list-item:hover span {
	background: #1e3a8a !important;
	color: #fff !important;
}

.ator-list-item.ator-active {
	font-weight: 600;
	background: #eef2ff;
}

/* "flags" style: every flag shown as a compact icon button, always visible */
.ator-style-flags {
	display: flex;
	gap: 4px;
	background: #fff;
	border: 1px solid #d5d8dc;
	border-radius: 999px;
	padding: 4px;
	box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

.ator-flag-item {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	text-decoration: none;
	font-size: 18px;
	line-height: 1;
}

.ator-flag-item:hover {
	background: #1e3a8a !important;
}

.ator-flag-item.ator-active {
	background: #eef2ff;
	box-shadow: inset 0 0 0 2px #6366f1;
}

/* Two-language direct toggle (dropdown style with only 2 languages) */
.ator-toggle-link {
	display: flex;
	align-items: center;
	gap: 6px;
	background: #fff;
	border: 1px solid #d5d8dc;
	border-radius: 6px;
	padding: 6px 10px;
	text-decoration: none !important;
	color: #1f2937 !important;
}

.ator-toggle-link:hover,
.ator-toggle-link:hover span {
	background: #1e3a8a !important;
	border-color: #1e3a8a !important;
	color: #fff !important;
}
