/**
 * Brightline: cart and checkout pages.
 * Two columns from 850px up (7/5 split), stacked on phones.
 * Loaded only on the cart and checkout pages, after WooCommerce's own styles.
 */

/* ---------------------------------------------------------------------------
 * Cart: layout
 * ------------------------------------------------------------------------- */
.bl-cart-layout { display: block; }
@media (min-width: 850px) {
	.bl-cart-layout {
		display: grid;
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: 0 40px;
		align-items: start;
	}
	.bl-cart-layout > * { grid-column: 1; }
	.woocommerce .bl-cart-layout > .cart-collaterals {
		grid-column: 2;
		grid-row: 1 / span 20;
		padding-left: 30px;
		border-left: 1px solid rgba(0, 0, 0, .08);
	}
}
.woocommerce .bl-cart-layout .cart-collaterals { width: auto; float: none; }
.woocommerce .bl-cart-layout .cart-collaterals::before,
.woocommerce .bl-cart-layout .cart-collaterals::after { display: none; }
.woocommerce-page .bl-cart-layout .cart-collaterals .cart_totals,
.woocommerce .bl-cart-layout .cart-collaterals .cart_totals { float: none; width: 100%; }
@media (max-width: 849px) {
	.woocommerce .bl-cart-layout > .cart-collaterals { margin-top: 2em; }
}

/* ---------------------------------------------------------------------------
 * Cart: product table
 * ------------------------------------------------------------------------- */
.woocommerce-cart .bl-cart-layout table.shop_table.cart { border: 0; border-radius: 0; margin: 0 0 1.5em; border-collapse: collapse; }
.woocommerce-cart .bl-cart-layout table.shop_table.cart th {
	padding: .6em .5em; border: 0; border-bottom: 3px solid rgba(0, 0, 0, .08);
	font-size: .9em; letter-spacing: .03em; text-transform: uppercase; font-weight: 700;
}
.woocommerce-cart .bl-cart-layout table.shop_table.cart td {
	padding: 1em .5em; border: 0; border-bottom: 1px solid rgba(0, 0, 0, .08); vertical-align: middle;
}
.woocommerce-cart .bl-cart-layout table.shop_table.cart td.product-thumbnail img { width: 90px; max-width: none; height: auto; }
.woocommerce-cart .bl-cart-layout table.shop_table.cart td.product-name a { font-weight: 700; }
.woocommerce-cart .bl-cart-layout table.shop_table.cart td.product-name dl.variation,
.woocommerce-cart .bl-cart-layout table.shop_table.cart td.product-name .wc-item-meta { margin: .4em 0 0; font-size: .85em; opacity: .75; }
.woocommerce-cart .bl-cart-layout table.shop_table.cart td.product-name dl.variation dt { float: left; clear: both; margin: 0 .25em 0 0; font-weight: 400; }
.woocommerce-cart .bl-cart-layout table.shop_table.cart td.product-name dl.variation dd { margin: 0; }
.woocommerce-cart .bl-cart-layout table.shop_table.cart td.product-name dl.variation::after { content: ""; display: table; clear: both; }
.woocommerce-cart .bl-cart-layout table.shop_table.cart td.product-name dl.variation dd p { margin: 0; }
.woocommerce-cart .bl-cart-layout table.shop_table.cart td.product-subtotal,
.woocommerce-cart .bl-cart-layout table.shop_table.cart th.product-subtotal { text-align: right; }

/* Remove (x) as a small outlined circle */
.woocommerce-cart .bl-cart-layout table.cart td.product-remove a.remove {
	display: inline-flex; align-items: center; justify-content: center;
	width: 24px; height: 24px; border: 2px solid currentColor; border-radius: 50%;
	color: var(--bl-link, var(--wp--preset--color--primary)) !important; font-size: 18px; line-height: 1; font-weight: 400;
	opacity: .6; transition: opacity .2s, background .2s;
}
.woocommerce-cart .bl-cart-layout table.cart td.product-remove a.remove:hover { opacity: 1; background: transparent; }

