/*
Theme Name: Minimog Child
Theme URI: http://minimog.thememove.com/
Author: ThemeMove
Author URI: http://thememove.com/
Version: 1.0.0
Template: minimog
Text Domain:  minimog-child
Tags: editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready
*/

.minimog-child-company-field {
	display: none;
}

.price .iworks-omnibus {
	display: block;
	font-size: 14px;
	font-weight: 400;
	color: #666;
}

.woocommerce-checkout .checkout-inline-error-message {
	margin-top: 5px;
	font-size: 0.9em;
	color: #d9534f;
}

/* Omniva's map widget sits inside Minimog's right-aligned cart totals and brings its own Verdana font. */
.tmjs-default-theme.tmjs-container,
.tmjs-default-theme.tmjs-modal {
	font-family: inherit;
	text-align: start;
}

.omnivalt_terminal_container_map .tmjs-container .tmjs-selected-terminal {
	padding-bottom: 8px;
	font-size: 14px;
	font-weight: 500;
}

.omnivalt_terminal_container_map .tmjs-container .tmjs-open-modal-btn {
	display: block;
	padding: 10px 20px;
	border: 1px solid #000;
	border-radius: 5px;
	background-color: #fff;
	color: #000;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
	text-align: center;
}

.omnivalt_terminal_container_map .tmjs-container .tmjs-open-modal-btn:hover,
.omnivalt_terminal_container_map .tmjs-container .tmjs-open-modal-btn:focus {
	background-color: #000;
	color: #fff;
}

/* Above Minimog's mobile tab bar (z-index 9999). */
.tmjs-default-theme.tmjs-modal {
	z-index: 10000;
}

.tmjs-modal .tmjs-terminal-finder h2 {
	padding-right: 50px;
}

/* Shipping labels outside the checkout (inc/checkout-shipping.php): "Nemokamai" shows only in the side cart drawer. */
.mw-ship__price--free {
	display: none;
}

/* Side cart drawer: shipping methods as a plain list, title above, price on the right. */
#popup-fly-cart tr.woocommerce-shipping-totals {
	flex-wrap: wrap;
	row-gap: 6px;
}

#popup-fly-cart tr.woocommerce-shipping-totals > th,
#popup-fly-cart tr.woocommerce-shipping-totals > td {
	flex: 0 0 100%;
	width: 100%;
	padding: 0;
	text-align: start;
}

#popup-fly-cart #shipping_method {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	list-style: none;
}

#popup-fly-cart #shipping_method > li {
	position: relative;
	margin: 0;
	padding: 0;
	text-align: start;
}

/* The radio stays in the DOM for the keyboard and Minimog's script; the label draws the dot. */
#popup-fly-cart #shipping_method > li > input[type="radio"] {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
}

#popup-fly-cart #shipping_method > li > label {
	position: relative;
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin: 0;
	padding: 7px 0 7px 26px;
	color: #4f521c;
	font-size: 15px;
	line-height: 1.35;
	cursor: pointer;
}

#popup-fly-cart #shipping_method > li > input[type="radio"] + label::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	box-sizing: border-box;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	border: 1.5px solid #b5b5a8;
	border-radius: 50%;
	background: #fff;
}

#popup-fly-cart #shipping_method > li > input[type="radio"]:checked + label::before {
	border: 5px solid #4f521c;
}

#popup-fly-cart #shipping_method > li > input[type="radio"]:focus-visible + label::before {
	box-shadow: 0 0 0 3px rgba(79, 82, 28, 0.25);
}

#popup-fly-cart #shipping_method > li > input[type="hidden"] + label {
	padding-left: 0;
}

#popup-fly-cart #shipping_method > li > input[type="radio"]:checked + label .mw-ship__name {
	font-weight: 500;
}

#popup-fly-cart #shipping_method .mw-ship__sep,
#popup-fly-cart #shipping_method .dpd-carrier-icon-image-holder {
	display: none;
}

#popup-fly-cart #shipping_method .mw-ship__price {
	display: inline;
	margin-left: auto;
	font-size: 14px;
	white-space: nowrap;
}

