/* Aktionsersparnis im Warenkorb. Eigenes Stylesheet, damit kein Theme-Rebuild nötig ist. */

.lw-unit-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: 6px;
	row-gap: 2px;
}

.lw-price-statt {
	color: #9a9a9a;
	font-size: 13px;
	font-weight: 400;
}

.lw-price-was,
.lw-price-was .woocommerce-Price-amount {
	color: #9a9a9a;
	font-size: 13px;
	font-weight: 400;
	text-decoration: line-through;
}

.woocommerce .woocommerce-cart-form .lw-price-was .woocommerce-Price-amount:after,
.woocommerce .woocommerce-cart-form .lw-cart-save .woocommerce-Price-amount:after {
	content: none;
}

.lw-price-badge {
	display: inline-flex;
	align-items: center;
	margin-left: 6px;
	padding: 2px 6px;
	border-radius: 4px;
	background: #f59100;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	vertical-align: middle;
}

.lw-unit-price .woocommerce-Price-amount {
	font-weight: 700;
}

.lw-unit-price .lw-price-was .woocommerce-Price-amount {
	font-weight: 400;
}

.lw-cart-buyrow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	clear: both;
}

.lw-cart-save {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 6px 12px 6px 8px;
	border-radius: 999px;
	background: #e7f6e1;
	color: #2f9e44;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
}

.lw-cart-save__check {
	display: block;
	flex-shrink: 0;
}

.lw-cart-save .woocommerce-Price-amount {
	color: #2f9e44;
	font-weight: 700;
}

td.product-subtotal .lw-line-compare {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	text-align: right;
}

td.product-subtotal .lw-line-compare__meta {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
}

td.product-subtotal .lw-price-now,
td.product-subtotal .lw-price-now .woocommerce-Price-amount {
	color: #f59100;
	font-weight: 700;
}

.woocommerce table.cart td.product-subtotal {
	text-align: right;
}

@media (min-width: 769px) {
	.product-price .lw-price-badge {
		display: none;
	}
}

@media (max-width: 768px) {
	.product-price {
		text-align: right;
	}

	.product-price .lw-unit-price {
		justify-content: flex-end;
	}

	td.product-subtotal .lw-price-badge {
		display: none;
	}

	td.product-subtotal .lw-line-compare {
		flex-direction: row;
		align-items: baseline;
		gap: 8px;
	}

	td.product-subtotal .lw-line-compare__meta {
		order: -1;
	}

	.lw-cart-buyrow {
		justify-content: space-between;
		width: 100%;
	}

	.lw-cart-save {
		order: -1;
	}
}

.lw-cart-savings-banner {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	margin: 0 0 12px;
	padding: 12px 14px;
	border-radius: 8px;
	background: #e8f6e3;
	color: #2f9e44;
	text-align: left;
}

.lw-cart-savings-banner__text {
	display: flex;
	flex: 1;
	flex-direction: column;
	line-height: 1.25;
}

.lw-cart-savings-banner__text strong {
	font-size: 15px;
	font-weight: 700;
}

.lw-cart-savings-banner__text small {
	font-size: 12px;
	font-weight: 500;
}

.lw-cart-savings-banner__amount,
.lw-cart-savings-banner__amount .woocommerce-Price-amount {
	color: #2f9e44;
	font-size: 20px;
	font-weight: 700;
	white-space: nowrap;
}

@media (max-width: 768px) {
	/* WooCommerce stellt Tabellenzellen auf dem Handy wieder auf display:block.
	   Der Update-Button bleibt im Markup, weil die Mengenänderung ihn unsichtbar auslöst. */
	.woocommerce-cart-form tr.actions,
	.woocommerce-cart-form td.actions,
	.woocommerce table.shop_table_responsive tr.cart-delivery-row,
	.woocommerce table.shop_table_responsive tr.cart-delivery-row td {
		display: none !important;
	}
}