/* Actions row (coupon + update button) */
.woocommerce-cart .bl-cart-layout table.cart td.actions { padding: 1em 0; border-bottom: 0; }
.bl-coupon-sidebar .woocommerce-cart-form td.actions .coupon { display: none; }
.bl-coupon-sidebar .woocommerce-cart-form td.actions > .button { float: left; }
.bl-cart-autorefresh .woocommerce-cart-form [name="update_cart"] { display: none !important; }
.bl-coupon-sidebar.bl-cart-autorefresh .woocommerce-cart-form td.actions { padding: 0; }

/* Continue shopping */
.bl-cart-continue { margin: 0 0 1.5em; }
.woocommerce .bl-cart-continue .button.bl-button-outline {
	background: transparent; color: inherit; border: 2px solid currentColor; font-weight: 700;
}
.woocommerce .bl-cart-continue .button.bl-button-outline:hover { background: var(--wp--preset--color--dark, #222); border-color: var(--wp--preset--color--dark, #222); color: #fff; }

/* ---------------------------------------------------------------------------
 * Cart: totals column
 * ------------------------------------------------------------------------- */
.woocommerce .bl-cart-layout .cart_totals h2 {
	margin: 0 0 .5em; padding-bottom: .5em; border-bottom: 3px solid rgba(0, 0, 0, .08);
	font-size: .9em; letter-spacing: .03em; text-transform: uppercase;
}
.woocommerce .bl-cart-layout .cart_totals table.shop_table { border: 0; border-radius: 0; margin: 0 0 1.5em; border-collapse: collapse; }
.woocommerce .bl-cart-layout .cart_totals table.shop_table th,
.woocommerce .bl-cart-layout .cart_totals table.shop_table td {
	padding: .75em 0; border: 0; border-bottom: 1px solid rgba(0, 0, 0, .08); background: transparent;
}
.woocommerce .bl-cart-layout .cart_totals table.shop_table th { width: auto; font-weight: 400; }
.woocommerce .bl-cart-layout .cart_totals table.shop_table td { text-align: right; }
.woocommerce .bl-cart-layout .cart_totals table.shop_table tr.order-total th,
.woocommerce .bl-cart-layout .cart_totals table.shop_table tr.order-total td { font-weight: 700; border-bottom-width: 3px; }
.woocommerce .bl-cart-layout .cart_totals #shipping_method { text-align: right; }
.woocommerce .bl-cart-layout .wc-proceed-to-checkout { padding: 0 0 1em; }
.woocommerce .bl-cart-layout .wc-proceed-to-checkout a.checkout-button { display: flex; justify-content: center; text-align: center; width: 100%; margin-bottom: .75em; font-size: 1.1em; }

/* Coupon box in the totals column */
.bl-cart-coupon { margin: 1em 0 0; }
.bl-cart-coupon__title {
	display: flex; align-items: center; gap: .4em;
	margin: 0 0 .75em; padding-bottom: .5em; border-bottom: 3px solid rgba(0, 0, 0, .08);
	font-size: 1em;
}
.bl-cart-coupon__icon { opacity: .5; }
.woocommerce .bl-cart-coupon .input-text { display: block; width: 100%; margin: 0 0 .75em; padding: .7em .8em; }
.woocommerce .bl-cart-coupon .button { display: block; width: 100%; background: rgba(0, 0, 0, .05); color: inherit; border-color: rgba(0, 0, 0, .1); }
.woocommerce .bl-cart-coupon .button:hover { background: var(--wp--preset--color--dark, #222); border-color: var(--wp--preset--color--dark, #222); color: #fff; }

/* ---------------------------------------------------------------------------
 * Checkout: layout
 * ------------------------------------------------------------------------- */
@media (min-width: 850px) {
	.bl-checkout-2col form.checkout {
		display: grid;
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: 0 40px;
		align-items: start;
	}
	.bl-checkout-2col form.checkout::before,
	.bl-checkout-2col form.checkout::after { display: none; }
	.bl-checkout-2col form.checkout > * { grid-column: 1 / -1; }
	.bl-checkout-2col form.checkout > .bl-checkout-main { grid-column: 1; }
	.bl-checkout-2col form.checkout > .bl-checkout-sidebar { grid-column: 2; }
}
.bl-checkout-2col .bl-checkout-main .col2-set .col-1,
.bl-checkout-2col .bl-checkout-main .col2-set .col-2 { float: none; width: 100%; }
.bl-checkout-2col .bl-checkout-main .col2-set .col-2 { margin-top: 1em; }

/* Section headings */
.bl-checkout-2col #customer_details h3,
.bl-checkout-2col #order_review_heading {
	margin: 0 0 .75em; font-size: 1.05em; letter-spacing: .03em; text-transform: uppercase;
}
.bl-checkout-2col #customer_details h3#ship-to-different-address { font-size: 1em; text-transform: none; letter-spacing: 0; }

/* Your order box */
.bl-checkout-sidebar {
	padding: 15px 30px 30px;
	border: 2px solid rgba(0, 0, 0, .15);
	background: #fff;
}
@media (max-width: 849px) {
	.bl-checkout-sidebar { margin-top: 2em; padding: 15px 20px 20px; }
}
.bl-checkout-2col #order_review_heading { padding-top: 10px; }
.woocommerce .bl-checkout-sidebar table.shop_table { border: 0; border-radius: 0; margin: 0 0 1.5em; border-collapse: collapse; }
.woocommerce .bl-checkout-sidebar table.shop_table th,
.woocommerce .bl-checkout-sidebar table.shop_table td {
	padding: .6em 0; border: 0; border-bottom: 1px solid rgba(0, 0, 0, .08); background: transparent; vertical-align: top;
}
.woocommerce .bl-checkout-sidebar table.shop_table thead th { border-bottom-width: 3px; font-size: .85em; text-transform: uppercase; letter-spacing: .03em; }
.woocommerce .bl-checkout-sidebar table.shop_table td.product-total,
.woocommerce .bl-checkout-sidebar table.shop_table th.product-total,
.woocommerce .bl-checkout-sidebar table.shop_table tfoot td { text-align: right; }
.woocommerce .bl-checkout-sidebar table.shop_table td.product-name { font-size: .9em; }
.woocommerce .bl-checkout-sidebar table.shop_table td.product-name dl.variation,
.woocommerce .bl-checkout-sidebar table.shop_table td.product-name .wc-item-meta { margin: .3em 0 0; font-size: .85em; opacity: .7; }
.woocommerce .bl-checkout-sidebar table.shop_table td.product-name dl.variation dt { float: left; clear: both; margin: 0 .25em 0 0; font-weight: 400; }
.woocommerce .bl-checkout-sidebar table.shop_table td.product-name dl.variation::after { content: ""; display: table; clear: both; }
.woocommerce .bl-checkout-sidebar table.shop_table td.product-name dl.variation dd,
.woocommerce .bl-checkout-sidebar table.shop_table td.product-name dl.variation dd p { margin: 0; }
.woocommerce .bl-checkout-sidebar table.shop_table tfoot th { font-weight: 400; }
.woocommerce .bl-checkout-sidebar table.shop_table tfoot tr.order-total th,
.woocommerce .bl-checkout-sidebar table.shop_table tfoot tr.order-total td { font-weight: 700; border-bottom-width: 3px; }

/* Payment: no grey panels, full-width Place order */
.woocommerce-checkout .bl-checkout-sidebar #payment { background: transparent; border-radius: 0; }
.woocommerce-checkout .bl-checkout-sidebar #payment ul.payment_methods { padding: 0 0 1em; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.woocommerce-checkout .bl-checkout-sidebar #payment ul.payment_methods li { padding: .4em 0; }
.woocommerce-checkout .bl-checkout-sidebar #payment div.payment_box { margin: .6em 0 .4em; padding: .8em 0; background: transparent; color: inherit; font-size: .95em; }
.woocommerce-checkout .bl-checkout-sidebar #payment div.payment_box::before { display: none; }
.woocommerce-checkout .bl-checkout-sidebar #payment div.form-row { padding: 1em 0 0; }
.woocommerce-checkout .bl-checkout-sidebar #payment #place_order { float: none; display: block; width: 100%; margin: 1em 0 0; font-size: 1.1em; }
.woocommerce-checkout .bl-checkout-sidebar .woocommerce-privacy-policy-text { font-size: .85em; }
