.tp-tarp-calculator {
	width: 100%;
	max-width: 100%;
	margin-inline: auto;
	padding: 28px;
	box-sizing: border-box;
	color: #0b2e59;
	background: #ffffff;
	border: 1px solid #b8cde3;
	border-radius: 10px;
	box-shadow: 0 6px 18px rgba(11, 46, 89, 0.09);
	font-family: inherit;
}

.tp-tarp-calculator *,
.tp-tarp-calculator *::before,
.tp-tarp-calculator *::after {
	box-sizing: border-box;
}

.tp-tarp-calculator__header {
	margin-bottom: 24px;
}

.tp-tarp-calculator__heading {
	margin: 0 0 10px;
	color: #0b2e59;
	font-family: inherit;
	font-size: clamp(24px, 3vw, 34px);
	font-weight: 700;
	line-height: 1.2;
}

.tp-tarp-calculator__intro {
	max-width: 760px;
	margin: 0;
	color: #40566f;
	font-size: 16px;
	line-height: 1.55;
}

.tp-tarp-calculator__layout {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: stretch;
}

.tp-tarp-calculator__form {
	display: grid;
	flex: 1 1 360px;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	min-width: 0;
	gap: 18px;
	align-content: start;
	margin: 0;
	padding: 22px;
	background: #f8fbfe;
	border: 1px solid #d8e2ec;
	border-radius: 8px;
}

.tp-tarp-calculator__field {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 8px;
}

.tp-tarp-calculator__field--wide,
.tp-tarp-calculator__hint,
.tp-tarp-calculator__actions {
	grid-column: 1 / -1;
}

.tp-tarp-calculator__label {
	color: #0b2e59;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}

.tp-tarp-calculator__input,
.tp-tarp-calculator__select {
	width: 100%;
	min-width: 0;
	min-height: 46px;
	margin: 0;
	padding: 10px 12px;
	color: #182b3f;
	background: #ffffff;
	border: 1px solid #9fb5ca;
	border-radius: 6px;
	box-shadow: none;
	font: inherit;
	line-height: 1.3;
}

.tp-tarp-calculator__input:focus-visible,
.tp-tarp-calculator__select:focus-visible,
.tp-tarp-calculator__submit:focus-visible,
.tp-tarp-calculator__cart-button:focus-visible,
.tp-tarp-calculator__product-link:focus-visible,
.tp-tarp-calculator__view-cart:focus-visible {
	outline: 3px solid rgba(255, 122, 0, 0.45);
	outline-offset: 2px;
}

.tp-tarp-calculator__actions {
	display: flex;
	align-items: center;
}

.tp-tarp-calculator__hint {
	margin: 0;
	color: #5d6f82;
	font-size: 14px;
	line-height: 1.45;
}

.tp-tarp-calculator__submit {
	display: inline-flex;
	min-height: 48px;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 12px 24px;
	cursor: pointer;
	touch-action: manipulation;
	color: #ffffff;
	background: #ff7a00;
	border: 1px solid #ff7a00;
	border-radius: 7px;
	box-shadow: none;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
}

.tp-tarp-calculator__submit:disabled {
	cursor: wait;
	opacity: 0.68;
}

.tp-tarp-calculator__result {
	display: block;
	flex: 1 1 360px;
	min-width: 0;
	min-height: 100%;
	padding: 24px;
	color: #0b2e59;
	background: #eef5fc;
	border: 1px solid #b8cde3;
	border-radius: 8px;
	font-size: 16px;
	line-height: 1.55;
}

.tp-tarp-calculator__result.is-loading {
	display: flex;
	align-items: center;
}

.tp-tarp-calculator__result > p {
	margin: 0;
}

.tp-tarp-calculator__result.is-success {
	color: #0b2e59;
	background: #eef5fc;
	border-color: #b8cde3;
}

.tp-tarp-calculator__result.is-error {
	color: #8a1f1f;
	background: #fff1f1;
	border-color: #e4a7a7;
}

.tp-tarp-calculator__result-summary {
	color: #40566f;
	font-size: 15px;
	line-height: 1.5;
}

.tp-tarp-calculator__result-heading {
	margin-top: 12px !important;
	color: #0b2e59;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.4;
}

.tp-tarp-calculator__matches {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 14px;
	margin-top: 18px;
}

.tp-tarp-calculator__matches--exact {
	grid-template-columns: minmax(0, 1fr);
}

.tp-tarp-calculator__match-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 18px;
	background: #ffffff;
	border: 1px solid #b8cde3;
	border-radius: 8px;
	box-shadow: none;
}

.tp-tarp-calculator__match-card--exact {
	background: #ffffff;
	border-color: #8faecc;
}

.tp-tarp-calculator__match-card--larger {
	background: #f4f8fc;
	border-color: #0b2e59;
}

.tp-tarp-calculator__match-card--smaller {
	background: #fffaf3;
	border-color: #dec8aa;
}

.tp-tarp-calculator__match-type {
	margin: 0 0 8px;
	color: #e66f00;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.35;
}

.tp-tarp-calculator__match-card--smaller .tp-tarp-calculator__match-type {
	color: #8a5a20;
}

.tp-tarp-calculator__match-size {
	margin: 0;
	color: #0b2e59;
	font-family: inherit;
	font-size: clamp(21px, 2.5vw, 27px);
	font-weight: 700;
	line-height: 1.2;
}

.tp-tarp-calculator__match-details {
	display: grid;
	gap: 8px;
	margin: 16px 0 0;
}

