@extends('layouts.master')

@section('title', 'Payment Successful')

@section('content')
<div class="container py-5">
    <div class="row justify-content-center">
        <div class="col-lg-6">
            <div class="card shadow-lg text-center">
                <div class="card-body p-5">
                    <div class="mb-4">
                        <i class="bi bi-check-circle-fill text-success" style="font-size: 5rem;"></i>
                    </div>
                    <h2 class="text-success mb-3">Payment Successful!</h2>
                    <p class="lead text-muted mb-4">
                        Your products have been promoted successfully
                    </p>

                    <div class="bg-light rounded p-4 mb-4">
                        <div class="row g-3">
                            <div class="col-6 text-start">
                                <small class="text-muted">Transaction ID:</small>
                                <p class="mb-0 fw-bold">#{{ $transaction->id }}</p>
                            </div>
                            <div class="col-6 text-end">
                                <small class="text-muted">Amount Paid:</small>
                                <p class="mb-0 fw-bold text-success">₹{{ number_format($transaction->total_amount, 2) }}</p>
                            </div>
                            <div class="col-12">
                                <small class="text-muted">Payment Method:</small>
                                <p class="mb-0 fw-bold text-capitalize">{{ $transaction->payment_method }}</p>
                            </div>
                            <div class="col-12">
                                <small class="text-muted">Package:</small>
                                <p class="mb-0 fw-bold">{{ $transaction->metadata['package_name'] ?? 'N/A' }}</p>
                            </div>
                            <div class="col-12">
                                <small class="text-muted">Products Promoted:</small>
                                <p class="mb-0 fw-bold">{{ $transaction->metadata['product_count'] ?? 0 }} Products</p>
                            </div>
                        </div>
                    </div>

                    <div class="alert alert-success mb-4">
                        <i class="bi bi-info-circle me-2"></i>
                        Your promotion is now live! It may take a few minutes to appear on the website.
                    </div>

                    <div class="d-grid gap-2">
                        <a href="{{ route('seller.promotions.index') }}" class="btn btn-primary btn-lg">
                            <i class="bi bi-list-ul me-2"></i>View My Promotions
                        </a>
                        <a href="{{ route('seller.dashboard') }}" class="btn btn-outline-secondary">
                            <i class="bi bi-house me-2"></i>Back to Dashboard
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
