/**
 * Product page calculator — scoped under .mtuc-product-calculator.
 */

.mtuc-product-calculator {
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 0;
	font-family: var(--mtuc-font-family, inherit);
	--mtuc-btn-width: 290px;
	--mtuc-btn-height: 56px;
	/* Logo size — increase/decrease to tune (proportional width follows aspect ratio). */
	--mtuc-logo-height: 24px;
	--mtuc-promo-badge-size: 32px;
	--mtuc-promo-side-width: calc(var(--mtuc-logo-height) * 400 / 124);
	--mtuc-red: #ee2e24;
	--mtuc-red-text: #d92a21;
	--mtuc-red-hover-bg: rgba(238, 46, 36, 0.1);
}

.mtuc-product-calculator__heading {
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 8px;
	padding: 0;
	font-family: var(--mtuc-font-family, inherit);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	color: inherit;
}

.mtuc-product-calculator__wrap {
	box-sizing: border-box;
	container-type: inline-size;
	container-name: mtuc-product-buttons;
	display: flex;
	flex-flow: row wrap;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 8px;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
}

.mtuc-product-calculator button.mtuc-product-calculator__btn {
	appearance: none;
	-webkit-appearance: none;
	box-sizing: border-box;
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 4px;
	flex: 0 0 auto;
	width: var(--mtuc-btn-width);
	min-width: var(--mtuc-btn-width);
	max-width: var(--mtuc-btn-width);
	min-height: var(--mtuc-btn-height);
	height: var(--mtuc-btn-height);
	margin: 0;
	padding: 6px 12px 6px 16px;
	border: 2px solid var(--mtuc-red);
	border-radius: 9999px;
	background: #fff;
	background-image: none;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
	color: inherit;
	font: inherit;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	transition: background-color 0.2s ease;
	outline: none;
	-webkit-tap-highlight-color: transparent;
}

.mtuc-product-calculator button.mtuc-product-calculator__btn:focus,
.mtuc-product-calculator button.mtuc-product-calculator__btn:focus-visible,
.mtuc-product-calculator button.mtuc-product-calculator__btn:active {
	outline: none;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.mtuc-product-calculator button.mtuc-product-calculator__btn .mtuc-product-calculator__content {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 0;
}

.mtuc-product-calculator button.mtuc-product-calculator__btn .mtuc-product-calculator__logo {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
}

.mtuc-product-calculator button.mtuc-product-calculator__btn .mtuc-product-calculator__logo img {
	display: block;
	flex-shrink: 0;
	width: auto;
	height: var(--mtuc-logo-height);
	max-height: var(--mtuc-logo-height);
	max-width: var(--mtuc-promo-side-width);
	object-fit: contain;
}

.mtuc-product-calculator button.mtuc-product-calculator__btn--promo .mtuc-product-calculator__promo-badge {
	display: flex;
	flex: 0 0 var(--mtuc-promo-side-width);
	align-items: center;
	justify-content: center;
	width: var(--mtuc-promo-side-width);
	min-width: var(--mtuc-promo-side-width);
	max-width: var(--mtuc-promo-side-width);
	color: var(--mtuc-red-text);
	font-size: var(--mtuc-promo-badge-size);
	font-weight: 700;
	line-height: 1;
	text-align: center;
}

.mtuc-product-calculator button.mtuc-product-calculator__btn .mtuc-product-calculator__label {
	display: block;
	width: 100%;
	color: var(--mtuc-red-text);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
}

.mtuc-product-calculator button.mtuc-product-calculator__btn .mtuc-product-calculator__price {
	display: block;
	width: 100%;
	margin-top: 2px;
	color: #000;
	font-size: 13px;
	line-height: 1.2;
	text-align: center;
}

.mtuc-product-calculator--no-vnoska button.mtuc-product-calculator__btn .mtuc-product-calculator__content {
	align-self: stretch;
	justify-content: center;
}

.mtuc-product-calculator button.mtuc-product-calculator__btn--image-only {
	justify-content: center;
	padding-left: 12px;
	padding-right: 12px;
}

.mtuc-product-calculator button.mtuc-product-calculator__btn--image-only .mtuc-product-calculator__content {
	display: none;
}

.mtuc-product-calculator button.mtuc-product-calculator__btn--image-only .mtuc-product-calculator__logo img {
	height: calc(var(--mtuc-logo-height) + 8px);
	max-height: calc(var(--mtuc-logo-height) + 8px);
}

.mtuc-cart-calculator {
	width: 100%;
	margin-top: 0;
}

.woocommerce .wc-proceed-to-checkout .mtuc-cart-calculator {
	margin-bottom: 12px;
}

.wc-block-cart .mtuc-cart-calculator-fragment {
	width: 100%;
	margin-bottom: 16px;
}

.wc-block-cart .mtuc-cart-calculator-fragment .mtuc-cart-calculator {
	width: 100%;
}

.mtuc-product-calculator--stacked .mtuc-product-calculator__wrap {
	flex-direction: column;
	align-items: flex-start;
}

.mtuc-product-calculator:not(.mtuc-product-calculator--stacked) button.mtuc-product-calculator__btn {
	flex: 0 0 var(--mtuc-btn-width);
}

.mtuc-product-calculator button.mtuc-product-calculator__btn:hover,
.mtuc-product-calculator button.mtuc-product-calculator__btn:focus-visible {
	background: var(--mtuc-red-hover-bg);
	background-image: none;
	border-color: var(--mtuc-red);
}

.mtuc-product-calculator--dark button.mtuc-product-calculator__btn {
	background: var(--mtuc-red);
	border-color: #b82119;
}

.mtuc-product-calculator--dark button.mtuc-product-calculator__btn .mtuc-product-calculator__label,
.mtuc-product-calculator--dark button.mtuc-product-calculator__btn .mtuc-product-calculator__price {
	color: #fff;
}

.mtuc-product-calculator--dark button.mtuc-product-calculator__btn--promo .mtuc-product-calculator__promo-badge {
	color: #fff;
}

.mtuc-product-calculator--dark button.mtuc-product-calculator__btn:hover,
.mtuc-product-calculator--dark button.mtuc-product-calculator__btn:focus-visible {
	background: #d9261f;
	background-image: none;
	border-color: #b82119;
}

@container mtuc-product-buttons (max-width: calc(var(--mtuc-btn-width) - 1px)) {
	.mtuc-product-calculator:not(.mtuc-product-calculator--stacked) .mtuc-product-calculator__wrap {
		flex-direction: column;
		align-items: stretch;
	}

	.mtuc-product-calculator:not(.mtuc-product-calculator--stacked) button.mtuc-product-calculator__btn {
		flex: 0 0 auto;
		width: 100%;
		min-width: 0;
		max-width: 100%;
	}
}
