{% extends 'adminapp/master.html' %}
{% load static %}
{% load widget_tweaks %}

{% block content %}
<div class="page-content">
  <div class="container-fluid">
    <!-- Page Title -->
    <div class="row">
      <div class="col-12">
        <div class="page-title-box">
          <h4 class="mb-0 fw-semibold">{{ title }}</h4>
          <ol class="breadcrumb mb-0">
            <li class="breadcrumb-item"><a href="{% url 'manageadtype' %}">Manage AdTypes</a></li>
            <li class="breadcrumb-item active text-primary">Add AdType</li>
          </ol>
        </div>
      </div>
    </div>

    <!-- Form Section -->
    <div class="row justify-content-center mt-5">
      <div class="col-md-8 col-lg-6">
        <div class="card shadow border-0 rounded-4">
          <div class="card-header bg-light rounded-top-4 text-center">
            <h5 class="mb-0 py-2">Add New Ad Type</h5>
          </div>
          <div class="card-body p-4">
            <form method="post">
              {% csrf_token %}

              <div class="mb-3">
                <label for="{{ form.name.id_for_label }}" class="form-label fw-semibold">Ad Type Name:</label>
                {{ form.name|add_class:"form-control rounded-pill shadow-sm" }}
              </div>

              <div class="d-flex justify-content-center gap-3 mt-4">
                <button type="submit" class="btn btn-success px-4 rounded-pill">
                  <i class="bx bx-check-circle me-1"></i> Save
                </button>
                <a href="{% url 'manageadtype' %}" class="btn btn-outline-danger px-4 rounded-pill">
                  <i class="bx bx-x-circle me-1"></i> Cancel
                </a>
              </div>
            </form>
          </div> <!-- End Card Body -->
        </div> <!-- End Card -->
      </div>
    </div>
  </div>
</div>
{% endblock %}
