/*
 * WPTPL classic cart / checkout / account base.
 * Theme-neutral: colors come from the text color (currentColor) so it works on light and dark themes.
 * Themes refine it with their own fonts, radius and accent (see .wptpl-* custom properties).
 */

.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce,
.woocommerce-account .woocommerce {
	--wptpl-line: color-mix(in srgb, currentColor 16%, transparent);
	--wptpl-soft: color-mix(in srgb, currentColor 5%, transparent);
	--wptpl-radius: var(--wptpl-theme-radius, 0px);
	--wc-form-border-color: color-mix(in srgb, currentColor 30%, transparent);
	--wc-form-border-radius: var(--wptpl-radius);
	--wc-form-color-background: transparent;
	--wc-form-color-text: currentColor;
	margin-bottom: var(--wp--preset--spacing--50, 4rem);
}

/* notices */
.woocommerce-cart .woocommerce-info,
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-error,
.woocommerce-checkout .woocommerce-info,
.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-error {
	background: var(--wptpl-soft);
	color: inherit;
	border: 1px solid var(--wptpl-line);
	border-left: 3px solid currentColor;
	border-radius: var(--wptpl-radius);
	font-size: .9375rem;
}
.woocommerce-cart .wc-block-components-notice-banner.is-info,
.woocommerce-checkout .wc-block-components-notice-banner.is-info,
.woocommerce-account .wc-block-components-notice-banner.is-info {
	background: var(--wptpl-soft);
	color: inherit;
	border: 1px solid var(--wptpl-line);
	border-left: 3px solid currentColor;
	border-radius: var(--wptpl-radius);
}
.woocommerce .wc-block-components-notice-banner.is-info > svg { background: transparent; fill: currentColor; }
.woocommerce .wc-block-components-notice-banner a { color: inherit; }
.woocommerce-info::before,
.woocommerce-message::before { color: currentColor; }
.woocommerce-error::before { color: #d63638; }
.woocommerce-info a, .woocommerce-message a { color: inherit; }

/* tables */
.woocommerce table.shop_table {
	border: 1px solid var(--wptpl-line);
	border-radius: var(--wptpl-radius);
	border-collapse: separate;
	margin: 0 0 2rem;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td { border-top-color: var(--wptpl-line); padding: 1rem 1.25rem; }
.woocommerce table.shop_table thead th {
	font-size: .75rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	opacity: .7;
}
.woocommerce table.shop_table tfoot th,
.woocommerce table.shop_table tfoot td { border-top-color: var(--wptpl-line); }
.woocommerce table.shop_table .order-total th,
.woocommerce table.shop_table .order-total td { font-size: 1.125rem; }
.woocommerce table.shop_table a { color: inherit; }

/* cart */
.woocommerce-cart table.cart img { width: 72px; height: 54px; object-fit: cover; border-radius: var(--wptpl-radius); }
.woocommerce-cart table.cart .product-name a { text-decoration: none; font-weight: 600; }
/* services are sold individually (wptpl-core), so the quantity column is empty */
.woocommerce table.cart .product-quantity,
.woocommerce-checkout-review-order-table .product-quantity,
.woocommerce table.cart button[name="update_cart"] { display: none !important; }
.woocommerce a.remove { color: inherit !important; opacity: .55; font-weight: 400; }
.woocommerce a.remove:hover { background: transparent; opacity: 1; }
.woocommerce-cart table.cart td.actions { background: var(--wptpl-soft); }
.woocommerce-cart table.cart td.actions .coupon .input-text {
	width: 12rem;
	padding: .65rem .8rem;
	margin-right: .5rem;
	border: 1px solid var(--wc-form-border-color);
	border-radius: var(--wptpl-radius);
	background: transparent;
	color: inherit;
}
.woocommerce .cart-collaterals .cart_totals h2 { font-size: 1.25rem; margin-top: 0; }
.woocommerce .cart-collaterals .cart_totals table { width: 100%; }
.woocommerce .wc-proceed-to-checkout { padding-top: 0; }
.woocommerce .wc-proceed-to-checkout a.checkout-button { box-sizing: border-box; display: block; text-align: center; width: 100%; padding: 1.1rem 1.5rem; font-size: 1rem; }

/* checkout layout: details left, order summary right */
.woocommerce-checkout form.checkout h3,
.woocommerce-checkout #order_review_heading { font-size: 1.25rem; margin: 0 0 1.25rem; }
.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2 { float: none; width: 100%; }
.woocommerce-checkout #customer_details .col-2 { margin-top: 1.5rem; }
.woocommerce form .form-row { padding: 0; margin: 0 0 1rem; }
.woocommerce form .form-row label { font-size: .875rem; margin-bottom: .35rem; }
.woocommerce form .form-row .input-text,
.woocommerce form .form-row select { padding: .75rem .85rem; box-sizing: border-box; }
.woocommerce form .form-row textarea { min-height: 7rem; }
.woocommerce .select2-container--default .select2-selection--single {
	height: auto;
	padding: .55rem .5rem;
	background: transparent;
	border: 1px solid var(--wc-form-border-color);
	border-radius: var(--wptpl-radius);
}
.woocommerce .select2-container--default .select2-selection--single .select2-selection__rendered { color: inherit; line-height: 1.6; }
.woocommerce .select2-container--default .select2-selection--single .select2-selection__arrow { height: 100%; }
.select2-dropdown { color: #1e1e1e; }

@media (min-width: 900px) {
	.woocommerce-checkout form.checkout {
		display: grid;
		grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
		grid-template-rows: auto auto 1fr;
		column-gap: clamp(2rem, 5vw, 5rem);
		align-items: start;
	}
	.woocommerce-checkout form.checkout > * { grid-column: 1 / -1; }
	.woocommerce-checkout form.checkout > #customer_details { grid-column: 1; grid-row: 2 / span 2; }
	.woocommerce-checkout form.checkout > #order_review_heading { grid-column: 2; grid-row: 2; }
	.woocommerce-checkout form.checkout > #order_review { grid-column: 2; grid-row: 3; position: sticky; top: 2rem; }
	.woocommerce-checkout form.checkout > .woocommerce-NoticeGroup { grid-row: 1; }
}

.woocommerce-checkout #order_review {
	padding: 1.5rem;
	border: 1px solid var(--wptpl-line);
	border-radius: var(--wptpl-radius);
	background: var(--wptpl-soft);
}
.woocommerce-checkout #order_review table.shop_table { border: 0; margin-bottom: 1.5rem; }
.woocommerce-checkout #order_review table.shop_table th,
.woocommerce-checkout #order_review table.shop_table td { padding: .85rem 0; }
.woocommerce-checkout #order_review table.shop_table td:last-child,
.woocommerce-checkout #order_review table.shop_table th:last-child { text-align: right; }

/* payment */
.woocommerce-checkout #payment { background: transparent; border-radius: 0; }
.woocommerce-checkout #payment ul.payment_methods { padding: 0 0 1rem; border-bottom: 1px solid var(--wptpl-line); }
.woocommerce-checkout #payment ul.payment_methods li { list-style: none; }
.woocommerce-checkout #payment ul.payment_methods li.woocommerce-notice { border-radius: var(--wptpl-radius); }
.woocommerce-checkout #payment div.payment_box { background: var(--wptpl-soft); color: inherit; border-radius: var(--wptpl-radius); }
.woocommerce-checkout #payment div.payment_box::before { display: none; }
.woocommerce-checkout #payment div.form-row { padding: 1rem 0 0; margin: 0; }
.woocommerce-checkout .woocommerce-privacy-policy-text { font-size: .8125rem; opacity: .75; }
.woocommerce-checkout #place_order { box-sizing: border-box; float: none; display: block; width: 100%; padding: 1.1rem 1.5rem; font-size: 1rem; margin-top: 1rem; }

@media (max-width: 768px) {
	.woocommerce-cart table.cart td.actions .coupon { display: flex; flex-direction: column; gap: .5rem; }
	.woocommerce-cart table.cart td.actions .coupon .input-text,
	.woocommerce-cart table.cart td.actions .coupon .button { float: none !important; width: 100% !important; margin: 0 !important; box-sizing: border-box; }
	.woocommerce-cart table.cart td.actions > .button { width: 100%; margin-top: .5rem; }
	.woocommerce-cart table.cart img { width: 56px; height: 42px; }
	.woocommerce-checkout #order_review { padding: 1.25rem; }
}
