/*
 * quad.com.hr: CWS Suite cart in Shoptimizer's clothes.
 * The drawer carries Shoptimizer's / WooCommerce's classes, so the theme CSS does the styling.
 * This file only takes the CWS Suite layout rules (cws-suite-woocommerce.css) back out where they
 * land on the same elements. Loads after cws-suite-woocommerce.css.
 */

/* CWS shell boxes: gone. They stay in the DOM for the CWS script. visibility and
   pointer-events are inherited, so put them back for the panel inside. */
.quad-cws-drawer.cws-cart-wrap {
	display: contents;
	visibility: visible;
	pointer-events: auto;
}

.quad-cws-drawer .cws-cart-content,
.quad-cws-drawer .cws-cart-items-wrap,
.quad-cws-drawer .cws-minicart-item-wrap,
.quad-cws-drawer .minicart-value {
	display: contents;
}

/* .minicart-total-data sets font-size 18px (inherited) and a flex box. */
.quad-cws-drawer .minicart-total-data {
	display: contents;
	font-size: inherit;
}

/* Remove link: CWS draws a red 20px disc here; Shoptimizer draws a small grey "x". */
.quad-cws-drawer .mini_cart_item a.remove.cws-remove-from-cart,
.quad-cws-drawer .mini_cart_item a.remove.cws-remove-from-cart:hover {
	width: auto;
	height: auto;
	padding: 0;
	background: none;
	border-radius: 0;
	transition: none;
}

/* Empty cart: the CWS script prints <div class="cws-suite empty-cart-notice"><p>…</p></div>;
   cws-cart.js gives the <p> WooCommerce's class. Hide the total and buttons like WooCommerce does. */
.quad-cws-drawer .cws-suite.empty-cart-notice {
	display: contents;
}

.quad-cws-drawer.is-empty .woocommerce-mini-cart__total,
.quad-cws-drawer.is-empty .woocommerce-mini-cart__buttons {
	display: none;
}

.quad-cws-drawer.is-empty ul.woocommerce-mini-cart {
	box-shadow: none;
	padding-right: 0; /* WooCommerce prints the empty message outside the list: keep its full width */
}

/* Header trigger: CWS gives .cws-minicart-wrap a gap / min-width and the total a 70px min-width. */
.site-header-cart .cart-click.cws-minicart-wrap {
	gap: normal;
	min-width: auto;
}

.site-header-cart .cws-minicart-wrap .cws-cart-totals {
	min-width: auto;
}

.site-header-cart .cws-minicart-wrap .cws-cart-totals .amount {
	color: inherit;
}
