/* ------------------------------------------------------------------
   hqt-commerce.css — cart · checkout · my-account usability layer
   Purpose : mobile-app-grade form ergonomics on the money path.
             Measured defects fixed: 13.86px inputs (iOS auto-zooms on
             focus below 16px — Safari's documented threshold) and 40px
             field heights (below the 44-48px touch standard).
   Scope   : enqueued only on cart/checkout/account (functions.php).
   Refs    : docs/TRACKING_LEDGER.md row 59.
   ------------------------------------------------------------------ */

/* 16px floor kills iOS focus-zoom; 48px height = comfortable touch */
.woocommerce-cart .woocommerce input[type="text"],
.woocommerce-cart .woocommerce input[type="number"],
.woocommerce-checkout .woocommerce input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.woocommerce-checkout .woocommerce select,
.woocommerce-checkout .woocommerce textarea,
.woocommerce-account .woocommerce input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.woocommerce-account .woocommerce select {
	font-size: 16px;
	min-height: 48px;
	padding: 10px 14px;
	border-radius: 10px;
	border: 1.5px solid var(--hqt-line);
	background: var(--hqt-white);
}
.woocommerce-checkout .woocommerce textarea { min-height: 88px; }
.woocommerce-checkout .woocommerce input:focus,
.woocommerce-checkout .woocommerce select:focus,
.woocommerce-account .woocommerce input:focus {
	border-color: var(--hqt-leaf);
	outline: 2px solid rgba(139, 195, 74, 0.35);
	outline-offset: 1px;
}

/* select2 (country/state) to the same height */
.woocommerce-checkout .select2-container .select2-selection--single {
	height: 48px; border-radius: 10px; border: 1.5px solid var(--hqt-line);
}
.woocommerce-checkout .select2-container .select2-selection__rendered { line-height: 46px; font-size: 16px; }
.woocommerce-checkout .select2-container .select2-selection__arrow { height: 46px; }

/* touch targets: qty steppers + remove on cart */
.woocommerce-cart .quantity .qty { min-width: 64px; text-align: center; }
.woocommerce-cart td.product-remove .remove {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; font-size: 22px;
}

/* the money buttons: full-width, thumb-sized on phones */
.woocommerce-cart .wc-proceed-to-checkout .checkout-button,
.woocommerce-checkout #place_order,
.woocommerce-account .woocommerce-Button {
	min-height: 52px; font-size: 16px; font-weight: 700; border-radius: 12px;
}
@media (max-width: 768px) {
	.woocommerce-cart .wc-proceed-to-checkout .checkout-button,
	.woocommerce-checkout #place_order { width: 100%; display: block; text-align: center; }
	.woocommerce-cart .coupon .button { min-height: 48px; }
	.woocommerce-cart .coupon #coupon_code { width: 100%; margin-bottom: 8px; }
}

/* ================================================================
   CHECKOUT v2 — Shopify anatomy (approved mockups/checkout-account-v2.html)
   Split screen: form left, sticky summary+payment right; floating labels
   keyed on placeholder=" "; qty badges; trust row. Payment stays inside
   #order_review (Woo AJAX contract — engineered deviation, row 60).
   ================================================================ */
.woocommerce-checkout .hqt-co__crumbs { font-size: 12px; color: #8a977b; margin: 4px 0 18px; }
.woocommerce-checkout .hqt-co__crumbs b { color: var(--hqt-forest); }

/* the legacy form-checkout.php template already wraps the form in its own
   .checkout-container grid (1fr 450px, max 1400px) — style THAT, never add a
   second grid on form.checkout (nested grids collapsed the billing column to
   ~370px on a 1781px screen, screenshot-proven) */
@media (min-width: 992px) {
	.woocommerce-checkout form.checkout .checkout-container {
		display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr);
		gap: 40px; align-items: start; max-width: 1120px; margin: 0 auto;
	}
	.woocommerce-checkout .checkout-progress,
	.woocommerce-checkout .page-header { max-width: 1120px; }
	.woocommerce-checkout .checkout-sidebar { position: sticky; top: 110px; }
}
.woocommerce-checkout #order_review { background: #f4f6ef; border: 1px solid var(--hqt-line); border-radius: 14px; padding: 22px; }
.woocommerce-checkout #order_review_heading { font-family: var(--hqt-ff-display); color: var(--hqt-forest); font-size: 19px; margin-bottom: 10px; }
.woocommerce-checkout #customer_details .col-2 { display: none; } /* shipping copy — single address flow */
/* single-address flow: shipping copies billing (PHP unchecks it), so the toggle
   and any shipping-fields block outside .col-2 must never surface */
.woocommerce-checkout #ship-to-different-address,
.woocommerce-checkout .woocommerce-shipping-fields { display: none !important; }
/* money path stays distraction-free: the floating WhatsApp pill overlaps the
   form fields at 375px (screenshot-proven) — hide it on checkout only */
