/**
 * Top bar — logo + menu + narzędzia wyśrodkowane, menu przy logo.
 */

@media (min-width: 1240px) {
	.mbst-premium-ui #Top_bar .container {
		max-width: 100% !important;
		padding-left: clamp(12px, 2vw, 28px) !important;
		padding-right: clamp(12px, 2vw, 28px) !important;
	}

	.mbst-premium-ui #Top_bar .column.one {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		flex-wrap: nowrap !important;
		width: 100% !important;
	}

	.mbst-premium-ui #Top_bar .top_bar_left {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		flex: 0 1 auto !important;
		width: auto !important;
		max-width: 100% !important;
		min-width: 0 !important;
		float: none !important;
		gap: clamp(10px, 1.5vw, 22px) !important;
	}

	.mbst-premium-ui #Top_bar .logo {
		flex: 0 0 auto !important;
		margin-right: 0 !important;
	}

	.mbst-premium-ui #Top_bar .menu_wrapper,
	.mbst-premium-ui.menuo-right #Top_bar .menu_wrapper,
	.mbst-premium-ui.menuo-right.header-stack #Top_bar .menu_wrapper {
		flex: 0 1 auto !important;
		width: auto !important;
		min-width: 0 !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: flex-start !important;
		gap: 8px !important;
		margin: 0 !important;
		float: none !important;
	}

	.mbst-premium-ui #Top_bar .menu_wrapper > nav,
	.mbst-premium-ui #Top_bar .menu_wrapper > #menu {
		flex: 0 1 auto !important;
		width: auto !important;
		min-width: 0 !important;
	}

	.mbst-premium-ui #Top_bar .menu_wrapper .menu,
	.mbst-premium-ui #Top_bar #menu > ul.menu {
		display: flex !important;
		flex-wrap: nowrap !important;
		justify-content: flex-start !important;
		width: auto !important;
		float: none !important;
	}

	.mbst-premium-ui #Top_bar .menu > li {
		float: none !important;
	}

	.mbst-premium-ui #Top_bar .top_bar_left .secondary_menu_wrapper,
	.mbst-premium-ui #Top_bar .top_bar_left .banner_wrapper,
	.mbst-premium-ui #Top_bar .top_bar_left .search_wrapper {
		display: none !important;
	}
}

.mbst-premium-ui #Top_bar .column.one {
	display: flex !important;
	align-items: center !important;
	flex-wrap: nowrap !important;
	width: 100%;
}

.mbst-premium-ui #Top_bar .top_bar_left {
	display: flex !important;
	align-items: center !important;
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	float: none !important;
}

.mbst-premium-ui #Top_bar .menu_wrapper {
	min-width: 0;
	display: flex !important;
	align-items: center !important;
	justify-content: flex-start;
	gap: 6px;
	flex: 1 1 auto;
}

.mbst-premium-ui #Top_bar .menu_wrapper .menu,
.mbst-premium-ui #Top_bar #menu > ul.menu {
	display: flex;
	flex-wrap: nowrap;
	justify-content: flex-start;
}

.mbst-premium-ui #Top_bar .menu > li > a span {
	gap: 0.3em;
}

/* Narzędzia: social + język — tuż za menu, jedna linia bazowa */
.mbst-premium-ui #Top_bar .menu_wrapper .mbst-topbar-tools {
	display: inline-flex;
	align-items: center;
	align-self: center;
	gap: 5px;
	flex: 0 0 auto;
	margin: 0 !important;
	padding: 0;
	order: 2;
	flex-shrink: 0;
	line-height: 0;
	height: 34px;
}

.mbst-premium-ui #Top_bar .menu_wrapper .mbst-topbar-social {
	display: inline-flex;
	align-items: center;
	align-self: center;
	gap: 4px;
	list-style: none;
	margin: 0 !important;
	padding: 0 !important;
	height: 34px;
}

