/* ==========================================================================
   LikeInk — cart, part 2: express checkout in the summary, plus layout fixes.

   These rules used to reach the cart only by accident: the English cart page
   still had a stray [woocommerce_checkout] shortcode in its post_content, so
   WooCommerce reported is_checkout() there and the checkout stylesheets loaded.
   Every translated cart page — a genuine cart — got neither the styling nor the
   heading. They live here so the cart carries them in its own right.

   Its own file because likeink-cart.css already sits at this host's ~14.8 KB
   upload ceiling.
   ========================================================================== */

.likeink-cart-summary__actions #wc-stripe-express-checkout-element {
	margin-bottom: 16px !important;
}

/* Matches the label rendered on the checkout: body face, not the wide
   display face the theme reset applies to headings. */
.likeink-cart-summary__actions .likeink-express-heading {
	/* 20px above so the express block reads as separate from the checkout
	   button it now sits under. */
	margin: 20px 0 10px !important;
	padding: 0 !important;
	font-family: roc-grotesk, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	color: var(--likeink-ink, #141311) !important;
}

/* Stripe prints its "— OR —" divider even when no wallet is available, which
   would leave a divider hanging over nothing. It stays hidden until the cart
   JS confirms the express element actually mounted and marks <body>. */
#wc-stripe-express-checkout-button-separator {
	display: none !important;
}

body.likeink-express-active #wc-stripe-express-checkout-button-separator {
	display: block !important;
	margin: 0 0 20px !important;
	color: var(--likeink-muted, #8c887f);
	font-size: 13px;
	text-align: center;
}

/* ---------- Layout ----------
   The cart spans the Elementor container's own width; the side padding here
   was doubling up with the container's, so it is removed. */
