.dyncy-switcher {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	position: relative;
}

.dyncy-switcher select {
	appearance: auto;
	-webkit-appearance: auto;
	-moz-appearance: auto;
	font-size: 14px;
	line-height: 1.4;
	padding: 6px 10px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #fff;
	color: #111827;
	cursor: pointer;
	max-width: 220px;
}

.dyncy-switcher select:hover {
	border-color: #9ca3af;
}

.dyncy-switcher select:focus {
	outline: none;
	border-color: #4f46e5;
	box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.dyncy-switcher-error {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	z-index: 30;
	background: #fee2e2;
	color: #b91c1c;
	border: 1px solid #fecaca;
	border-radius: 6px;
	padding: 5px 9px;
	font-size: 12px;
	line-height: 1.4;
	white-space: nowrap;
}

.dyncy-switcher-bar {
	text-align: center;
	padding: 10px 15px;
	background: #f9fafb;
	border-bottom: 1px solid #e5e7eb;
}

.dyncy-switcher-floating {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 99999;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 10px 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.dyncy-menu-item {
	display: inline-flex;
	align-items: center;
	padding: 0 10px;
}

.dyncy-menu-item select {
	background: transparent;
	border: none;
	cursor: pointer;
	font-size: inherit;
}

/* Flag dropdown (used when the "Show flags" setting is enabled). Native
   select options cannot render images, so the switcher becomes a custom
   dropdown with flag images; the native select is kept hidden for the
   existing switch JS. */
.dyncy-switcher select.dyncy-hidden-select {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.dyncy-dropdown-button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #fff;
	color: #111827;
	font-size: 14px;
	cursor: pointer;
}

.dyncy-dropdown-button:hover {
	border-color: #9ca3af;
}

.dyncy-dropdown-list {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 99999;
	min-width: 200px;
	margin: 4px 0 0;
	padding: 4px 0;
	list-style: none;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	max-height: 260px;
	overflow: auto;
}

.dyncy-dropdown-list.open {
	display: block;
}

/* The floating switcher hugs the bottom edge, so its dropdown must open
   upward (top: 100% would push it off the bottom of the viewport). */
.dyncy-switcher-floating .dyncy-dropdown-list {
	top: auto;
	bottom: 100%;
	margin: 0 0 4px;
}

.dyncy-dropdown-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	font-size: 14px;
	color: #111827;
	cursor: pointer;
	white-space: nowrap;
}

.dyncy-dropdown-item:hover,
.dyncy-dropdown-item.selected {
	background: #f3f4f6;
}

.dyncy-flag {
	display: inline-block;
	vertical-align: middle;
	border-radius: 2px;
}

.dyncy-dropdown-caret {
	font-size: 10px;
	color: #6b7280;
}
