{% extends 'base.html' %}

{% block titulo %} Eliminar Unidad {% endblock %}

{% block vertical %} {% include 'partes/vertical.html' %} {% endblock %}

{% block horizontal %} {% include 'partes/horizontal.html' %} {% endblock %}

{% block seccion %}
<div class="d-flex align-items-left align-items-md-center flex-column flex-md-row pt-2 pb-4">
    <div>
        <h3 class="fw-bold mb-3">Eliminar Unidad</h3>
        <h6 class="op-7 mb-2">Servicio de Transporte del Ejército Bolivariano</h6>
    </div>
</div>
{% endblock %}

{% block contenido %}
<div class="container mt-5">
    <div class="row justify-content-center">
        <div class="col-md-8 col-lg-6">
            <div class="card shadow-lg border-danger">
                <div class="card-header bg-danger text-white py-3">
                    <h3 class="mb-0 text-center">
                        <i class="bi bi-trash me-2"></i>Confirmar Eliminación
                    </h3>
                </div>
                <div class="card-body p-4">
                    {% if messages %}
                        {% for message in messages %}
                            <div class="alert alert-{{ message.tags }} alert-dismissible fade show" role="alert">
                                {{ message }}
                                <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                            </div>
                        {% endfor %}
                    {% endif %}

                    <p class="text-center">¿Estás seguro de que deseas eliminar la unidad <strong>{{ unidades.nombre }}</strong>?</p>
                    <form method="post" class="text-center">
                        {% csrf_token %}
                        <button type="submit" class="btn btn-danger px-4">
                            <i class="bi bi-trash me-2"></i>Eliminar
                        </button>
                        <a href="{% url 'unidad_list' %}" class="btn btn-secondary px-4">
                            <i class="bi bi-x-circle me-2"></i>Cancelar
                        </a>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<style>
    .card { border-radius: 15px; }
    .card-header { border-radius: 15px 15px 0 0 !important; }
</style>
{% endblock %}

{% block pie %} {% include 'partes/pie.html' %} {% endblock %}