/* width: 100%: the prod footer is a flex row, so without it the block shrinks to its content and narrows when the label changes to "✓ n im Warenkorb" (#922). */
.frs-purchase { display: grid; gap: var(--space-xs); width: 100%; min-width: 0; }
.frs-purchase__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-xs); }
.frs-purchase__quantity { display: flex; align-items: stretch; min-width: 0; height: 3.125rem; overflow: hidden; border: 1px solid var(--base-semi-dark); border-radius: var(--btn-radius); background: var(--white); }
/* Parent class + child combinator: theme and WooCommerce input/button resets (.woocommerce .quantity .qty, ACSS buttons) otherwise left-aligned the icons and drew a second border round the number (18.11. Screenshot Marcel). 2.75rem = 44px tap target (#895). */
.frs-purchase .frs-purchase__quantity > button { display: flex; flex: 0 0 2.75rem; align-items: center; justify-content: center; width: 2.75rem; min-width: 0; height: auto; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; color: var(--text-dark); cursor: pointer; }
.frs-purchase .frs-purchase__quantity > button:hover:not(:disabled) { background: var(--neutral-ultra-light); }
.frs-purchase .frs-purchase__quantity > button:disabled { color: var(--base-semi-dark); cursor: default; }
/* max(16px, …): below 16px iOS zooms into the field on focus (#895). The wrapper shows the focus ring, so the field itself draws none. */
.frs-purchase .frs-purchase__quantity > input { flex: 1 1 auto; width: 100%; min-width: 2ch; height: auto; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; outline: none; color: var(--text-dark); text-align: center; font-size: max(16px, var(--text-m)); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; appearance: textfield; }
.frs-purchase__quantity input::-webkit-inner-spin-button, .frs-purchase__quantity input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.frs-purchase__quantity svg, .frs-purchase__add svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
/* One button system for the buy row (Marcel, 18.11.): same height, radius and weight as the quantity field. Parent class raises specificity over theme a/button hover colours, which made the text unreadable on hover. */
.frs-purchase .frs-purchase__add, .frs-purchase .frs-purchase__link { display: flex; align-items: center; justify-content: center; gap: var(--space-xs); height: 3.125rem; margin: 0; padding: 0 var(--space-xs); border: 1px solid transparent; border-radius: var(--btn-radius); box-shadow: none; font: inherit; font-size: var(--text-s); font-weight: 600; line-height: 1.15; text-align: center; text-decoration: none; cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
/* Hover darkens the red instead of --primary-hover, which misses AA with white text (3.52:1, #887). */
.frs-purchase .frs-purchase__add { background: var(--primary); border-color: var(--primary); color: var(--white); text-wrap: balance; }
.frs-purchase .frs-purchase__add:hover, .frs-purchase .frs-purchase__add:focus-visible { background: color-mix(in srgb, var(--primary) 78%, black); border-color: color-mix(in srgb, var(--primary) 78%, black); color: var(--white); }
.frs-purchase .frs-purchase__link, .frs-purchase .frs-purchase__link:visited { background: var(--white); border-color: var(--base-semi-dark); color: var(--text-dark); }
.frs-purchase .frs-purchase__link:hover, .frs-purchase .frs-purchase__link:focus-visible { background: var(--white); border-color: var(--primary); color: var(--primary); }
.frs-purchase :is(button, input, a):focus-visible { outline: var(--focus-width) solid var(--primary); outline-offset: 2px; }
.frs-purchase__quantity:focus-within { outline: var(--focus-width) solid var(--primary); outline-offset: 2px; }
.frs-purchase__add.is-success svg { display: none; }
.frs-purchase__error:empty { display: none; }
@container (max-width: 16rem) { .frs-purchase__row { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
	.frs-purchase *, .frs-purchase *::before, .frs-purchase *::after {
		animation: none !important;
		transition: none !important;
	}
}

/* Errors of a direct ?add-to-cart= (inc/direct-purchase-errors.php, #897): above the Kaufblock, or at the page top when no Kaufblock of that article renders. */
.frs-purchase-errors { display: grid; gap: var(--space-xs); }
.frs-purchase-errors__item { margin: 0; padding: var(--space-xs) var(--space-s); border-left: var(--focus-width) solid var(--primary); background: var(--neutral-ultra-light); color: var(--text-dark); font-size: var(--text-s); }
.frs-purchase-errors--page { width: min(100% - 2 * var(--space-m), var(--content-width)); margin: var(--space-s) auto; }
