/*
 * COYOTE Cart Totals First Paint Fix v1.1.52
 *
 * Scope:
 * - WooCommerce cart page totals table only.
 * - Stabilizes the first paint state when shipping/tax rows are present.
 *
 * Responsibility:
 * - This is child-theme territory because the cart totals table is standard
 *   WooCommerce markup, not a delivery-calendar UI component.
 *
 * Spacing rule:
 * - Table/card outer separation: margin.
 * - Row inner spacing: padding.
 * - Row column separation: gap.
 */

body.woocommerce-cart .cc-page-main .woocommerce .cart-collaterals,
body.woocommerce-cart .site-main .woocommerce .cart-collaterals,
body.woocommerce-cart #content .woocommerce .cart-collaterals {
	display: flex !important;
	justify-content: flex-end !important;
	width: 100% !important;
	max-width: 100% !important;
}

body.woocommerce-cart .cc-page-main .woocommerce .cart-collaterals .cart_totals,
body.woocommerce-cart .site-main .woocommerce .cart-collaterals .cart_totals,
body.woocommerce-cart #content .woocommerce .cart-collaterals .cart_totals {
	float: none !important;
	clear: both !important;
	width: min(100%, 34rem) !important;
	max-width: min(100%, 34rem) !important;
	margin: 0 !important;
}

body.woocommerce-cart .cc-page-main .woocommerce .cart_totals table.shop_table,
body.woocommerce-cart .site-main .woocommerce .cart_totals table.shop_table,
body.woocommerce-cart #content .woocommerce .cart_totals table.shop_table {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	border-collapse: separate !important;
	border-spacing: 0 !important;
	table-layout: fixed !important;
	overflow: hidden !important;
}

body.woocommerce-cart .cc-page-main .woocommerce .cart_totals table.shop_table tbody,
body.woocommerce-cart .site-main .woocommerce .cart_totals table.shop_table tbody,
body.woocommerce-cart #content .woocommerce .cart_totals table.shop_table tbody {
	display: block !important;
	width: 100% !important;
}

body.woocommerce-cart .cc-page-main .woocommerce .cart_totals table.shop_table tr,
body.woocommerce-cart .site-main .woocommerce .cart_totals table.shop_table tr,
body.woocommerce-cart #content .woocommerce .cart_totals table.shop_table tr {
	display: grid !important;
	grid-template-columns: minmax(8.25rem, 30%) minmax(0, 1fr) !important;
	align-items: start !important;
	gap: 12px !important;
	width: 100% !important;
	min-width: 0 !important;
	padding: 16px 18px !important;
	border-bottom: 1px solid rgba(39, 34, 23, 0.14) !important;
}

body.woocommerce-cart .cc-page-main .woocommerce .cart_totals table.shop_table tr:last-child,
body.woocommerce-cart .site-main .woocommerce .cart_totals table.shop_table tr:last-child,
body.woocommerce-cart #content .woocommerce .cart_totals table.shop_table tr:last-child {
	border-bottom: 0 !important;
}

body.woocommerce-cart .cc-page-main .woocommerce .cart_totals table.shop_table th,
body.woocommerce-cart .site-main .woocommerce .cart_totals table.shop_table th,
body.woocommerce-cart #content .woocommerce .cart_totals table.shop_table th,
body.woocommerce-cart .cc-page-main .woocommerce .cart_totals table.shop_table td,
body.woocommerce-cart .site-main .woocommerce .cart_totals table.shop_table td,
body.woocommerce-cart #content .woocommerce .cart_totals table.shop_table td {
	display: block !important;
	float: none !important;
	clear: none !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	line-height: 1.7 !important;
	vertical-align: top !important;
	box-sizing: border-box !important;
}

body.woocommerce-cart .cc-page-main .woocommerce .cart_totals table.shop_table th,
body.woocommerce-cart .site-main .woocommerce .cart_totals table.shop_table th,
body.woocommerce-cart #content .woocommerce .cart_totals table.shop_table th {
	white-space: nowrap !important;
	word-break: keep-all !important;	overflow-wrap: normal !important;
	writing-mode: horizontal-tb !important;
	text-orientation: mixed !important;
	text-align: left !important;
}

body.woocommerce-cart .cc-page-main .woocommerce .cart_totals table.shop_table td,
body.woocommerce-cart .site-main .woocommerce .cart_totals table.shop_table td,
body.woocommerce-cart #content .woocommerce .cart_totals table.shop_table td {
	text-align: right !important;
	white-space: normal !important;
	word-break: normal !important;
	overflow-wrap: anywhere !important;
}

body.woocommerce-cart .cc-page-main .woocommerce .cart_totals table.shop_table td::before,
body.woocommerce-cart .site-main .woocommerce .cart_totals table.shop_table td::before,
body.woocommerce-cart #content .woocommerce .cart_totals table.shop_table td::before {
	content: none !important;
	display: none !important;
	visibility: hidden !important;
}

body.woocommerce-cart .cc-page-main .woocommerce .cart_totals .woocommerce-shipping-methods,
body.woocommerce-cart .site-main .woocommerce .cart_totals .woocommerce-shipping-methods,
body.woocommerce-cart #content .woocommerce .cart_totals .woocommerce-shipping-methods {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

