/* Veloexpress QA fixes. See veloexpress-qa-fixes.php. */

/* #6: with the longer RU labels, Share wrapped to a second line and
   "space-between" pushed Compare and Wishlist to opposite edges. */
#wd-f7ee96d5 {
	justify-content: flex-start !important;
	column-gap: 20px;
}

/* #12: the coupon box was max-content wide (child theme style.css, which loads
   after this file - hence !important), so long coupon errors ran off screen on mobile. */
@media (max-width: 768px) {
	body.woocommerce-cart .cart-actions .coupon {
		width: 100% !important;
		max-width: 100% !important;
		flex-wrap: wrap;
	}

	body.woocommerce-cart .cart-actions .coupon .coupon-error-notice {
		flex: 1 1 100%;
		width: 100%;
		max-width: 100%;
		white-space: normal;
		overflow-wrap: anywhere;
	}
}

/* #35: Customizer "Additional CSS" hides WooCommerce's first name / last name / phone /
   postcode errors everywhere, because the checkout shows the child theme's own messages
   instead. My account → Edit address has no replacement messages, so the error box was
   empty. Show them again on account pages; checkout stays as it was. */
body.woocommerce-account .woocommerce-error li[data-id="billing_first_name"],
body.woocommerce-account .woocommerce-error li[data-id="billing_last_name"],
body.woocommerce-account .woocommerce-error li[data-id="billing_phone"],
body.woocommerce-account .woocommerce-error li[data-id="billing_postcode"] {
	display: list-item !important;
}

/* #34: "(nav obligāts)" next to the Persona field (already hidden on checkout). */
#legal_or_natural_person_field > label .optional {
	display: none;
}

/* #27: EN/RU use Google search, whose own 13px icon was stretched in a dark circle.
   Draw the same Woodmart magnifier as the Latvian search instead. */
.wd-header-html .gsc-search-button-v2 {
	background: var(--wd-primary-color) !important;
	border-color: var(--wd-primary-color) !important;
	border-radius: 35px !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
}

.wd-header-html .gsc-search-button-v2 svg {
	display: none !important;
}

.wd-header-html .gsc-search-button-v2::after {
	content: "\f130";
	font-family: "woodmart-font";
	font-size: 18px;
	line-height: 1;
	color: #fff;
}

/* #1 (Oct 2026): Additional CSS (loaded after this file) overrode the rules above, and the
   theme's button min-height (42px) beat its 38px height, so the EN/RU button was an oval
   with a smaller, bolder icon. Same 38px circle and 20px icon as the Latvian search. */
html body .wd-header-html td.gsc-search-button > .gsc-search-button-v2 {
	width: 38px !important;
	height: 38px !important;
	min-height: 38px !important;
	max-height: 38px !important;
	margin-top: 13px !important;
	border-radius: 50% !important;
	background: var(--wd-primary-color) !important;
}

html body .wd-header-html td.gsc-search-button > .gsc-search-button-v2::after {
	font-size: 20px;
	font-weight: 400;
}

/* #27 (LV): Additional CSS makes the Woodmart search button a dark circle but leaves the
   hover values to the theme (transparent background, white icon), so the icon vanished. */
.whb-header .searchform .searchsubmit {
	--btn-color-hover: #fff;
	--btn-bgcolor-hover: var(--wd-primary-color);
}

/* #39: Additional CSS put "View wishlist" in front of the button text on EN once a product
   is in the wishlist ("View wishlistRemove from wishlist"); clicking it removes the product. */
html[lang="en"] .wd-wishlist-btn .added .wd-action-text:before {
	content: none !important;
}

/* #40: the Personal bike selection page's embedded <style> sets every <p> to #2b2f38,
   overriding the light text of the "Rakstīt ziņu" pop-up (dark background). */
.wd-popup .color-scheme-light p {
	color: var(--wd-text-color);
}

/* #47: child style.css sets the checkout coupon input to height:100%; once the button
   wraps (mobile) there is nothing to be 100% of and it collapsed to a thin strip. */
body.woocommerce-checkout .checkout_coupon.woocommerce-form-coupon .input-text {
	height: var(--wd-form-height, 42px) !important;
}

/* #48: after a failed submit WooCommerce (checkout.js show_inline_errors) repeats the
   server error under the field, next to the checkout field editor's own message.
   Keep the field editor's (translated in fixes.js); WooCommerce's stays where it's alone. */
.woocommerce-checkout .form-row:has(> span[class*="thwcfe-"][class$="-error"]) > .checkout-inline-error-message {
	display: none;
}
