/**
 * Checkout & basket UX — distraction-free shell, desktop split layout,
 * mobile sticky bars. Everything scoped under body.iccr-shell so nothing
 * leaks into normal pages.
 */

/* ---------- shell ---------- */
body.iccr-shell {
	background: linear-gradient(135deg, #f2f0fd 0%, #fdf4ee 55%, #eefaf4 100%);
	min-height: 100vh;
}
.iccr-shell-wrap {
	max-width: 1160px;
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
.iccr-shell-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 0;
}
.iccr-shell-logo img { max-height: 34px; width: auto; display: block; }
.iccr-shell-logo-text { font-size: 22px; font-weight: 700; color: #17163a; }
.iccr-shell-secure {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #4b4a6b;
}
.iccr-shell-main { flex: 1; padding-bottom: 48px; }
.iccr-shell-footer {
	border-top: 1px solid rgba(23, 22, 58, 0.08);
	padding: 18px 0 26px;
	text-align: center;
}
.iccr-shell-legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 22px;
	margin-bottom: 8px;
}
.iccr-shell-legal a { font-size: 13px; color: #4b4a6b; text-decoration: none; }
.iccr-shell-legal a:hover { text-decoration: underline; }
.iccr-shell-recaptcha { font-size: 11px; color: #8a89a3; margin: 0; }
.iccr-shell-recaptcha a { color: inherit; text-decoration: underline; }

/* Badge hidden — Google-sanctioned because the attribution line above is shown. */
.grecaptcha-badge { visibility: hidden !important; }

/* ---------- checkout split layout ---------- */
.iccr-checkout-grid { display: block; }
@media (min-width: 1024px) {
	.iccr-checkout-grid {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 440px;
		gap: 40px;
		align-items: start;
	}
	.iccr-checkout-aside { position: sticky; top: 24px; }
}
.iccr-checkout-aside-inner {
	background: #ffffff;
	border-radius: 18px;
	padding: 26px 26px 22px;
	box-shadow: 0 10px 40px rgba(23, 22, 58, 0.08);
}
.iccr-summary-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}
.iccr-summary-head h3 { margin: 0; }
.iccr-more-reports { font-size: 13px; white-space: nowrap; text-decoration: none; }
.iccr-more-reports:hover { text-decoration: underline; }

/* Order review table: reports are single-line digital items — the money
   column shrinks to fit, the subtotal row (always == total, nothing ships)
   and the "(includes VAT)" note go. Total row right-aligned and prominent. */
body.iccr-shell .woocommerce-checkout-review-order-table th.product-total,
body.iccr-shell .woocommerce-checkout-review-order-table td.product-total {
	width: 1%;
	white-space: nowrap;
	text-align: right;
}
body.iccr-shell .woocommerce-checkout-review-order-table tr.cart-subtotal { display: none; }
body.iccr-shell .cart_totals tr.cart-subtotal { display: none; }
body.iccr-shell small.includes_tax { display: none; }
body.iccr-shell .woocommerce-checkout-review-order-table tr.order-total td { text-align: right; }

/* Payment methods as selectable cards. Markup is stock Woo (li > radio +
   label + payment_box); PayFast's logos are custom uploads in label .pay-logos,
   Stitch ships one img in the label — both constrained hard because the raw
   SVGs have no intrinsic size limit. */
body.iccr-shell #payment ul.payment_methods { display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0 0 6px; }
body.iccr-shell #payment li.wc_payment_method {
	position: relative;
	list-style: none;
	margin: 0;
	background: #ffffff;
	border: 1px solid rgba(23, 22, 58, 0.14);
	border-radius: 12px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
body.iccr-shell #payment li.wc_payment_method:hover { border-color: #6366f1; }
body.iccr-shell #payment li.wc_payment_method:has(input.input-radio:checked) {
	border-color: #6366f1;
	box-shadow: inset 0 0 0 1px #6366f1;
	background: #f8f7ff;
}
body.iccr-shell #payment li.wc_payment_method > input.input-radio {
	position: absolute;
	left: 16px;
	top: 19px;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: #6366f1;
}
body.iccr-shell #payment li.wc_payment_method > label {
	display: flex !important;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 14px 16px 14px 46px;
	cursor: pointer;
	font-weight: 600;
	color: #17163a;
}
body.iccr-shell #payment li.wc_payment_method label .pay-logos {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
body.iccr-shell #payment li.wc_payment_method label > img { margin-left: auto; max-width: 130px !important; }
body.iccr-shell #payment .wc_payment_method label img,
body.iccr-shell #payment .wc_payment_method label svg {
	max-height: 20px !important;
	height: 20px;
	width: auto !important;
	max-width: 64px;
	display: inline-block;
	vertical-align: middle;
	object-fit: contain;
}
body.iccr-shell #payment .payment_box {
	background: transparent;
	border-top: 1px solid rgba(23, 22, 58, 0.08);
	border-radius: 0;
	font-size: 13px;
	color: #4b4a6b;
	margin: 0;
	padding: 10px 16px 12px 46px;
}
body.iccr-shell #payment .payment_box::before { display: none; }
body.iccr-shell #payment .payment_box p { margin: 0; }

