/* --------------------------------------------------------------------------
 * GRZ Gaming — iPhone rail rhythm and steel-blue cart identity (v2.0.6).
 *
 * Keeps the approved cobalt Buy Now action while reducing only the mobile
 * package/quantity card height. The PayPal handoff uses one theme-owned gap
 * and neutralizes a stray first funding-item margin that can be injected by
 * WooCommerce PayPal Payments on narrow containers.
 * ----------------------------------------------------------------------- */

body.single-product.grz-product-design .grz-tp-rail {
	--grz-rail-cart: var(--grz-product-cart, #2f4858);
	--grz-rail-cart-dark: var(--grz-product-cart-dark, #233847);
	--grz-rail-cart-rgb: var(--grz-product-cart-rgb, 47, 72, 88);
}

/* The PayPal plugin writes an inline margin while sizing injected APM items.
 * Only the first visible funding item must start flush; later funding options
 * retain the plugin's own separation. */
body.single-product.grz-product-design .grz-tp-rail .grz-tp-express-slot .ppc-button-wrapper,
body.single-product.grz-product-design .grz-tp-rail .grz-tp-express-slot [id^="ppc-button-"] {
	min-height: 0 !important;
}

body.single-product.grz-product-design .grz-tp-rail .grz-tp-express-slot [id^="ppc-button-"] > :first-child {
	margin-top: 0 !important;
}

@media (max-width: 620px) {
	body.single-product.grz-product-design .grz-tp-selected-package {
		grid-template-columns: 60px minmax(0, 1fr) 24px;
		gap: 11px;
		min-height: 84px;
		padding: 10px 12px;
	}

	body.single-product.grz-product-design .grz-tp-selected-package__media {
		width: 60px;
		height: 60px;
	}

	body.single-product.grz-product-design .grz-tp-card--quantity .grz-tp-qty--action {
		min-height: 74px;
		padding: 10px 12px;
	}

	/* Remove the action wrapper's bottom spacer and make the 8px PayPal gap
	 * explicit on the payment slot. This remains stable when Safari rounds the
	 * PayPal iframe or the plugin adds its width-state classes. */
	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary .woocommerce-variation-add-to-cart,
	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary .grz-tp-cart-actions {
		padding: 8px 12px 0 !important;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-express-slot:not(:empty) {
		margin: 8px 12px 12px !important;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-express-slot .ppc-button-wrapper,
	body.single-product.grz-product-design .grz-tp-rail .grz-tp-express-slot [id^="ppc-button-"] {
		padding-top: 0 !important;
		padding-bottom: 0 !important;
	}
}

@media (max-width: 355px) {
	body.single-product.grz-product-design .grz-tp-selected-package {
		grid-template-columns: 56px minmax(0, 1fr) 22px;
		gap: 9px;
		min-height: 80px;
	}

	body.single-product.grz-product-design .grz-tp-selected-package__media {
		width: 56px;
		height: 56px;
	}
}
