<div class="p-6 fade-in">
    {% if success %}
    <div class="bg-{% if is_successful %}sage{% elif is_pending %}clay{% else %}terra{% endif %}-50 border border-{% if is_successful %}sage{% elif is_pending %}clay{% else %}terra{% endif %}-200 rounded-lg p-4">
        <div class="flex items-start gap-3">
            {% if is_successful %}
            <svg class="w-6 h-6 text-sage-600 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
            </svg>
            {% elif is_pending %}
            <svg class="w-6 h-6 text-clay-600 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
            </svg>
            {% else %}
            <svg class="w-6 h-6 text-terra-600 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"/>
            </svg>
            {% endif %}
            
            <div class="flex-1">
                <h3 class="font-medium text-{% if is_successful %}sage{% elif is_pending %}clay{% else %}terra{% endif %}-800">
                    {{ status_description }}
                </h3>
                
                <div class="mt-4 grid sm:grid-cols-2 gap-3">
                    <div class="bg-white p-3 rounded border border-clay-200">
                        <p class="text-xs text-clay-500">Transaction Ref</p>
                        <p class="font-mono text-sm text-clay-800">{{ trans_ref }}</p>
                    </div>
                    
                    <div class="bg-white p-3 rounded border border-clay-200">
                        <p class="text-xs text-clay-500">Business Ref</p>
                        <p class="font-mono text-sm text-clay-800">{{ business_ref|default:"-" }}</p>
                    </div>
                    
                    <div class="bg-white p-3 rounded border border-clay-200">
                        <p class="text-xs text-clay-500">Amount</p>
                        <p class="font-semibold text-clay-800">{{ currency }} {{ trans_amount|floatformat:2 }}</p>
                    </div>
                    
                    <div class="bg-white p-3 rounded border border-clay-200">
                        <p class="text-xs text-clay-500">Debited Amount</p>
                        <p class="font-semibold text-clay-800">{{ currency }} {{ debited_amount|floatformat:2 }}</p>
                    </div>
                    
                    <div class="bg-white p-3 rounded border border-clay-200">
                        <p class="text-xs text-clay-500">Fee</p>
                        <p class="text-sm text-clay-800">{{ currency }} {{ fee_amount|floatformat:2 }}</p>
                    </div>
                    
                    <div class="bg-white p-3 rounded border border-clay-200">
                        <p class="text-xs text-clay-500">Settlement Amount</p>
                        <p class="text-sm text-clay-800">{{ currency }} {{ settlement_amount|floatformat:2 }}</p>
                    </div>
                    
                    <div class="bg-white p-3 rounded border border-clay-200">
                        <p class="text-xs text-clay-500">Customer</p>
                        <p class="text-sm text-clay-800">{{ customer_id }}</p>
                    </div>
                    
                    <div class="bg-white p-3 rounded border border-clay-200">
                        <p class="text-xs text-clay-500">Date</p>
                        <p class="text-sm text-clay-800">{{ transaction_date }}</p>
                    </div>
                    
                    <div class="bg-white p-3 rounded border border-clay-200 sm:col-span-2">
                        <p class="text-xs text-clay-500">Status Code</p>
                        <p class="text-sm">
                            <span class="px-2 py-0.5 bg-{% if is_successful %}sage{% elif is_pending %}clay{% else %}terra{% endif %}-100 text-{% if is_successful %}sage{% elif is_pending %}clay{% else %}terra{% endif %}-800 rounded font-mono">{{ status_code }}</span>
                        </p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    {% else %}
    <div class="bg-terra-50 border border-terra-200 rounded-lg p-4">
        <div class="flex items-start gap-3">
            <svg class="w-6 h-6 text-terra-600 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
            </svg>
            <div>
                <h3 class="font-medium text-terra-800">Verification Failed</h3>
                <p class="text-terra-700 text-sm mt-1">{{ error }}</p>
                {% if details %}
                <pre class="mt-3 p-3 bg-terra-100 rounded text-xs overflow-x-auto"><code>{{ details }}</code></pre>
                {% endif %}
            </div>
        </div>
    </div>
    {% endif %}
</div>