#popup-fly-cart #shipping_method .mw-ship__price .amount {
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
}

/* The parcel locker is chosen at checkout only; the side cart lists methods and prices. */
#popup-fly-cart #shipping_method .omnivalt_terminal_container,
#popup-fly-cart .wc_shipping_dpd_terminals {
	display: none !important;
}

/* Size guide modal: only the chart image, no "Size Chart" heading (hard-coded in Minimog). */
#minimog-size-guide .modal-content {
	width: auto;
}

#minimog-size-guide .modal-content-header {
	display: none;
}

#minimog-size-guide .modal-content-inner {
	padding: 0;
}

#minimog-size-guide .minimog-size-guide--global-content,
#minimog-size-guide .minimog-size-guide--global-content figure {
	margin: 0;
}

/* The image block stores a fixed inline width (540px). */
#minimog-size-guide .minimog-size-guide--global-content img {
	display: block;
	width: auto !important;
	height: auto;
	max-width: 100%;
	max-height: calc(100vh - 60px);
}

/* Minimog sets dropdown attributes to half width; size is the only dropdown here. */
.single-product .entry-summary form.variations_form div.variations .row-isw-swatch--isw_select {
	flex-basis: 100%;
	max-width: 100%;
}

/* WPC Linked Variation: colour products as round swatches, label styled like Minimog's attribute labels. */
.entry-summary .wpclv-attributes .wpclv-attribute {
	margin: 24px 0;
}

/* Flex drops the trailing whitespace the plugin's template leaves before the ::after colon. */
.entry-summary .wpclv-attributes .wpclv-attribute-label {
	display: flex;
	margin: 0 0 14px;
	color: var(--minimog-color-heading);
	font-size: 16px;
	font-weight: 500;
	line-height: 24px;
}

.entry-summary .wpclv-attributes .wpclv-attribute-label::after {
	content: ":";
}

.entry-summary .wpclv-attributes .wpclv-terms {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
}

.entry-summary .wpclv-attributes .wpclv-terms .wpclv-term.wpclv-term-image {
	float: none;
	width: 44px;
	height: 44px;
	min-width: 0;
	margin: 0;
	padding: 3px;
	border: 1px solid transparent;
	border-radius: 50%;
	background: none;
	line-height: 0;
}

