{{-- Responsive payment checkout shell: bottom sheet on mobile, centered modal on desktop. Audiences: - buyer (default): public ticket buyers, donors, shoppers — self-serve checkout - operator: signed-in staff flows such as wallet top-up Optional overrides: $sheetTitle, $sheetSubtitle, $sheetFooter, $sheetAria, $iframeTitle Requires Alpine ancestor with: showSheet (bool), checkoutUrl (string). Paystack (checkout.paystack.com) sends X-Frame-Options: SAMEORIGIN and cannot be embedded. Same-origin URLs (e.g. MoMo waiting pages) still load in an iframe. External checkouts stay in this chrome with a Continue CTA that opens Paystack in a named window (user gesture — not blocked). Auto-popups are intentionally avoided so the sheet/modal always remains visibly on screen. --}} @php $audience = $audience ?? 'buyer'; $defaults = match ($audience) { 'operator' => [ 'title' => 'Complete payment', 'subtitle' => null, 'aria' => 'Complete payment', 'iframe' => 'Payment checkout', 'footer' => null, ], default => [ 'title' => 'Complete your payment', 'subtitle' => 'Pay securely. You\'ll get a confirmation when it succeeds.', 'aria' => 'Complete your payment', 'iframe' => 'Secure payment checkout', 'footer' => 'Your payment is processed securely. Do not close this window until finished.', ], }; $sheetTitle = $sheetTitle ?? $defaults['title']; $sheetSubtitle = $sheetSubtitle ?? $defaults['subtitle']; $sheetAria = $sheetAria ?? $defaults['aria']; $iframeTitle = $iframeTitle ?? $defaults['iframe']; $sheetFooter = $sheetFooter ?? $defaults['footer']; @endphp @once @endonce