{% extends 'layouts/public_base.html' %}
{% load i18n %}

{% block title %}{% trans "Complaint Submitted" %} - PX360{% endblock %}

{% block content %}
<div class="max-w-2xl mx-auto px-4 py-8 md:py-12">
    <div class="glass-card rounded-2xl shadow-xl overflow-hidden animate-fade-in">
        <div class="bg-gradient-to-br from-green-400 to-green-600 p-8 text-white text-center">
            <div class="w-16 h-16 bg-white/20 rounded-2xl flex items-center justify-center mx-auto mb-4 shadow-lg">
                <i data-lucide="check-circle" class="w-8 h-8"></i>
            </div>
            <h1 class="text-2xl font-bold mb-1">{% trans "Complaint Submitted" %}</h1>
            <p class="text-green-100 text-sm">{% trans "Thank you for sharing your experience with us" %}</p>
        </div>

        <div class="p-6 md:p-8">
            {% if complaint.reference_number %}
            <div class="text-center mb-6 p-5 bg-gradient-to-br from-navy to-blue rounded-xl text-white shadow-lg relative overflow-hidden">
                <div class="absolute -top-12 -right-12 w-32 h-32 bg-white/10 rounded-full"></div>
                <div class="relative z-10">
                    <p class="text-xs text-white/70 font-semibold uppercase tracking-wider mb-1">{% trans "Reference Number" %}</p>
                    <p class="text-2xl font-mono font-bold tracking-wider">{{ complaint.reference_number }}</p>
                    <p class="text-xs text-white/60 mt-1">{% trans "Save this number to track your complaint" %}</p>
                </div>
            </div>
            {% endif %}

            <div class="mb-6">
                <h3 class="text-sm font-bold text-navy mb-3 flex items-center gap-2">
                    <i data-lucide="info" class="w-4 h-4 text-blue"></i>
                    {% trans "What Happens Next" %}
                </h3>
                <div class="space-y-2.5">
                    <div class="flex gap-3 text-sm text-slate items-start">
                        <div class="w-6 h-6 rounded-full bg-navy/10 flex items-center justify-center flex-shrink-0 mt-0.5">
                            <span class="text-xs font-bold text-navy">1</span>
                        </div>
                        <span>{% trans "Your complaint will be reviewed by our patient experience team" %}</span>
                    </div>
                    <div class="flex gap-3 text-sm text-slate items-start">
                        <div class="w-6 h-6 rounded-full bg-navy/10 flex items-center justify-center flex-shrink-0 mt-0.5">
                            <span class="text-xs font-bold text-navy">2</span>
                        </div>
                        <span>{% trans "An AI system will analyze and classify your complaint automatically" %}</span>
                    </div>
                    <div class="flex gap-3 text-sm text-slate items-start">
                        <div class="w-6 h-6 rounded-full bg-navy/10 flex items-center justify-center flex-shrink-0 mt-0.5">
                            <span class="text-xs font-bold text-navy">3</span>
                        </div>
                        <span>{% trans "A team member may contact you for further details if needed" %}</span>
                    </div>
                    <div class="flex gap-3 text-sm text-slate items-start">
                        <div class="w-6 h-6 rounded-full bg-navy/10 flex items-center justify-center flex-shrink-0 mt-0.5">
                            <span class="text-xs font-bold text-navy">4</span>
                        </div>
                        <span>{% trans "You'll receive updates via SMS as your complaint progresses" %}</span>
                    </div>
                </div>
            </div>

            <div class="flex flex-col gap-3">
                <a href="{% url 'complaints:public_complaint_track' %}?reference={{ complaint.reference_number }}"
                   class="w-full px-6 py-3.5 bg-gradient-to-r from-navy to-blue text-white font-bold rounded-xl hover:shadow-lg hover:-translate-y-0.5 transition-all duration-300 flex items-center justify-center gap-2 btn-hover">
                    <i data-lucide="search" class="w-5 h-5"></i>
                    {% trans "Track Your Complaint" %}
                </a>
                <a href="/"
                   class="w-full px-6 py-3.5 border-2 border-slate-200 text-slate font-semibold rounded-xl hover:border-navy hover:bg-navy hover:text-white transition-all duration-300 flex items-center justify-center gap-2 btn-hover">
                    <i data-lucide="home" class="w-5 h-5"></i>
                    {% trans "Go Home" %}
                </a>
            </div>
        </div>
    </div>
</div>
{% endblock %}

{% block extra_js %}
<script>
    lucide.createIcons();
</script>
{% endblock %}
