{{-- Left: Gateway selection --}}

{{ __('Complete Your Purchase') }}

{{ __('Choose your preferred payment method to subscribe to') }} {{ $plan->name }}.

{{-- Currency selector --}}

{{ __('Payment will be processed in the selected currency. Available gateways depend on currency.') }}

{{-- Payment gateways --}}
@foreach($gateways as $gw) {{-- Selected state used to apply `bg-primary-50` — a near- white background from the old light-theme palette — which made the white text-ink label illegible on the dark theme. Swapped for brand-tinted translucent classes that contrast against both themes. --}} @endforeach
{{-- No gateways message --}}

{{ __('No payment methods available for this currency. Please select a different currency.') }}

{{-- Right: Order summary --}}

{{ __('Order Summary') }}

{{ $plan->name }} {{ __('Plan') }}

{{ $billingCycle === 'yearly' ? __('per year') : __('per month') }} ()

{{-- Coupon code input --}}

{{-- Price breakdown --}} @if($plan->features)
    @foreach($plan->features as $key => $value) @if($key !== 'trial_days') @php if (is_numeric($key)) { // Plain array: value is the feature string itself $display = is_string($value) ? $value : ''; } else { // Associative array: key is feature name, value is count/boolean $label = str_replace('_', ' ', $key); $display = is_bool($value) || $value === true ? ucfirst($label) : (strtolower((string)$value) === 'unlimited' ? 'Unlimited ' . $label : $value . ' ' . $label); } @endphp @if($display)
  • {{ $display }}
  • @endif @endif @endforeach
@endif {{-- Submit form --}}
@csrf {{-- Billing details for invoice. Backend (CheckoutController::process) already persists these to the Payment row and runs them through InvoiceService when generating the PDF, so the company name, tax ID, VAT and address all flow into the invoice the customer downloads. Collapsed by default; auto-expanded if the user already saved billing details on a previous purchase. --}}

{{ __('These details will appear on your invoice. Leave blank if you do not need a tax-compliant invoice.') }}

@if(session('error'))
{{ session('error') }}
@endif

{{ __('By proceeding, you agree to our') }} {{ __('Terms of Service') }}. {{ __('Your subscription will auto-renew. Cancel anytime from billing settings.') }}