/**
 * Unlimited Flatsome — Flatsome Header Builder Native Styles.
 *
 * Bảo đảm toàn bộ 10 element khi kéo thả vào Top Bar, Header Main,
 * Header Bottom, Sticky Header và Mobile Header hiển thị gọn gàng,
 * căn giữa trục dọc chuẩn flex và tôn trọng chế độ .dark của Flatsome.
 */

.header-nav > li.ufl-hb-item,
.mobile-nav > li.ufl-hb-item {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	margin-top: 0;
	margin-bottom: 0;
}

.header-nav > li.ufl-hb-item > *,
.mobile-nav > li.ufl-hb-item > * {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

/* 0. UF Modern Menu */
.ufl-hb-item--nav-menu {
	overflow: visible !important;
}

.ufl-hb-item--nav-menu .ufl-nm__link {
	padding: 8px 13px;
}

/* 1. UF AJAX Search */
.ufl-hb-item--woo-search {
	width: var(--ufl-hb-search-w, 260px);
	max-width: 100%;
}

.ufl-hb-item--woo-search .ufl-ws {
	width: 100%;
}

.ufl-hb-item--woo-search .ufl-ws__input {
	height: 38px;
	min-height: 38px;
	font-size: 0.86rem;
}

/* 2. UF Mini Cart */
.ufl-hb-item--woo-minicart .ufl-wmc__btn {
	padding: 6px 12px;
	font-size: 0.85rem;
}

/* 3. UF Dark Mode */
.ufl-hb-item--dark-mode .ufl-dm {
	position: static !important;
	margin: 0 !important;
}

.ufl-hb-item--dark-mode .ufl-dm__btn {
	height: 34px;
	padding: 0 11px;
	font-size: 0.8rem;
}

/* 4. UF Off-Canvas & 10. UF Popup Trigger */
.ufl-hb-item--offcanvas .ufl-oc-trigger,
.ufl-hb-item--popup-modal .ufl-pm-trigger {
	height: 36px;
	padding: 0 14px;
	font-size: 0.84rem;
	line-height: 1;
}

/* 5. UF Fullscreen Menu */
.ufl-hb-item--fullscreen-menu .ufl-fsm__trigger {
	height: 36px;
	padding: 0 14px;
	font-size: 0.84rem;
}

/* 6. UF Mega Menu */
.ufl-hb-item--mega-menu {
	position: static;
}

.ufl-hb-item--mega-menu .ufl-mm {
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0;
}

/* 7. UF CTA Button */
.ufl-hb-item--button .ufl-btn {
	white-space: nowrap;
	line-height: 1.15;
	text-transform: none !important;
	letter-spacing: normal !important;
}

/* 8. UF Hotline / Chat (ép inline bên trong Header thay vì fixed góc màn hình) */
.ufl-hb-item--chat-btn .ufl-chat-dock {
	position: static !important;
	inset: auto !important;
	right: auto !important;
	left: auto !important;
	bottom: auto !important;
	z-index: auto !important;
	display: inline-flex;
	align-items: center;
}

.ufl-hb-item--chat-btn .ufl-chat {
	position: relative !important;
	padding: 6px 13px;
	font-size: 0.82rem;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
}

.ufl-hb-item--chat-btn .ufl-chat--icon-only {
	width: 34px;
	height: 34px;
	padding: 0;
}

/* 9. UF Freeship Bar (gọn gàng trên Top Bar / Header Bottom) */
.ufl-hb-item--woo-freeship {
	min-width: 240px;
	max-width: 380px;
}

.ufl-hb-item--woo-freeship .ufl-wfs {
	padding: 5px 12px;
	font-size: 0.78rem;
	border-radius: 999px;
}

.header-top .ufl-hb-item--woo-freeship .ufl-wfs {
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 2px 6px;
}

/* Tôn trọng nền tối (.dark / .nav-dark) của Flatsome Top Bar & Header */
.nav-dark .ufl-hb-item--woo-freeship .ufl-wfs,
.dark .ufl-hb-item--woo-freeship .ufl-wfs {
	color: #f8fafc;
}

/* Responsive gọn trên Mobile Header */
@media (max-width: 849px) {
	.ufl-hb-item--woo-search {
		width: min(210px, 52vw);
	}
	.ufl-hb-item--woo-freeship {
		min-width: 180px;
		max-width: 82vw;
	}
}