.tp-tarp-calculator__match-detail {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 4px 12px;
	align-items: baseline;
}

.tp-tarp-calculator__match-detail dt,
.tp-tarp-calculator__match-detail dd {
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
}

.tp-tarp-calculator__match-detail dt {
	flex: 0 1 auto;
	color: #60758a;
}

.tp-tarp-calculator__match-detail dd {
	flex: 0 0 auto;
	min-width: 0;
	max-width: 100%;
	color: #0b2e59;
	font-weight: 600;
	text-align: right;
	overflow-wrap: normal;
	word-break: normal;
}

.tp-tarp-calculator__match-price,
.tp-tarp-calculator__match-detail:last-child dd {
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.tp-tarp-calculator__match-price .price,
.tp-tarp-calculator__match-price .woocommerce-Price-amount {
	color: inherit;
	font: inherit;
}

.tp-tarp-calculator__match-note {
	margin: 14px 0 0;
	padding-top: 12px;
	color: #40566f;
	border-top: 1px solid rgba(11, 46, 89, 0.14);
	font-size: 13px;
	line-height: 1.45;
}

.tp-tarp-calculator__match-card--smaller .tp-tarp-calculator__match-note {
	color: #77511f;
	border-top-color: rgba(119, 81, 31, 0.18);
}

.tp-tarp-calculator__match-actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	min-width: 0;
	margin-top: auto;
	padding-top: 16px;
}

.tp-tarp-calculator__cart-form {
	width: 100%;
	min-width: 0;
	margin: 0;
}

.tp-tarp-calculator__cart-button {
	display: inline-flex;
	width: 100%;
	min-width: 0;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 10px 16px;
	cursor: pointer;
	touch-action: manipulation;
	color: #ffffff;
	background: #ff7a00;
	border: 1px solid #ff7a00;
	border-radius: 7px;
	box-shadow: none;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
}

.tp-tarp-calculator__cart-button:disabled {
	cursor: wait;
	opacity: 0.68;
}

.tp-tarp-calculator__match-card--smaller .tp-tarp-calculator__cart-button {
	color: #0b2e59;
	background: #ffffff;
	border-color: #c9a875;
}

.tp-tarp-calculator__product-link,
.tp-tarp-calculator__product-link:link,
.tp-tarp-calculator__product-link:visited {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	padding: 8px 10px;
	color: #0b2e59;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	text-align: center;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.tp-tarp-calculator__cart-feedback {
	display: grid;
	gap: 8px;
	min-width: 0;
	padding: 12px;
	border: 1px solid transparent;
	border-radius: 6px;
	font-size: 14px;
	line-height: 1.45;
}

.tp-tarp-calculator__cart-feedback[hidden] {
	display: none;
}

.tp-tarp-calculator__cart-feedback--success {
	color: #285b3a;
	background: #f1f8f3;
	border-color: #a9cfb5;
}

.tp-tarp-calculator__cart-feedback--error {
	color: #7a2525;
	background: #fff4f4;
	border-color: #dfb0b0;
}

.tp-tarp-calculator__view-cart,
.tp-tarp-calculator__view-cart:link,
.tp-tarp-calculator__view-cart:visited {
	display: inline-flex;
	width: fit-content;
	max-width: 100%;
	min-height: 44px;
	align-items: center;
	padding: 8px 12px;
	color: #0b2e59;
	background: #ffffff;
	border: 1px solid #7fac8d;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
}

.tp-tarp-calculator__missing-match {
	display: flex;
	min-height: 120px;
	align-items: center;
	margin: 0;
	padding: 18px;
	color: #60758a;
	background: #ffffff;
	border: 1px dashed #b8cde3;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.5;
}

.tp-tarp-calculator__empty-message {
	margin-top: 18px !important;
	padding: 16px;
	color: #40566f;
	background: #ffffff;
	border: 1px solid #d8e2ec;
	border-radius: 8px;
	font-size: 15px;
	line-height: 1.5;
}

.tp-tarp-calculator--notice {
	padding: 16px 18px;
	box-shadow: none;
}

.tp-tarp-calculator--notice p {
	margin: 0;
}

@media (hover: hover) and (pointer: fine) {
	.tp-tarp-calculator__submit:hover:not(:disabled) {
		color: #ffffff;
		background: #e66f00;
		border-color: #e66f00;
	}

	.tp-tarp-calculator__cart-button:hover:not(:disabled) {
		color: #ffffff;
		background: #e66f00;
		border-color: #e66f00;
	}

	.tp-tarp-calculator__match-card--smaller .tp-tarp-calculator__cart-button:hover:not(:disabled) {
		color: #0b2e59;
		background: #fff5e8;
		border-color: #b98d51;
	}

	.tp-tarp-calculator__product-link:hover {
		color: #e66f00;
	}

	.tp-tarp-calculator__view-cart:hover {
		color: #0b2e59;
		background: #e8f4ec;
		border-color: #5f9570;
	}
}

@media (max-width: 767px) {
	.tp-tarp-calculator {
		padding: 20px;
	}

	.tp-tarp-calculator__form {
		grid-template-columns: minmax(0, 1fr);
	}

	.tp-tarp-calculator__field--wide,
	.tp-tarp-calculator__hint,
	.tp-tarp-calculator__actions {
		grid-column: auto;
	}

	.tp-tarp-calculator__submit {
		width: 100%;
	}

	.tp-tarp-calculator__result {
		min-height: 140px;
		padding: 18px;
	}

	.tp-tarp-calculator__matches {
		grid-template-columns: minmax(0, 1fr);
	}

}