.mbst-premium-ui #Top_bar .menu_wrapper .mbst-topbar-social li {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	line-height: 0;
	list-style: none;
}

/* Wspólny styl guzików: social + język */
.mbst-premium-ui #Top_bar .mbst-topbar-social a,
.mbst-premium-ui #Top_bar .mbst-lang-dropdown__toggle {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	min-width: 34px;
	min-height: 34px;
	max-width: 34px;
	max-height: 34px;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 14px !important;
	border: 1px solid rgba(255, 255, 255, 0.28);
	background: rgba(255, 255, 255, 0.1);
	color: #fff !important;
	text-decoration: none !important;
	transition: background 0.2s ease, border-color 0.2s ease;
	flex-shrink: 0;
	vertical-align: middle;
}

.mbst-premium-ui .mbst-topbar-social a:hover,
.mbst-premium-ui .mbst-lang-dropdown__toggle:hover,
.mbst-premium-ui .mbst-lang-dropdown.is-open .mbst-lang-dropdown__toggle {
	background: rgba(255, 255, 255, 0.22);
	border-color: rgba(255, 255, 255, 0.45);
}

.mbst-premium-ui .mbst-topbar-social i {
	font-size: 15px;
	line-height: 1;
}

body.mbst-premium-ui.mbst-header-scrolled .mbst-topbar-social a,
body.mbst-premium-ui #Top_bar.is-sticky .mbst-topbar-social a,
body.mbst-premium-ui #Top_bar.mbst-header-solid .mbst-topbar-social a,
body.mbst-premium-ui.mbst-header-scrolled .mbst-lang-dropdown__toggle,
body.mbst-premium-ui #Top_bar.is-sticky .mbst-lang-dropdown__toggle,
body.mbst-premium-ui #Top_bar.mbst-header-solid .mbst-lang-dropdown__toggle {
	border-color: rgba(24, 34, 91, 0.14);
	background: rgba(24, 34, 91, 0.06);
	color: var(--mbst-navy, #18225b) !important;
}

body.mbst-premium-ui.mbst-header-scrolled .mbst-topbar-social a:hover,
body.mbst-premium-ui #Top_bar.is-sticky .mbst-topbar-social a:hover,
body.mbst-premium-ui.mbst-header-scrolled .mbst-lang-dropdown__toggle:hover,
body.mbst-premium-ui #Top_bar.is-sticky .mbst-lang-dropdown__toggle:hover,
body.mbst-premium-ui.mbst-header-scrolled .mbst-lang-dropdown.is-open .mbst-lang-dropdown__toggle,
body.mbst-premium-ui #Top_bar.is-sticky .mbst-lang-dropdown.is-open .mbst-lang-dropdown__toggle {
	background: rgba(84, 173, 214, 0.14);
	border-color: var(--mbst-cyan, #54add6);
}

/* Dropdown języka — ten sam kafelek co social */
.mbst-premium-ui #Top_bar .menu_wrapper .mbst-lang-dropdown {
	position: relative;
	display: inline-flex;
	align-items: center;
	align-self: center;
	flex-shrink: 0;
	margin: 0 !important;
	padding: 0;
	height: 34px;
}

.mbst-premium-ui #Top_bar .mbst-lang-dropdown__toggle {
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	font: inherit;
	line-height: 0;
}

.mbst-premium-ui .mbst-lang-dropdown__toggle .mbst-lang-flag {
	display: block;
	width: 22px;
	height: 22px;
	border-radius: 8px;
	background-size: cover;
	background-position: center;
	flex-shrink: 0;
}

.mbst-premium-ui .mbst-lang-flag--pl {
	background-image: linear-gradient(180deg, #fff 50%, #dc143c 50%);
}

.mbst-premium-ui .mbst-lang-flag--de {
	background-image: linear-gradient(
		180deg,
		#000 33.33%,
		#dd0000 33.33%,
		#dd0000 66.66%,
		#ffce00 66.66%
	);
}

.mbst-premium-ui .mbst-lang-dropdown__menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 148px;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1px solid rgba(24, 34, 91, 0.1);
	border-radius: 16px;
	box-shadow: 0 12px 32px rgba(24, 34, 91, 0.14);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	z-index: 100010;
}

