/**
 * WP Translator — front-end language switcher
 */

.wpt-switcher {
	--wpt-sw-accent: #0d9488;
	--wpt-sw-accent-d: #0f766e;
	--wpt-sw-surface: rgba(255, 255, 255, 0.92);
	--wpt-sw-border: rgba(15, 23, 42, 0.08);
	--wpt-sw-text: #0f172a;
	--wpt-sw-muted: #64748b;
	position: relative;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

/* ----- Text buttons ----- */
.wpt-switcher-buttons {
	display: inline-flex;
	gap: 2px;
	padding: 3px;
	border-radius: 12px;
	background: var(--wpt-sw-surface);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid var(--wpt-sw-border);
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);
}

.wpt-switcher-floating.wpt-switcher-buttons {
	position: fixed;
	bottom: 22px;
	right: 22px;
	z-index: 99999;
}

.wpt-lang-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	padding: 10px 14px;
	background: transparent;
	color: var(--wpt-sw-text);
	text-decoration: none;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	border-radius: 9px;
	transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.wpt-lang-link:hover {
	background: rgba(13, 148, 136, 0.1);
	color: var(--wpt-sw-accent-d);
	text-decoration: none;
}

.wpt-lang-link.wpt-active {
	background: linear-gradient(145deg, var(--wpt-sw-accent) 0%, var(--wpt-sw-accent-d) 100%);
	color: #fff;
	box-shadow: 0 2px 12px rgba(13, 148, 136, 0.35);
}

.wpt-lang-link.wpt-active:hover {
	color: #fff;
	background: linear-gradient(145deg, #14b8a6 0%, var(--wpt-sw-accent-d) 100%);
}

/* ----- Flags dropdown ----- */
.wpt-switcher-flags {
	display: inline-block;
	min-width: 132px;
	padding: 3px;
	border-radius: 12px;
	background: var(--wpt-sw-surface);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid var(--wpt-sw-border);
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.05);
}

.wpt-switcher-floating.wpt-switcher-flags {
	position: fixed;
	bottom: 22px;
	right: 22px;
	z-index: 99999;
}

.wpt-flag-toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 10px 12px;
	margin: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	font: inherit;
	color: var(--wpt-sw-text);
	text-align: left;
	border-radius: 9px;
	transition: background 0.2s;
}

.wpt-flag-toggle:hover {
	background: rgba(13, 148, 136, 0.08);
}

.wpt-switcher-flags.wpt-is-open .wpt-flag-toggle {
	background: rgba(13, 148, 136, 0.06);
}

.wpt-flag-icon {
	font-size: 1.4em;
	line-height: 1;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.08));
}

.wpt-flag-code {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--wpt-sw-text);
}

.wpt-flag-chevron {
	margin-left: auto;
	font-size: 9px;
	color: var(--wpt-sw-muted);
	transition: transform 0.25s ease;
}

.wpt-switcher-flags.wpt-is-open .wpt-flag-chevron {
	transform: rotate(180deg);
	color: var(--wpt-sw-accent);
}

.wpt-flag-list {
	list-style: none;
	margin: 4px 0 0;
	padding: 6px 0;
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 2px);
	min-width: 100%;
	width: max-content;
	background: rgba(255, 255, 255, 0.98);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid var(--wpt-sw-border);
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);
	z-index: 100000;
}

.wpt-switcher-floating .wpt-flag-list {
	top: auto;
	bottom: calc(100% + 10px);
}

.wpt-flag-list[hidden] {
	display: none !important;
}

.wpt-flag-list li {
	margin: 0;
	padding: 0;
}

.wpt-flag-list a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	color: var(--wpt-sw-text);
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
	border-radius: 0;
	transition: background 0.15s, color 0.15s;
}

.wpt-flag-list a:hover {
	background: rgba(13, 148, 136, 0.1);
	color: var(--wpt-sw-accent-d);
}

.wpt-flag-list a.wpt-active {
	background: rgba(13, 148, 136, 0.12);
	color: var(--wpt-sw-accent-d);
	font-weight: 700;
}