/* Payment box: flatten Woo's default grey slab inside our card. */
body.iccr-shell #payment { background: transparent; border-radius: 0; }
body.iccr-shell #payment .payment_methods { border-bottom: 0; }

/* Login reminder: available, not shouting. */
body.iccr-shell .woocommerce-form-login-toggle .woocommerce-info {
	background: transparent;
	border: 1px dashed rgba(23, 22, 58, 0.18);
	color: #4b4a6b;
	font-size: 13px;
}

/* ---------- consent block, calm edition (markup unchanged) ---------- */
body.iccr-shell .iccr-consent { margin-top: 28px; }
body.iccr-shell .iccr-consent-important {
	background: #f6f6fb;
	border: 1px solid rgba(23, 22, 58, 0.10);
	border-radius: 12px;
	padding: 14px 16px;
	margin-bottom: 16px;
}
body.iccr-shell .iccr-consent-important strong { display: block; margin-bottom: 6px; color: #17163a; }
body.iccr-shell .iccr-consent-important p { margin: 0; font-size: 13px; line-height: 1.55; color: #4b4a6b; }
body.iccr-shell .iccr-consent-purpose { margin-bottom: 14px; }
body.iccr-shell .iccr-consent-check label {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	background: #ffffff;
	border: 1px solid rgba(23, 22, 58, 0.12);
	border-radius: 12px;
	padding: 14px 16px;
	cursor: pointer;
	transition: border-color 0.15s ease;
}
body.iccr-shell .iccr-consent-check label:hover { border-color: #6366f1; }
body.iccr-shell .iccr-consent-check input[type="checkbox"] {
	width: 20px;
	height: 20px;
	min-width: 20px;
	margin-top: 2px;
	accent-color: #6366f1;
}
body.iccr-shell .iccr-consent-check span { font-size: 12.5px; line-height: 1.55; color: #4b4a6b; }
body.iccr-shell .iccr-consent-check:has(input:checked) label { border-color: #6366f1; background: #f8f7ff; }

/* ---------- pay button: lock icon, full width, no gateway branding ---------- */
body.iccr-shell #place_order,
body.iccr-shell #paystack-payment-button {
	width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	font-size: 16px;
	font-weight: 600;
	padding: 16px 20px;
	border-radius: 999px;
}
body.iccr-shell #place_order::before,
body.iccr-shell #paystack-payment-button::before {
	content: "";
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
	background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2'><rect x='3' y='11' width='18' height='11' rx='2'/><path d='M7 11V7a5 5 0 0 1 10 0v4'/></svg>") center / contain no-repeat;
}

/* ---------- basket ---------- */
body.iccr-shell .woocommerce-cart-form button[name="update_cart"] { display: none !important; }
body.iccr-shell .woocommerce-cart-form .product-remove .remove {
	width: 34px;
	height: 34px;
	line-height: 34px;
	font-size: 18px;
}
body.iccr-shell .iccr-cart-more { text-align: right; margin: 0 0 10px; }

/* line items + totals as white cards on the gradient shell */
body.iccr-shell .woocommerce-cart-form table.shop_table {
	background: #ffffff;
	border: 0;
	border-radius: 18px;
	box-shadow: 0 10px 40px rgba(23, 22, 58, 0.08);
	overflow: hidden;
	border-collapse: separate;
}
body.iccr-shell .woocommerce-cart-form table.shop_table th,
body.iccr-shell .woocommerce-cart-form table.shop_table td {
	border-color: rgba(23, 22, 58, 0.07);
	padding: 14px 16px;
}
body.iccr-shell .woocommerce-cart-form .product-thumbnail { display: none !important; }
body.iccr-shell .woocommerce-cart-form .product-quantity { display: none !important; }
/* Every line is a single report, so quantity is always 1 and Subtotal always repeats
   Price. Dropping the column leaves Remove / Product / Price, which is the whole story.
   The class is on both the <th> and the <td>, so one rule clears the column.          */
body.iccr-shell .woocommerce-cart-form .product-subtotal { display: none !important; }
body.iccr-shell .cart_totals {
	background: #ffffff;
	border-radius: 18px;
	box-shadow: 0 10px 40px rgba(23, 22, 58, 0.08);
	padding: 22px 24px;
	width: 100%;
}
body.iccr-shell .cart_totals table.shop_table { background: transparent; box-shadow: none; border: 0; }
body.iccr-shell .cart-collaterals { margin-top: 24px; }

/* brand CTAs: same colour/shape/glow as the product-page button */
body.iccr-shell #place_order,
body.iccr-shell #paystack-payment-button,
body.iccr-shell .wc-proceed-to-checkout .checkout-button,
.iccr-sticky-bar .iccr-sticky-btn {
	background: #6366f1 !important;
	color: #ffffff !important;
	border: 0;
	border-radius: 999px;
	font-weight: 600;
	box-shadow: 0 6px 16px -4px rgba(99, 102, 241, 0.35);
	transition: background 0.15s ease;
}
body.iccr-shell #place_order:hover,
body.iccr-shell #paystack-payment-button:hover,
body.iccr-shell .wc-proceed-to-checkout .checkout-button:hover,
.iccr-sticky-bar .iccr-sticky-btn:hover { background: #4f46e5 !important; }
body.iccr-shell .wc-proceed-to-checkout .checkout-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 15px 20px;
	font-size: 16px;
	text-align: center;
}

/* ---------- mobile sticky bars (elements built by checkout-ux.js) ---------- */
.iccr-sticky-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
	background: #ffffff;
	box-shadow: 0 -6px 24px rgba(23, 22, 58, 0.14);
}
.iccr-sticky-bar .iccr-sticky-total { display: flex; flex-direction: column; line-height: 1.2; }
.iccr-sticky-bar .iccr-sticky-total small { font-size: 11px; color: #8a89a3; }
.iccr-sticky-bar .iccr-sticky-total strong { font-size: 17px; color: #17163a; }
.iccr-sticky-bar .iccr-sticky-btn {
	flex: 1;
	max-width: 240px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #6366f1;
	color: #fff;
	border: 0;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	padding: 14px 18px;
	cursor: pointer;
}
.iccr-sticky-bar .iccr-sticky-btn:active { transform: scale(0.99); }
body.iccr-sticky-visible { padding-bottom: 84px; }
.iccr-sticky-bar[hidden] { display: none; }
@media (min-width: 1024px) { .iccr-sticky-bar { display: none; } body.iccr-sticky-visible { padding-bottom: 0; } }

/* mobile order-summary jump bar (checkout, built by JS) */
.iccr-summary-jump {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	background: #ffffff;
	border: 1px solid rgba(23, 22, 58, 0.12);
	border-radius: 12px;
	padding: 13px 16px;
	margin-bottom: 18px;
	font-size: 14px;
	color: #17163a;
	cursor: pointer;
}
.iccr-summary-jump strong { font-size: 15px; }
@media (min-width: 1024px) { .iccr-summary-jump { display: none; } }


/* ---------- Paystack order-pay screen (/checkout/order-pay/) ----------
   Gateway markup is a bare "Pay Now" <button> plus a "Cancel order & restore cart"
   <a class="button cancel">, so out of the box the destructive action renders with the
   same visual weight as the payment CTA. Pay Now inherits the brand CTA rules above;
   cancel is demoted to a quiet text link so it stops competing.                        */
body.iccr-shell #paystack_form {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 14px;
	margin-top: 4px;
}
/* the gateway prints an empty <form id="order_review">; it renders as a stray gap */
body.iccr-shell #paystack_form > form#order_review:empty { display: none; }

/* secondary action: outline button, same pill + width as Pay Now so the pair reads as
   one control group, but hollow so it never competes with the payment CTA. Border tone
   and indigo hover match the payment-method cards above.                               */
body.iccr-shell #paystack-cancel-payment-button,
body.iccr-shell #paystack-cancel-payment-button.button,
body.iccr-shell #paystack-cancel-payment-button.button.cancel {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 14px 20px;
	background: transparent !important;
	border: 1px solid rgba(23, 22, 58, 0.18) !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: #4b4a6b !important;
	text-align: center;
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
body.iccr-shell #paystack-cancel-payment-button:hover,
body.iccr-shell #paystack-cancel-payment-button:focus-visible {
	background: #f8f7ff !important;
	border-color: #6366f1 !important;
	color: #17163a !important;
	text-decoration: none;
}
body.iccr-shell #paystack-payment-button:focus-visible,
body.iccr-shell #paystack-cancel-payment-button:focus-visible {
	outline: 2px solid #6366f1;
	outline-offset: 2px;
}