body.woocommerce-cart .cc-page-main .woocommerce .cart_totals .woocommerce-shipping-methods li,
body.woocommerce-cart .site-main .woocommerce .cart_totals .woocommerce-shipping-methods li,
body.woocommerce-cart #content .woocommerce .cart_totals .woocommerce-shipping-methods li {
	margin: 0 !important;
	padding: 0 !important;
}

body.woocommerce-cart .cc-page-main .woocommerce .cart_totals .woocommerce-shipping-methods label,
body.woocommerce-cart .site-main .woocommerce .cart_totals .woocommerce-shipping-methods label,
body.woocommerce-cart #content .woocommerce .cart_totals .woocommerce-shipping-methods label,
body.woocommerce-cart .cc-page-main .woocommerce .cart_totals .woocommerce-Price-amount,
body.woocommerce-cart .site-main .woocommerce .cart_totals .woocommerce-Price-amount,
body.woocommerce-cart #content .woocommerce .cart_totals .woocommerce-Price-amount {
	white-space: nowrap !important;
}

body.woocommerce-cart .cc-page-main .woocommerce .cart_totals .woocommerce-shipping-destination,
body.woocommerce-cart .site-main .woocommerce .cart_totals .woocommerce-shipping-destination,
body.woocommerce-cart #content .woocommerce .cart_totals .woocommerce-shipping-destination {
	max-width: 100% !important;
	margin: 8px 0 0 !important;
	font-size: 0.92em !important;
	line-height: 1.7 !important;
	text-align: right !important;
	white-space: normal !important;
	word-break: keep-all !important;
	overflow-wrap: anywhere !important;
}

body.woocommerce-cart .cc-page-main .woocommerce .cart_totals .woocommerce-shipping-calculator,
body.woocommerce-cart .site-main .woocommerce .cart_totals .woocommerce-shipping-calculator,
body.woocommerce-cart #content .woocommerce .cart_totals .woocommerce-shipping-calculator {
	margin: 8px 0 0 !important;
	text-align: right !important;
}

body.woocommerce-cart .cc-page-main .woocommerce .cart_totals .shipping-calculator-button,
body.woocommerce-cart .site-main .woocommerce .cart_totals .shipping-calculator-button,
body.woocommerce-cart #content .woocommerce .cart_totals .shipping-calculator-button {
	display: inline-flex !important;
	align-items: center !important;
	gap: 0.25rem !important;
	white-space: nowrap !important;
}

@media (max-width: 767px) {
	body.woocommerce-cart .cc-page-main .woocommerce .cart-collaterals,
	body.woocommerce-cart .site-main .woocommerce .cart-collaterals,
	body.woocommerce-cart #content .woocommerce .cart-collaterals {
		display: block !important;
	}

	body.woocommerce-cart .cc-page-main .woocommerce .cart-collaterals .cart_totals,
	body.woocommerce-cart .site-main .woocommerce .cart-collaterals .cart_totals,
	body.woocommerce-cart #content .woocommerce .cart-collaterals .cart_totals {
		width: 100% !important;
		max-width: 100% !important;
	}

	body.woocommerce-cart .cc-page-main .woocommerce .cart_totals table.shop_table tr,
	body.woocommerce-cart .site-main .woocommerce .cart_totals table.shop_table tr,
	body.woocommerce-cart #content .woocommerce .cart_totals table.shop_table tr {
		grid-template-columns: minmax(6rem, 30%) minmax(0, 1fr) !important;
		gap: 10px !important;
		padding: 14px 15px !important;
	}

	body.woocommerce-cart .cc-page-main .woocommerce .cart_totals table.shop_table th,
	body.woocommerce-cart .site-main .woocommerce .cart_totals table.shop_table th,
	body.woocommerce-cart #content .woocommerce .cart_totals table.shop_table th {
		white-space: normal !important;
		overflow-wrap: anywhere !important;
	}
}

@media (max-width: 420px) {
	body.woocommerce-cart .cc-page-main .woocommerce .cart_totals table.shop_table tr,
	body.woocommerce-cart .site-main .woocommerce .cart_totals table.shop_table tr,
	body.woocommerce-cart #content .woocommerce .cart_totals table.shop_table tr {
		grid-template-columns: 1fr !important;
	}

	body.woocommerce-cart .cc-page-main .woocommerce .cart_totals table.shop_table td,
	body.woocommerce-cart .site-main .woocommerce .cart_totals table.shop_table td,
	body.woocommerce-cart #content .woocommerce .cart_totals table.shop_table td,
	body.woocommerce-cart .cc-page-main .woocommerce .cart_totals .woocommerce-shipping-destination,
	body.woocommerce-cart .site-main .woocommerce .cart_totals .woocommerce-shipping-destination,
	body.woocommerce-cart #content .woocommerce .cart_totals .woocommerce-shipping-destination,
	body.woocommerce-cart .cc-page-main .woocommerce .cart_totals .woocommerce-shipping-calculator,
	body.woocommerce-cart .site-main .woocommerce .cart_totals .woocommerce-shipping-calculator,
	body.woocommerce-cart #content .woocommerce .cart_totals .woocommerce-shipping-calculator {
		text-align: left !important;
	}
}
