/*
 * Lekker V2, piece B: the phone header. LIVE when "b" is in option
 * lp_v2_features. Adds Astra's search icon beside the cart (v2.php puts it
 * in the header layout; search.js already opens the full screen search from
 * it), swaps the cart total for a small item count, and keeps the name,
 * search, cart and menu on one line, evenly spaced. On desktop it only
 * lightens the cart total. Scoped under body.lp-v2b.
 */

@media (max-width: 921px) {
	body.lp-v2b #ast-mobile-header .site-header-primary-section-left { min-width: 0; flex: 1 1 auto; }
	body.lp-v2b #ast-mobile-header .site-header-primary-section-right {
		flex: 0 0 auto;
		display: flex;
		align-items: center;
		gap: 2px;
	}
	/* Astra spaces the menu button 10px further out than the other icons;
	 * even the three out. */
	body.lp-v2b #ast-mobile-header .site-header-primary-section-right > *,
	body.lp-v2b #ast-mobile-header .site-header-primary-section-right .ast-builder-layout-element {
		margin: 0 !important;
		padding: 0 !important;
	}
	body.lp-v2b #ast-mobile-header .ast-site-identity { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0; }
	body.lp-v2b #ast-mobile-header .site-logo-img img.custom-logo { max-height: 30px; width: auto; }
	body.lp-v2b #ast-mobile-header .site-title,
	body.lp-v2b #ast-mobile-header .site-title a {
		font-size: 1.0625rem !important;
		line-height: 1.2 !important;
		white-space: nowrap;
		margin: 0;
	}

	/* Every header control is a 44px target. */
	body.lp-v2b #ast-mobile-header .ast-header-search,
	body.lp-v2b #ast-mobile-header .ast-header-woo-cart,
	body.lp-v2b #ast-mobile-header .ast-mobile-menu-trigger-minimal,
	body.lp-v2b #ast-mobile-header .ast-button-wrap {
		min-width: 44px;
		min-height: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		margin: 0 !important;
		padding: 0 !important;
	}

	/* Search: the icon only; the overlay does the typing. */
	body.lp-v2b #ast-mobile-header .ast-search-menu-icon .search-form { display: none !important; }
	body.lp-v2b #ast-mobile-header .astra-search-icon {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		color: #fff !important;
	}
	body.lp-v2b #ast-mobile-header .astra-search-icon svg { width: 20px; height: 20px; fill: #fff !important; }

	/* Cart: an item count instead of the rand amount. */
	body.lp-v2b #ast-mobile-header .ast-woo-header-cart-info-wrap { display: none !important; }
	body.lp-v2b #ast-mobile-header .ast-site-header-cart .cart-container,
	body.lp-v2b #ast-mobile-header .ast-addon-cart-wrap {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0 !important;
		border: 0 !important;
		background: transparent !important;
	}
	body.lp-v2b #ast-mobile-header .ast-icon-shopping-bag { position: relative; display: inline-flex; line-height: 1; }
	body.lp-v2b #ast-mobile-header .ast-icon-shopping-bag svg { width: 19px; height: 19px; fill: #fff !important; }
	body.lp-v2b #ast-mobile-header .ast-icon-shopping-bag[data-cart-total]::after {
		content: attr(data-cart-total) !important;
		position: absolute !important;
		top: -8px !important;
		right: -10px !important;
		left: auto !important;
		display: block !important;
		min-width: 18px;
		height: 18px;
		padding: 0 5px;
		border-radius: 9px;
		background: var(--v2-lime, #8cc63f) !important;
		color: var(--v2-ink, #0b1b3a) !important;
		font-family: var(--v2-sans, sans-serif);
		font-size: 11px !important;
		font-weight: 700;
		line-height: 18px !important;
		text-align: center;
		box-sizing: border-box;
		border: 0 !important;
		box-shadow: 0 0 0 2px #12266b;
	}
	body.lp-v2b #ast-mobile-header .ast-icon-shopping-bag[data-cart-total="0"]::after { display: none !important; }

	body.lp-v2b #ast-mobile-header .menu-toggle { padding: 0 !important; border: 0 !important; background: transparent !important; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
}

/* Desktop: the cart total in regular weight, 1pt smaller (17px to 15.67px). */
@media (min-width: 922px) {
	body.lp-v2b #ast-desktop-header .ast-woo-header-cart-info-wrap,
	body.lp-v2b #ast-desktop-header .ast-woo-header-cart-total,
	body.lp-v2b #ast-desktop-header .ast-woo-header-cart-total .amount,
	body.lp-v2b #ast-desktop-header .ast-woo-header-cart-total bdi {
		font-size: 15.67px !important;
		font-weight: 400 !important;
	}
}