.entry-summary .wpclv-attributes .wpclv-terms .wpclv-term.wpclv-term-image:hover {
	border-color: var(--minimog-color-border, #d2d2d2);
}

.entry-summary .wpclv-attributes .wpclv-terms .wpclv-term.wpclv-term-image.active {
	border-color: var(--minimog-color-heading);
}

.entry-summary .wpclv-attributes .wpclv-terms .wpclv-term.wpclv-term-image span,
.entry-summary .wpclv-attributes .wpclv-terms .wpclv-term.wpclv-term-image a {
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: 50%;
	background: none;
}

.entry-summary .wpclv-attributes .wpclv-terms .wpclv-term.wpclv-term-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* "Dydžių gidas" sits between the size dropdown and the quantity: keep it close to the dropdown. */
.single-product .entry-summary form.cart .product-size-guide {
	margin: -12px 0 24px;
}

/* After a size is selected, the card button adds it and opens the side cart, so WooCommerce's "View cart" link after the button is not needed. */
.woocommerce_loop_add_to_cart_wrap .added_to_cart {
	display: none;
}

.woocommerce_loop_add_to_cart_wrap a.mw-size-sold-out {
	opacity: 0.6;
}

/* Product page: with a sold-out size chosen, or no size in stock at all, Omnisend's "Pranešti, kai bus" form replaces quantity and the cart buttons. */
.single-product form.variations_form.mw-variation-sold-out .woocommerce-variation-add-to-cart {
	display: none;
}

.single-product .mw-back-in-stock:has(form) {
	margin: 8px 0 24px;
}

/*
 * Minimog's card style 11 makes the button a one-line -webkit-line-clamp box around an inline-flex label
 * (text + arrow icon). Safari ellipsizes inside that label ("Į krepš… ›…") even when the text fits, e.g. in
 * a window narrower than the screen. A one-line flex row shows the same button without line-clamp.
 */
.minimog-product:not(.style-list).group-style-11 .woocommerce_loop_add_to_cart_wrap a {
	display: flex;
	align-items: center;
	justify-content: center;
	-webkit-line-clamp: none;
	white-space: nowrap;
}

/* Phones have no hover, and Minimog hides the card button there (`display: none !important`); once a size is selected it has to show. */
@media (max-width: 767px) {
	.minimog-product:not(.style-list) .product .woocommerce_loop_add_to_cart_wrap.product-action:has(> a.mw-size-ready, > a.mw-size-sold-out) {
		display: block !important;
		opacity: 1;
		transform: none;
	}

	.minimog-product:not(.style-list) .product .product-thumbnail > .woocommerce_loop_add_to_cart_wrap.product-action:has(> a.mw-size-ready, > a.mw-size-sold-out) {
		position: absolute;
		right: 8px;
		bottom: 8px;
		left: 8px;
		z-index: 3;
	}

	.minimog-product:not(.style-list) .product .woocommerce_loop_add_to_cart_wrap.product-action a:is(.mw-size-ready, .mw-size-sold-out) {
		width: 100%;
		min-height: 38px;
		padding: 0 8px;
		font-size: 14px;
		line-height: 38px;
	}
}

/* Home page on phones: square corners on the images and the hero block. Elementor's per-element rules are more specific, hence !important. */
@media (max-width: 767px) {
	.home .hero-section,
	.home .hero-section .slide-content,
	.home .elementor-widget-tm-product-category-carousel :is(.cat-image, .minimog-image, .minimog-lazy-image, img),
	.home .elementor-widget-tm-product-carousel .product .thumbnail,
	.home .elementor-widget-tm-product-carousel .product .thumbnail img,
	.home .elementor-widget-tm-modern-image :is(.minimog-image, img),
	.home .elementor-widget-tm-blog :is(.post-thumbnail, img) {
		border-radius: 0 !important;
	}
}

/*
 * With Buy now on, Minimog draws "Į krepšelį" in its secondary style (transparent, olive border). The
 * site's Additional CSS (Customizer) forces white text on every .single_add_to_cart_button, including
 * the disabled state, so this style needs its own text colour; these selectors outrank those !important rules.
 */
.single-product form.cart button.single_add_to_cart_button.button-2 {
	color: #4f521c !important;
}

.single-product form.cart button.single_add_to_cart_button.button-2.disabled.wc-variation-selection-needed {
	color: rgba(79, 82, 28, 0.7) !important;
}

.single-product form.cart button.single_add_to_cart_button.button-2:not(.disabled):hover {
	color: #fff !important;
}

/* Phone header: search and cart icons get a 44 × 44 px tap area (the icon itself stays the same size). */
@media (max-width: 1199px) {
	#page-header .page-open-popup-search.header-icon,
	#page-header .mini-cart__button {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 44px;
		min-height: 44px;
	}
}

/*
 * Price tables typed into page content (Pristatymas, Grąžinimai) carry inline padding and font size;
 * on phones they are compacted so all four columns fit in 375 px without sideways scrolling.
 */
@media (max-width: 575px) {
	.elementor-widget-text-editor table {
		min-width: 0 !important;
		font-size: 14px !important;
		line-height: 20px !important;
	}

	.elementor-widget-text-editor table :is(th, td) {
		padding: 10px 6px !important;
	}
}

/* Omnisend's embedded newsletter form (footer): 16 px input text, or iOS Safari zooms in on focus. */
[id^="omnisend-embedded-v2-"] input {
	font-size: 16px !important;
}

/* Mobile tab bar labels: "Norų sąrašas" fills its tab exactly, wrapped to a second line and Minimog clipped it to "Norų…". */
#page-mobile-tabs .mobile-tab-link--title {
	white-space: nowrap;
}
