/**

 * WooCommerce / theme compatibility fixes (cart, checkout).

 */



/* Checkout totals: hide redundant subtotal row */

body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.cart-subtotal,

body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.cart-subtotal th,

body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.cart-subtotal td,

body.woocommerce-cart .woocommerce .cart_totals tr.cart-subtotal,

body.woocommerce-cart .woocommerce .cart_totals tr.cart-subtotal th,

body.woocommerce-cart .woocommerce .cart_totals tr.cart-subtotal td {

	display: none !important;

}



.woocommerce-cart .woocommerce,

.woocommerce-cart .woocommerce-cart-form,

.woocommerce-cart .cart-collaterals,

.woocommerce-cart .cart_totals {

	max-height: none !important;

	height: auto !important;

	overflow: visible !important;

}



#wc-yookassa_widget-new-payment-method {

	width: 16px !important;

	min-width: 16px !important;

	max-width: 16px !important;

	height: 16px !important;

	min-height: 16px !important;

	max-height: 16px !important;

	aspect-ratio: 1 / 1;

	flex: 0 0 16px;

	box-sizing: border-box;

	appearance: auto;

	-webkit-appearance: checkbox;

}



/* ========== Classic cart (shop_table) — booking lines ========== */

body.bron-cart-has-bookings.woocommerce-cart table.shop_table.cart th.product-quantity,

body.bron-cart-has-bookings.woocommerce-cart table.shop_table.cart th.product-remove,

body.bron-cart-has-bookings.woocommerce-cart table.shop_table.cart th.product-subtotal,

body.bron-cart-has-bookings.woocommerce-cart table.shop_table.cart tr.cart_item td.product-quantity,

body.bron-cart-has-bookings.woocommerce-cart table.shop_table.cart tr.cart_item td.product-remove,

body.bron-cart-has-bookings.woocommerce-cart table.shop_table.cart tr.cart_item td.product-subtotal,

tr.bron-booking-cart-item td.product-quantity,

tr.bron-booking-cart-item td.product-remove,

tr.bron-booking-cart-item td.product-subtotal {

	display: none !important;

}



tr.bron-booking-cart-item td.product-name .quantity,

tr.bron-booking-cart-item td.product-name > .product-price,

tr.bron-booking-cart-item td.product-name > .woocommerce-Price-amount,

tr.bron-booking-cart-item td.product-name > .amount {

	display: none !important;

}



body.bron-cart-has-bookings.woocommerce-cart table.shop_table.cart td.product-name,

body.bron-cart-has-bookings.woocommerce-cart table.shop_table.cart th.product-name {

	width: 72% !important;

	vertical-align: middle !important;

}



body.bron-cart-has-bookings.woocommerce-cart table.shop_table.cart td.product-price,

body.bron-cart-has-bookings.woocommerce-cart table.shop_table.cart th.product-price {

	display: table-cell !important;

	width: 28% !important;

	text-align: right !important;

	vertical-align: middle !important;

}



tr.bron-booking-cart-item > td {

	vertical-align: middle !important;

}



.woocommerce td.product-name:has(.bron-booking-cart-marker) {

	display: flex !important;

	flex-wrap: nowrap;

	align-items: center;

	gap: 8px 12px;

}



.woocommerce td.product-name:has(.bron-booking-cart-marker) > *:not(.bron-booking-remove):not(.bron-cart-item-title):not(.bron-booking-cart-marker) {

	display: none !important;

}



.woocommerce td.product-name:has(.bron-booking-cart-marker) a.bron-booking-remove {

	order: -1;

	flex: 0 0 auto;

	display: inline-flex !important;

	align-items: center;

	justify-content: center;

	width: 1.5rem;

	height: 1.5rem;

	margin: 0 !important;

	color: var(--bron-muted);

	font-size: 1.35rem;

	text-decoration: none !important;

}



.woocommerce .bron-cart-item-title {

	display: inline-flex;

	align-items: center;

	flex: 1 1 auto;

	min-width: 0;

	gap: 6px;

}



/* ========== Block cart / checkout order summary — booking lines ========== */

.wc-block-cart-items__row.bron-booking-cart-item .wc-block-cart-item__prices,

.wc-block-cart-items__row.bron-booking-cart-item .wc-block-components-quantity-selector,

.wc-block-cart-items__row.bron-booking-cart-item .wc-block-components-product-metadata,

.wc-block-components-order-summary-item.bron-booking-cart-item .wc-block-components-quantity-selector,

.wc-block-components-order-summary-item.bron-booking-cart-item .wc-block-components-order-summary-item__description .wc-block-components-product-price {

	display: none !important;

}



.wc-block-cart-items__row.bron-booking-cart-item .wc-block-cart-item__wrap {

	display: flex !important;

	flex-direction: row !important;

	flex-wrap: nowrap !important;

	align-items: center !important;

	gap: 8px 12px;

}



.wc-block-cart-items__row.bron-booking-cart-item .wc-block-cart-item__quantity {

	order: -1 !important;

	display: flex !important;

	align-items: center !important;

	margin: 0 !important;

	padding: 0 !important;

}



.wc-block-cart-items__row.bron-booking-cart-item .wc-block-components-product-name {

	flex: 1 1 auto;

	min-width: 0;

}



.wc-block-cart-items__row.bron-booking-cart-item .wc-block-components-product-name .bron-slot-expiry {

	display: inline-flex;

	vertical-align: middle;

	margin-left: 6px;

}



table.wc-block-cart-items tr.wc-block-cart-items__row.bron-booking-cart-item > td {

	display: table-cell !important;

	vertical-align: middle !important;

}



table.wc-block-cart-items tr.wc-block-cart-items__row.bron-booking-cart-item > td.wc-block-cart-item__total {

	text-align: right !important;

	white-space: nowrap !important;

}



table.wc-block-cart-items tr.wc-block-cart-items__row.bron-booking-cart-item td.wc-block-cart-item__total .wc-block-cart-item__total-price-and-sale-badge-wrapper {

	display: inline-flex !important;

	flex-direction: row !important;

	align-items: center !important;

	justify-content: flex-end !important;

}



.wc-block-components-order-summary-item.bron-booking-cart-item {

	align-items: center !important;

}

/* Bron theme — checkout / cart primary buttons */
body.woocommerce-cart .checkout-button.button,
body.woocommerce-checkout #place_order,
body.woocommerce-checkout .woocommerce-checkout-payment .button,
.woocommerce-mini-cart__buttons .button.checkout {
	background-color: var(--bron-cta) !important;
	border-color: var(--bron-cta) !important;
	color: var(--bron-bg) !important;
}

body.woocommerce-cart .checkout-button.button:hover,
body.woocommerce-checkout #place_order:hover,
body.woocommerce-checkout .woocommerce-checkout-payment .button:hover,
.woocommerce-mini-cart__buttons .button.checkout:hover {
	background-color: var(--bron-cta-hover) !important;
	border-color: var(--bron-cta-hover) !important;
	color: var(--bron-bg) !important;
}

body.woocommerce-checkout a,
body.woocommerce-cart a {
	color: var(--bron-link);
}

body.woocommerce-checkout a:hover,
body.woocommerce-cart a:hover {
	color: var(--bron-link-hover);
}