.woocommerce-checkout .hqt-wa, .woocommerce-checkout a[href*="wa.me"] { display: none !important; }
/* selects join the floating-label rhythm (State/Country value sat under the
   label — screenshot-proven; !important because Astra's select shorthand wins
   the cascade otherwise, computed padding-top stayed 0) */
.woocommerce-checkout p.form-row select { padding-top: 20px !important; padding-bottom: 6px !important; }
.woocommerce-checkout #customer_details h3 { font-family: var(--hqt-ff-display); color: var(--hqt-forest); font-size: 19px; }

/* floating labels: label sits inside the field, keyed on placeholder=" " */
.woocommerce-checkout p.form-row { position: relative; margin-bottom: 12px; }
.woocommerce-checkout p.form-row > label { position: absolute; left: 13px; top: 6px; z-index: 2; font-size: 11px; color: #8a977b; font-weight: 600; margin: 0; pointer-events: none; }
.woocommerce-checkout p.form-row .woocommerce-input-wrapper input,
.woocommerce-checkout p.form-row .woocommerce-input-wrapper select { padding-top: 20px; padding-bottom: 6px; }
.woocommerce-checkout p.form-row .required { color: #8a977b; }
.woocommerce-checkout .select2-container .select2-selection--single { padding-top: 12px; }

/* order table + totals inside the tinted panel */
.woocommerce-checkout #order_review table.shop_table { background: transparent; border: none; }
.woocommerce-checkout #order_review table.shop_table td,
.woocommerce-checkout #order_review table.shop_table th { border-color: var(--hqt-line); font-size: 13.5px; }
.woocommerce-checkout #order_review .order-total .amount { font-size: 16px; font-weight: 800; color: var(--hqt-ink); }

/* payment methods as flat rows in the panel */
.woocommerce-checkout #payment { background: #fff; border: 1px solid var(--hqt-line); border-radius: 10px; }
.woocommerce-checkout #payment ul.payment_methods { border-bottom: 1px solid var(--hqt-line); padding: 0; }
.woocommerce-checkout #payment ul.payment_methods li { padding: 14px 16px; border-bottom: 1px solid var(--hqt-line); }
.woocommerce-checkout #payment ul.payment_methods li:last-child { border-bottom: none; }
/* selected-payment highlight — replaces the old builder's dead DOMContentLoaded
   `.active` toggle (payment rows render via AJAX after DOM ready, so the JS bound
   to nothing). :has(:checked) is live through every update_checkout re-render. */
.woocommerce-checkout #payment ul.payment_methods li:has(input:checked) { background: #f4f6ef; box-shadow: inset 3px 0 0 var(--hqt-forest); }
.woocommerce-checkout #payment div.payment_box { background: #f4f6ef; border-radius: 8px; font-size: 12.5px; }
.woocommerce-checkout #payment input[type="radio"] { accent-color: var(--hqt-forest); width: 18px; height: 18px; }
.woocommerce-checkout #place_order { background: var(--hqt-forest); border-radius: 8px; }
.woocommerce-checkout #place_order:hover { background: #3a6420; }

.hqt-co__trust { font-size: 11.5px; color: #8a977b; margin-top: 12px; }
.hqt-co__trust span { display: block; margin: 3px 0; }
.hqt-co__trust span::before { content: '✓ '; color: var(--hqt-forest); font-weight: 800; }

/* ---- account dashboard (Shopify-flat) ---- */
.hqt-acct__hi { font-family: var(--hqt-ff-display); font-size: 24px; color: var(--hqt-forest); }
.hqt-acct__sub { font-size: 13px; color: #8a977b; margin: 4px 0 22px; }
.hqt-acct__sub a { color: var(--hqt-forest); }
.hqt-acct__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hqt-acct__card { background: #fff; border: 1px solid var(--hqt-line); border-radius: 10px; padding: 18px; text-decoration: none; color: var(--hqt-ink); }
.hqt-acct__card:hover { border-color: var(--hqt-forest); }
.hqt-acct__card svg { width: 22px; height: 22px; stroke: var(--hqt-forest); fill: none; stroke-width: 1.7; margin-bottom: 8px; }
.hqt-acct__card b { display: block; font-size: 14.5px; font-weight: 800; }
.hqt-acct__card span { font-size: 12px; color: #8a977b; }
.hqt-acct__order { border: 1px solid var(--hqt-line); border-radius: 10px; background: #fff; padding: 18px; margin-top: 14px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.hqt-acct__st { background: #f4f6ef; border: 1px solid var(--hqt-line); color: var(--hqt-forest); font-size: 11.5px; font-weight: 800; border-radius: 99px; padding: 4px 12px; }
@media (max-width: 700px) { .hqt-acct__grid { grid-template-columns: 1fr 1fr; } }
