/*
 * SmartWatt cart page — styles that ship WITH this plugin's cart markup, so the
 * WhatsApp order button always renders on brand even if the theme's woo.css is
 * a version behind. Enqueued from SmartWatt_WA_Order::enqueue_cart_assets().
 *
 * The button intentionally carries NO WooCommerce `button` class, so it is not
 * captured by the theme's blue `.woocommerce a.button` rule.
 */

/* WhatsApp order button in the cart summary — brand green, WhatsApp glyph,
   matching the sticky bar and mini-cart drawer. */
.swcs-wa-cart-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .55rem;
	width: 100%;
	margin-top: .75rem;
	padding: .85rem 1.25rem;
	background: #25d366 !important;
	color: #fff !important;
	border: 0;
	border-radius: .5rem;
	font-family: 'Golos Text', system-ui, sans-serif;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: background .2s ease, transform .05s ease;
}

.swcs-wa-cart-btn:hover,
.swcs-wa-cart-btn:focus-visible {
	background: #1ebe5d !important;
	color: #fff !important;
}

.swcs-wa-cart-btn:active {
	transform: translateY(1px);
}

.swcs-wa-cart-btn svg {
	width: 1.2rem;
	height: 1.2rem;
	flex: none;
	fill: currentColor;
}

/* ── Mobile: keep the app card layout for cart items. ──────────────────────
   WooCommerce's `shop_table_responsive` CSS (≤768px) otherwise stacks every
   cell with a "Товар: / Цена: / Подытог:" pseudo-label, right-aligns it, and
   drops the product image. We re-assert the two-column card grid (image left,
   name / stepper / subtotal right) and strip those labels. `!important` beats
   WooCommerce core's non-important responsive rules regardless of load order. */
@media (max-width: 768px) {
	.woocommerce-cart-form__cart-item {
		display: grid !important;
		grid-template-columns: 5rem 1fr;
		column-gap: .85rem;
		row-gap: .2rem;
		align-items: start;
	}
	.woocommerce-cart-form__cart-item td {
		display: block !important;
		float: none !important;
		width: auto !important;
		text-align: left !important;
	}
	/* Drop WooCommerce's "Товар: / Цена: / Количество: / Подытог:" labels. */
	.woocommerce-cart-form__cart-item td::before {
		content: none !important;
		display: none !important;
	}
	.woocommerce-cart-form__cart-item .product-thumbnail {
		display: block !important;
		grid-column: 1;
		grid-row: 1 / span 3;
	}
	.woocommerce-cart-form__cart-item .product-thumbnail img {
		width: 5rem !important;
		height: 5rem;
	}
	.woocommerce-cart-form__cart-item .product-name {
		grid-column: 2;
		grid-row: 1;
		padding-right: 1.5rem;
	}
	.woocommerce-cart-form__cart-item .product-price {
		display: none !important;
	}
	.woocommerce-cart-form__cart-item .product-quantity {
		grid-column: 2;
		grid-row: 2;
		margin-top: .5rem;
	}
	.woocommerce-cart-form__cart-item .product-subtotal {
		grid-column: 2;
		grid-row: 3;
		margin-top: .4rem;
		text-align: left !important;
	}
	/* WooCommerce shades every 2nd responsive-table row grey on mobile; the
	   summary "Итого" row and the item cells should stay clean white. */
	.woocommerce-cart-form__cart-item td,
	.cart_totals table.shop_table tr td,
	.cart_totals table.shop_table tr th {
		background: transparent !important;
	}
}
