/* 🌍 WP Easy Translate - Modern Glassmorphism Switcher */

.wpet-modern-switcher {
	position: relative;
	display: inline-block;
	font-family: inherit;
	z-index: 9999;
}

/* Base Dropdown Button */
.wpet-switcher-trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.15);
	padding: 8px 16px;
	border-radius: 40px;
	color: inherit;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Light theme overrides (If Divi background is white) */
body:not(.et_pb_text_color_light) .wpet-switcher-trigger {
	background: rgba(0, 0, 0, 0.03);
	border: 1px solid rgba(0, 0, 0, 0.08);
}

.wpet-modern-switcher:hover .wpet-switcher-trigger {
	background: rgba(255, 255, 255, 0.15);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
	transform: translateY(-1px);
}

body:not(.et_pb_text_color_light) .wpet-modern-switcher:hover .wpet-switcher-trigger {
	background: rgba(0, 0, 0, 0.06);
}

.wpet-icon {
	display: flex;
	align-items: center;
	opacity: 0.8;
}

.wpet-lang-label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.5px;
}

.wpet-chevron {
	display: flex;
	align-items: center;
	opacity: 0.5;
	transition: transform 0.3s ease;
}

.wpet-modern-switcher:hover .wpet-chevron {
	transform: rotate(180deg);
}

/* Dropdown Menu Box */
.wpet-dropdown-menu {
	position: absolute;
	top: calc(100% + 10px);
	right: 0; /* Default aligned right */
	min-width: 160px;
	background: rgba(25, 25, 25, 0.85);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	padding: 8px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px) scale(0.95);
	transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	display: flex;
	flex-direction: column;
	gap: 4px;
}

/* WP Nav Menu Inject Fix (Aligned to left if space) */
.wpet-menu-item .wpet-dropdown-menu {
	left: 50%;
	right: auto;
	transform: translateX(-50%) translateY(10px) scale(0.95);
}

.wpet-modern-switcher:hover .wpet-dropdown-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

.wpet-menu-item:hover .wpet-dropdown-menu {
	transform: translateX(-50%) translateY(0) scale(1);
}

/* Dropdown Items */
.wpet-dropdown-item {
	display: flex;
	align-items: center;
	padding: 10px 14px;
	border-radius: 10px;
	color: #fff !important; 
	text-decoration: none !important;
	transition: all 0.2s ease;
	gap: 12px;
}

.wpet-dropdown-item:hover {
	background: rgba(255, 255, 255, 0.1);
}

.wpet-active {
	background: rgba(56, 189, 248, 0.15) !important;
	box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.3);
}

.wpet-active .wpet-dropdown-code {
	color: #38bdf8;
}

.wpet-dropdown-code {
	font-size: 11px;
	font-weight: 800;
	opacity: 0.6;
	background: rgba(255, 255, 255, 0.1);
	padding: 4px 6px;
	border-radius: 6px;
}

.wpet-dropdown-name {
	font-size: 13px;
	font-weight: 500;
}

/* WP Menu Cleanup */
li.wpet-menu-item {
	list-style: none !important;
	display: flex;
	align-items: center;
	margin-left: 15px;
}
