/* WP Translator — switcher styles */

:root {
	--wptr-bg: #ffffff;
	--wptr-text: #1f2733;
	--wptr-border: #e2e6ec;
	--wptr-hover: #f2f5f9;
	--wptr-active: #eef4ff;
}

.wptr-switcher,
.wptr-switcher * {
	box-sizing: border-box;
}

.wptr-switcher {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.2;
}

.wptr-flag {
	font-size: 1.15em;
	line-height: 1;
}

/* ---------- floating container ---------- */

.wptr-float {
	position: fixed;
	z-index: 99990;
}
.wptr-pos-bottom-right { right: 20px; bottom: 20px; }
.wptr-pos-bottom-left  { left: 20px;  bottom: 20px; }
.wptr-pos-top-right    { right: 20px; top: 20px; }
.wptr-pos-top-left     { left: 20px;  top: 20px; }

.wptr-pos-bottom-right .wptr-menu,
.wptr-pos-bottom-left  .wptr-menu {
	bottom: calc(100% + 8px);
	top: auto;
}
.wptr-pos-bottom-left  .wptr-menu,
.wptr-pos-top-left     .wptr-menu { left: 0; right: auto; }

/* ---------- dropdown ---------- */

.wptr-dropdown {
	position: relative;
	display: inline-block;
}

.wptr-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 14px;
	background: var(--wptr-bg);
	color: var(--wptr-text);
	border: 1px solid var(--wptr-border);
	border-radius: 999px;
	box-shadow: 0 6px 20px rgba(20, 30, 50, 0.12);
	cursor: pointer;
	transition: box-shadow .18s ease, transform .18s ease;
}
.wptr-toggle:hover { box-shadow: 0 8px 26px rgba(20, 30, 50, 0.18); }
.wptr-toggle:active { transform: translateY(1px); }

.wptr-cur { font-weight: 600; }
.wptr-caret { font-size: .8em; opacity: .6; transition: transform .18s ease; }
.wptr-dropdown.open .wptr-caret { transform: rotate(180deg); }

.wptr-menu {
	position: absolute;
	right: 0;
	top: calc(100% + 8px);
	min-width: 180px;
	background: var(--wptr-bg);
	border: 1px solid var(--wptr-border);
	border-radius: 12px;
	box-shadow: 0 12px 34px rgba(20, 30, 50, 0.18);
	padding: 6px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.wptr-dropdown.open .wptr-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.wptr-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 9px 12px;
	background: transparent;
	border: 0;
	border-radius: 8px;
	color: var(--wptr-text);
	font-size: 14px;
	text-align: left;
	cursor: pointer;
}
.wptr-item:hover { background: var(--wptr-hover); }
.wptr-item.is-active { background: var(--wptr-active); font-weight: 600; }
.wptr-item .wptr-name { flex: 1; }

/* ---------- flag row ---------- */

.wptr-flags {
	display: inline-flex;
	gap: 6px;
	padding: 6px;
	background: var(--wptr-bg);
	border: 1px solid var(--wptr-border);
	border-radius: 999px;
	box-shadow: 0 6px 20px rgba(20, 30, 50, 0.12);
}
.wptr-flagbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background .15s ease, transform .15s ease;
}
.wptr-flagbtn:hover { background: var(--wptr-hover); transform: translateY(-1px); }
.wptr-flagbtn.is-active { background: var(--wptr-active); box-shadow: inset 0 0 0 2px var(--wptr-border); }

/* ---------- loading spinner ---------- */

.wptr-spin {
	display: none;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(0, 0, 0, .15);
	border-top-color: #2f6bff;
	border-radius: 50%;
	animation: wptr-rotate .7s linear infinite;
}
.wptr-switcher.wptr-loading .wptr-spin { display: inline-block; }
.wptr-switcher.wptr-loading .wptr-caret { display: none; }
.wptr-switcher.wptr-loading .wptr-flagbtn.is-active { opacity: .6; }

@keyframes wptr-rotate { to { transform: rotate(360deg); } }

/* ---------- dark-friendly (auto fallback; a custom color overrides this) ---------- */
@media (prefers-color-scheme: dark) {
	:root {
		--wptr-bg: #1c2230;
		--wptr-text: #e8ecf3;
		--wptr-border: #2c3446;
		--wptr-hover: #262f42;
		--wptr-active: #23324f;
	}
}