.likeink-cart-wrap {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* ---------- Summary typography ----------
   The theme styles table headers with the brand's wide display face, which
   left "Subtotal" and "Shipping" in roc-grotesk-wide while "Total" — carrying
   its own rule — stayed on the body face. Only the family is forced here, so
   the size and weight each row already defines are left alone. */
.likeink-cart-summary th,
.likeink-cart-summary td,
.likeink-cart-summary .likeink-totals-table th,
.likeink-cart-summary .likeink-totals-table td {
	font-family: roc-grotesk, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
	letter-spacing: normal !important;
}

/* ---------- Free-shipping progress ----------
   The container is already dark, but the prices inside are wrapped in
   WooCommerce's own .woocommerce-Price-amount markup, which the theme paints
   in its gold accent (rgb(180,151,90)). The descendant selector is what makes
   the difference — setting the colour on the wrapper alone does nothing. */
.likeink-cart-wrap .likeink-free-shipping-amount,
.likeink-cart-wrap .likeink-free-shipping-amount *,
.likeink-checkout-wrap .likeink-free-shipping-amount,
.likeink-checkout-wrap .likeink-free-shipping-amount * {
	color: #000 !important;
}

/* ---------- Mobile ----------
   The side padding is removed on desktop (above) because the Elementor
   container already supplies it, but on narrow screens the cart would
   otherwise sit flush against the viewport edge. 860px matches the breakpoint
   the rest of the cart layout uses. */
@media (max-width: 860px) {
	.likeink-cart-wrap {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}
}

/* ---------- Wallet buttons (Apple Pay / Google Pay) ----------
   Payment Plugins renders each wallet as a Stripe element whose own height is
   58px, against the 47px of the checkout button beside it — three buttons in a
   column, none the same size. These rules pull the wallets down to match and
   replace the plugin's ~17px list spacing with a 5px gap.

   Height and corner radius are set in the gateway's own Button Settings
   (47px / 3px), not here: CSS crops the Stripe element rather than redrawing
   it, which cut the button off at the bottom and threw away its rounded
   corners. Only the spacing belongs in CSS. */
.likeink-cart-summary__actions .wc_stripe_cart_payment_methods,
.woocommerce-checkout-payment .wc_stripe_checkout_payment_methods {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.likeink-cart-summary__actions li.wc-stripe-payment-method,
.woocommerce-checkout-payment li.wc-stripe-payment-method {
	margin: 0 0 5px !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
}

.likeink-cart-summary__actions li.wc-stripe-payment-method:last-child,
.woocommerce-checkout-payment li.wc-stripe-payment-method:last-child {
	margin-bottom: 0 !important;
}

/* The checkout button sits directly above the wallets, so it needs the same
   5px separation rather than the summary's default spacing. */
.likeink-cart-summary__actions .checkout-button {
	margin-bottom: 5px !important;
}

/* On the checkout the wallets are not rendered as a list — Payment Plugins puts
   them straight into .form-row.place-order — so the 5px gap is set on the
   buttons themselves rather than on a list item that does not exist there. */
#wc-stripe_applepay-checkout-button,
#wc-stripe_googlepay-checkout-button {
	margin-bottom: 5px !important;
}

/* Stripe's "— or —" divider between the checkout button and the wallets.
   It inherits the theme's body size (17.6px), which reads as a heading beside
   the 14px summary rows. Matched to the Subtotal/Shipping labels — family,
   weight and colour already agreed, only the size was off. The attribute
   selector covers both the cart and checkout variants of the class, which
   Payment Plugins names per context (wc-stripe-cart-or, wc-stripe-checkout-or). */
.likeink-cart-wrap p[class*="wc-stripe-"][class*="-or"],
.likeink-checkout-wrap p[class*="wc-stripe-"][class*="-or"] {
	font-family: roc-grotesk, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	color: var(--likeink-ink, #141311) !important;
}

/* ---------- VAT lookup spinner ----------
   The VIES service is slow — measured at roughly 14 seconds from this server —
   so "Checking…" alone leaves the customer unsure whether anything is
   happening. A spinner sits after the text while the lookup runs.

   Done as a pseudo-element on the pending state rather than markup from JS:
   the status line already switches to .is-pending for the duration and back on
   the answer, so the animation starts and stops on its own with no extra
   scripting to keep in sync.

   Lives in this file because likeink-checkout.css, where the rest of the
   status styling sits, is close to this host's upload ceiling. */
.likeink-checkout-main .likeink-vat-status.is-pending::after {
	content: '';
	display: inline-block;
	width: 11px;
	height: 11px;
	margin-left: 7px;
	vertical-align: -1px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	opacity: 0.7;
	animation: likeink-vat-spin 0.7s linear infinite;
}

@keyframes likeink-vat-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Respect a reduced-motion preference: keep the indicator, drop the spin. */
@media (prefers-reduced-motion: reduce) {
	.likeink-checkout-main .likeink-vat-status.is-pending::after {
		animation: none;
		border-right-color: currentColor;
		opacity: 0.35;
	}
}

/* The pending status and its spinner in black. The spinner draws itself from
   currentColor, so the text colour carries it — one rule covers both.

   The class is repeated to outweigh the muted-grey rule in
   likeink-checkout.css: both carry !important at equal specificity, and that
   file is enqueued after this one, so it would otherwise win on order alone. */
.likeink-checkout-main .likeink-vat-status.is-pending.is-pending {
	color: #000 !important;
}

/* ---------- Price colour ----------
   The theme paints WooCommerce's price markup in its gold accent
   (rgb(180,151,90)). Every amount in the cart and checkout is set to black
   instead. Scoped to our two wrappers so product pages and the rest of the
   shop keep the theme's own styling. The descendant selector matters: the
   amount is split into nested spans for the currency symbol and decimals. */
.likeink-cart-wrap .woocommerce-Price-amount,
.likeink-cart-wrap .woocommerce-Price-amount *,
.likeink-checkout-wrap .woocommerce-Price-amount,
.likeink-checkout-wrap .woocommerce-Price-amount * {
	color: #000 !important;
}

/* ---------- Column sizing ----------
   A plain 1fr track has an automatic minimum of its content's min-content
   width. WooCommerce's "added to your cart" notice resolves that minimum to
   the full width of the container, so right after an add-to-cart the first
   column swallowed everything and pushed the summary past the right edge of
   the screen. minmax(0, 1fr) lets the track shrink to the space left over.

   The checkout has the same grid and shows the same notices — validation
   errors, for one — so it gets the same treatment. Kept inside the desktop
   breakpoints so the single-column mobile layout still wins below them. */
@media (min-width: 861px) {
	.likeink-cart-columns {
		grid-template-columns: minmax(0, 1fr) 360px;
	}
}

@media (min-width: 901px) {
	.likeink-checkout-columns {
		grid-template-columns: minmax(0, 1fr) 380px;
	}
}

.likeink-cart-columns > *,
.likeink-checkout-columns > * {
	min-width: 0;
}

/* ---------- Notices ----------
   The child theme (hello-elementor-child-1/style.css, around line 268) has
     .likeink-cart .woocommerce-error, .woocommerce-info, .woocommerce-message
     { width: 1410px }
   Only the first selector in that list is scoped; the other two apply to
   every notice on the site. Inside our columns the fixed width ran the notice
   under the summary card and hid its "view cart" button. The theme is left as
   it is — this sizes notices to their column within our pages only. */
.likeink-cart-wrap .woocommerce-error,
.likeink-cart-wrap .woocommerce-info,
.likeink-cart-wrap .woocommerce-message,
.likeink-checkout-wrap .woocommerce-error,
.likeink-checkout-wrap .woocommerce-info,
.likeink-checkout-wrap .woocommerce-message {
	width: auto !important;
	max-width: 100%;
	box-sizing: border-box;
}

/* ---------- Item meta (options/custom fields) ----------
   wc_get_formatted_cart_item_data() prints <dl class="variation"> with each
   label in a <dt> and each value as <dd><p>. Browser/theme defaults put them
   on separate lines with a 40px indent and paragraph margins, so one option
   took ~90px. Label and value now share one line. */
.likeink-cart-row__meta dl.variation {
	display: grid;
	grid-template-columns: auto 1fr;
	column-gap: 6px;
	row-gap: 2px;
	margin: 0;
	padding: 0;
}

.likeink-cart-row__meta dl.variation dt,
.likeink-cart-row__meta dl.variation dd,
.likeink-cart-row__meta dl.variation dd p {
	float: none;
	margin: 0 !important;
	padding: 0;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--likeink-muted);
}

.likeink-cart-row__meta dl.variation dd,
.likeink-cart-row__meta dl.variation dd p {
	color: var(--likeink-ink);
}
