/* Luga.bg — language switcher dropdown and language bars.
   Sits on top of the theme's .lg-langs / .lg-lang styles and reuses them. */

.lg-lang-more {
	position: relative;
	display: flex;
}

.lg-lang-more-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	box-sizing: content-box; /* size like the <a> chips beside it */
	margin: 0;
	border: 0;
	background: transparent;
	font-family: inherit;
	line-height: inherit;
	cursor: pointer;
}

.lg-lang-more-btn svg { transition: transform .18s ease; }
.lg-lang-more.is-open .lg-lang-more-btn svg { transform: rotate(180deg); }

.lg-lang-menu {
	position: absolute;
	top: calc(100% + 9px);
	right: -5px;
	z-index: 1000;
	min-width: 180px;
	margin: 0;
	padding: 5px;
	list-style: none;
	background: #fff;
	border: 1px solid rgba(16, 92, 107, .15);
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(16, 47, 70, .14);
}

.lg-lang-menu[hidden] { display: none; }
.lg-lang-menu li { margin: 0; padding: 0; list-style: none; }

.lg-lang-opt {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 7px;
	font-size: 13px;
	color: #243746;
	text-decoration: none;
	transition: background-color .18s ease, color .18s ease;
}

.lg-lang-opt b {
	min-width: 22px;
	font-size: 11px;
	font-weight: 600;
	color: #486b75;
}

.lg-lang-opt:hover,
.lg-lang-opt:focus-visible { background: #edf8f8; color: #087e88; }
.lg-lang-opt.is-on,
.lg-lang-opt.is-on b { background: #0a838c; color: #fff; }
.lg-lang-opt.is-on b { background: none; }

/* In the phone menu the list opens in place, as a second row of chips,
   instead of floating over an accordion that may clip it. */
.lg-acc-langs { align-items: flex-start; }
.lg-acc-langs > span { line-height: 38px; }
.lg-acc-langs .lg-langs { flex-wrap: wrap; justify-content: center; }
.lg-acc-langs .lg-lang-more { display: contents; }

.lg-acc-langs .lg-lang-menu {
	position: static;
	display: grid;
	flex-basis: 100%;
	grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
	gap: 4px;
	min-width: 0;
	margin-top: 2px;
	padding: 4px;
	box-shadow: none;
}

.lg-acc-langs .lg-lang-menu[hidden] { display: none; }

/* ---------- bars: "also in English" / "back to Bulgarian" ---------- */

.lg-ml-bar {
	position: fixed;
	left: 50%;
	bottom: 18px;
	z-index: 99999;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: calc(100% - 32px);
	padding: 8px 8px 8px 16px;
	transform: translateX(-50%);
	background: var(--luga-footer, #102f46);
	color: #fff;
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(16, 47, 70, .28);
	font: 500 14px/1.4 Manrope, system-ui, sans-serif;
	animation: lg-ml-in .25s ease-out;
}

.lg-ml-bar .lg-ml-go {
	padding: 8px 14px;
	border-radius: 8px;
	background: var(--luga-accent, #ef946b);
	color: #fff;
	font-weight: 700;
	white-space: nowrap;
	text-decoration: none;
}

.lg-ml-bar .lg-ml-go:hover,
.lg-ml-bar .lg-ml-go:focus-visible { background: var(--luga-accent-hover, #df7f55); color: #fff; }

.lg-ml-bar .lg-ml-x {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: rgba(255, 255, 255, .75);
	cursor: pointer;
}

.lg-ml-bar .lg-ml-x:hover { background: rgba(255, 255, 255, .1); color: #fff; }

@keyframes lg-ml-in {
	from { opacity: 0; transform: translate(-50%, 10px); }
	to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 600px) {
	.lg-ml-bar {
		left: 12px;
		right: 12px;
		bottom: 12px;
		flex-wrap: wrap;
		max-width: none;
		transform: none;
		animation: none;
	}
	.lg-ml-bar .lg-ml-bar-text { flex: 1 1 calc(100% - 50px); }
	.lg-ml-bar .lg-ml-x { order: 2; }
	.lg-ml-bar .lg-ml-go { order: 3; flex: 1 1 auto; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	.lg-ml-bar, .lg-lang-more-btn svg { animation: none; transition: none; }
}