.mbst-premium-ui .mbst-lang-dropdown.is-open .mbst-lang-dropdown__menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.mbst-premium-ui .mbst-lang-dropdown__menu a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 12px;
	color: var(--mbst-navy, #18225b) !important;
	text-decoration: none !important;
	font-size: 0.875rem;
	font-weight: 600;
	transition: background 0.15s ease;
}

.mbst-premium-ui .mbst-lang-dropdown__menu a:hover {
	background: rgba(84, 173, 214, 0.12);
}

.mbst-premium-ui .mbst-lang-dropdown__menu a.is-active {
	background: rgba(24, 34, 91, 0.06);
	pointer-events: none;
}

.mbst-premium-ui .mbst-lang-dropdown__menu .mbst-lang-flag {
	width: 22px;
	height: 22px;
}

.mbst-premium-ui #Top_bar a.responsive-menu-toggle {
	order: 3;
	flex: 0 0 auto;
	margin-left: 0 !important;
	border-radius: 14px !important;
}

.mbst-premium-ui #Top_bar .top_bar_right:empty {
	display: none !important;
}

.mbst-premium-ui #Top_bar .top_bar_right {
	position: static !important;
	float: none !important;
	top: auto !important;
	height: auto !important;
	flex: 0 0 auto;
}

@media (max-width: 1239px) {
	.mbst-premium-ui #Top_bar .column.one {
		justify-content: space-between !important;
	}

	.mbst-premium-ui #Top_bar .top_bar_left {
		flex: 1 1 auto !important;
		justify-content: flex-start !important;
		gap: 8px !important;
	}

	.mbst-premium-ui #Top_bar .menu_wrapper {
		justify-content: flex-end !important;
	}

	.mbst-premium-ui #Top_bar .menu_wrapper .mbst-topbar-tools,
	.mbst-premium-ui #Top_bar .menu_wrapper .mbst-topbar-social,
	.mbst-premium-ui #Top_bar .menu_wrapper .mbst-lang-dropdown {
		height: 32px;
	}

	.mbst-premium-ui .mbst-topbar-tools {
		margin-left: 0;
		margin-right: 4px;
		flex-shrink: 0;
	}

	.mbst-premium-ui #Top_bar .mbst-topbar-social a,
	.mbst-premium-ui #Top_bar .mbst-lang-dropdown__toggle {
		width: 32px;
		height: 32px;
		min-width: 32px;
		min-height: 32px;
		max-width: 32px;
		max-height: 32px;
		border-radius: 12px !important;
	}

	.mbst-premium-ui .mbst-lang-dropdown__toggle .mbst-lang-flag {
		width: 20px;
		height: 20px;
		border-radius: 7px;
	}
}

@media (max-width: 767px) {
	.mbst-premium-ui .mbst-topbar-tools {
		gap: 4px;
	}

	.mbst-premium-ui #Top_bar .menu_wrapper .mbst-topbar-tools,
	.mbst-premium-ui #Top_bar .menu_wrapper .mbst-topbar-social,
	.mbst-premium-ui #Top_bar .menu_wrapper .mbst-lang-dropdown {
		height: 30px;
	}

	.mbst-premium-ui #Top_bar .mbst-topbar-social a,
	.mbst-premium-ui #Top_bar .mbst-lang-dropdown__toggle {
		width: 30px;
		height: 30px;
		min-width: 30px;
		min-height: 30px;
		max-width: 30px;
		max-height: 30px;
	}

	.mbst-premium-ui .mbst-lang-dropdown__toggle .mbst-lang-flag {
		width: 18px;
		height: 18px;
	}
}
