/*
 * LangRelay language switcher: the server-rendered list LangRelay_Switcher
 * puts in each placeholder, for visitors without JavaScript and crawlers.
 * The client SDK replaces it with its own dropdown and styles that itself;
 * nothing here styles the dropdown.
 */

/* Once the SDK hides the list, a theme's `nav { display: … }` must not
   bring it back. */
[data-langrelay-switcher] > .langrelay-switcher[hidden] {
	display: none !important;
}

.langrelay-switcher__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.langrelay-switcher__link {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	text-decoration: none;
}

.langrelay-switcher__link[aria-current="true"] {
	font-weight: 600;
}

.langrelay-switcher__flag {
	width: 20px;
	height: 15px;
	border-radius: 2px;
	object-fit: cover;
}

.langrelay-switcher--floating {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 99999;
	padding: 0.5rem 0.75rem;
	border-radius: 0.5rem;
	background: #fff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
	font-size: 0.875rem;
	line-height: 1.4;
}

.langrelay-switcher--floating .langrelay-switcher__link {
	color: #1f2937;
}

[data-position="bottom-left"] > .langrelay-switcher--floating {
	right: auto;
	left: 1rem;
}

[data-position="top-right"] > .langrelay-switcher--floating {
	bottom: auto;
	top: 1rem;
}

[data-position="top-left"] > .langrelay-switcher--floating {
	right: auto;
	bottom: auto;
	top: 1rem;
	left: 1rem;
}
