/*
 * RTL (Chunk 7.2): the widget's internal layout uses flexbox + gap, not
 * floats or fixed margins, specifically so it stays direction-agnostic —
 * the [dir="rtl"] rules below just reverse the row order for elements
 * whose OWN dir attribute (Switcher::render(), per-item — the summary
 * follows the current language, each link follows that link's own
 * language) is "rtl", independent of the page's overall direction. The
 * bottom-right *default position* is a separate, deliberate choice and
 * stays fixed regardless of direction — only icon/label ordering flips.
 */

.transora-switcher {
	font-size: 14px;
	line-height: 1.4;
	--transora-accent: #2271b1;
}

.transora-switcher--auto {
	position: fixed;
	z-index: 100000;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 0px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
	max-width: 220px;
	overflow: hidden;
}

.transora-switcher--bottom-right {
	right: 20px;
	bottom: 0px;
}

.transora-switcher--bottom-left {
	left: 20px;
	bottom: 20px;
}

.transora-switcher--top-right {
	right: 20px;
	top: 20px;
}

.transora-switcher--top-left {
	left: 20px;
	top: 20px;
}

.transora-switcher-current {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 8px 14px;
	cursor: pointer;
	list-style: none;
	user-select: none;
	font-weight: 500;
	color: #1d2327;
	transition: background-color 0.15s ease;
}

.transora-switcher-current:hover {
	background: rgba(0, 0, 0, 0.035);
}

.transora-switcher-current::-webkit-details-marker {
	display: none;
}

.transora-switcher-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.transora-switcher-current .transora-switcher-label {
	flex: 1;
}

.transora-switcher-chevron {
	flex-shrink: 0;
	color: #8c8f94;
	transition: transform 0.2s ease;
}

.transora-switcher[open] > .transora-switcher-current .transora-switcher-chevron {
	transform: rotate(180deg);
}

.transora-switcher-list {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 5px;
	list-style: none;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	animation: transora-switcher-reveal 0.16s ease;
}

.transora-switcher-list li {
    margin: 0;
    padding: 0 !important;
}
/*
 * list-style: none (above) only removes the browser's native bullet
 * marker — it has no effect on a theme's own global `li::before` rule
 * (a common decorative-dot pattern, e.g. "ul li:before { content: '' }")
 * since that's an unrelated pseudo-element, not the native marker. Reset
 * it explicitly so a theme-wide bullet-dot style can never bleed into
 * this widget's own list.
 */
.transora-switcher-list li::before,
.transora-switcher-list li::marker {
	content: none;
	display: none;
}

.transora-switcher-list a {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 7px 9px;
	border-radius: 6px;
	text-decoration: none;
	color: #1d2327;
	transition: background-color 0.12s ease;
}

.transora-switcher-list a:hover,
.transora-switcher-list a:focus-visible {
	background: rgba(34, 113, 177, 0.08);
	color: #000000 !important;
}

.transora-switcher-list a:focus-visible {
	outline: 2px solid var(--transora-accent);
	outline-offset: -2px;
}

.transora-switcher-icon {
	flex-shrink: 0;
	width: 22px;
	height: auto;
	aspect-ratio: 3 / 2;
	border-radius: 3px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
	object-fit: cover;
}

.transora-switcher-current[dir="rtl"],
.transora-switcher-list a[dir="rtl"] {
	flex-direction: row-reverse;
	text-align: right;
}

@keyframes transora-switcher-reveal {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

