/* LinguaFlow – language switcher */
.lf-switcher { position: relative; display: inline-block; font-size: 14px; line-height: 1.4; z-index: 50; }
.lf-switcher ul { list-style: none; margin: 0; padding: 0; }
.lf-switcher a { text-decoration: none; color: inherit; display: inline-flex; align-items: center; gap: 6px; }
.lf-switcher .lf-flag { font-size: 1.25em; line-height: 1; font-family: "Twemoji Country Flags", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }

/* Dropdown */
.lf-switcher .lf-dropdown { position: relative; }
.lf-switcher summary {
	list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
	padding: 7px 12px; border-radius: 8px; background: #fff; color: #1d2327;
	border: 1px solid rgba(0, 0, 0, .12); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); user-select: none;
}
.lf-switcher summary::-webkit-details-marker { display: none; }
.lf-switcher .lf-caret { font-size: .8em; opacity: .6; transition: transform .15s; }
.lf-switcher details[open] .lf-caret { transform: rotate(180deg); }
.lf-switcher .lf-dropdown ul {
	position: absolute; top: calc(100% + 6px); inset-inline-start: 0; min-width: 100%;
	background: #fff; border: 1px solid rgba(0, 0, 0, .12); border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12); padding: 4px; white-space: nowrap;
}
.lf-switcher .lf-dropdown li a { display: flex; padding: 7px 10px; border-radius: 6px; color: #1d2327; }
.lf-switcher .lf-dropdown li a:hover,
.lf-switcher .lf-dropdown li a:focus { background: #f0f2f5; }

/* Inline list / flags */
.lf-switcher.lf-style-list ul,
.lf-switcher.lf-style-flags ul { display: flex; flex-wrap: wrap; gap: 4px; }
.lf-switcher.lf-style-list a,
.lf-switcher.lf-style-flags a { padding: 4px 8px; border-radius: 6px; opacity: .75; }
.lf-switcher.lf-style-list a:hover,
.lf-switcher.lf-style-flags a:hover,
.lf-switcher a.lf-active { opacity: 1; }
.lf-switcher.lf-style-list a.lf-active { font-weight: 600; background: rgba(0, 0, 0, .06); }
.lf-switcher.lf-style-flags .lf-flag { font-size: 1.6em; }

/* Floating */
.lf-switcher.lf-floating { position: fixed; z-index: 99990; }
.lf-switcher.lf-floating.lf-pos-bottom-right { bottom: 20px; right: 20px; }
.lf-switcher.lf-floating.lf-pos-bottom-left { bottom: 20px; left: 20px; }
.lf-switcher.lf-floating.lf-pos-top-right { top: 20px; right: 20px; }
.lf-switcher.lf-floating.lf-pos-top-left { top: 20px; left: 20px; }
.admin-bar .lf-switcher.lf-floating.lf-pos-top-right,
.admin-bar .lf-switcher.lf-floating.lf-pos-top-left { top: 52px; }
.lf-switcher.lf-floating.lf-pos-bottom-right .lf-dropdown ul,
.lf-switcher.lf-floating.lf-pos-bottom-left .lf-dropdown ul { top: auto; bottom: calc(100% + 6px); }
.lf-switcher.lf-floating.lf-pos-bottom-right .lf-dropdown ul,
.lf-switcher.lf-floating.lf-pos-top-right .lf-dropdown ul { left: auto; right: 0; inset-inline-start: auto; }
.lf-switcher.lf-floating.lf-style-list ul,
.lf-switcher.lf-floating.lf-style-flags ul { background: #fff; padding: 4px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }

@media (prefers-color-scheme: dark) {
	.lf-switcher.lf-floating summary,
	.lf-switcher.lf-floating .lf-dropdown ul,
	.lf-switcher.lf-floating.lf-style-list ul,
	.lf-switcher.lf-floating.lf-style-flags ul { background: #1f2328; color: #f0f0f0; border-color: #3a3f45; }
	.lf-switcher.lf-floating .lf-dropdown li a { color: #f0f0f0; }
	.lf-switcher.lf-floating .lf-dropdown li a:hover { background: #2c3137; }
}

/* Inside menus */
.menu-item .lf-switcher summary { background: transparent; border: 0; box-shadow: none; padding: 0; color: inherit; }
