{% extends 'hosting_app/base_hosting.html' %}
{% load static %}

{% block title %}{{ venue.venue_name }} | Host Venue Detail{% endblock %}

{% block content %}

<style>
    /* =========================================================
       HOST VENUE DETAIL — PREMIUM DASHBOARD STYLE
    ========================================================= */

    .hosting-venue-detail-page {
        min-height: 100vh;
        padding: 4rem 0 5rem;
        background:
            radial-gradient(circle at top left, rgba(255, 193, 7, 0.12), transparent 28%),
            radial-gradient(circle at top right, rgba(116, 49, 41, 0.10), transparent 32%),
            linear-gradient(180deg, #fffaf5 0%, #fff4e8 42%, #ffffff 100%);
    }

    .hosting-venue-detail-hero {
        position: relative;
        overflow: hidden;
        border-radius: 38px;
        min-height: 430px;
        margin-bottom: 2rem;
        color: #ffffff;
        background:
            linear-gradient(
                100deg,
                rgba(45, 23, 22, 0.94) 0%,
                rgba(45, 23, 22, 0.86) 45%,
                rgba(116, 49, 41, 0.56) 100%
            );
        box-shadow: 0 30px 68px rgba(58, 30, 24, 0.20);
    }

    .hosting-venue-detail-hero-bg {
        position: absolute;
        inset: 0;
        z-index: 0;
    }

    .hosting-venue-detail-hero-bg img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .hosting-venue-detail-hero-bg::after {
        content: "";
        position: absolute;
        inset: 0;
        background:
            radial-gradient(circle at top right, rgba(255, 211, 107, 0.22), transparent 34%),
            linear-gradient(
                100deg,
                rgba(45, 23, 22, 0.96) 0%,
                rgba(45, 23, 22, 0.88) 45%,
                rgba(116, 49, 41, 0.60) 100%
            );
    }

    .hosting-venue-detail-hero-placeholder {
        position: absolute;
        inset: 0;
        background:
            radial-gradient(circle at top right, rgba(255, 193, 7, 0.18), transparent 34%),
            linear-gradient(135deg, #2d1716 0%, #743129 56%, #a7601b 100%);
    }

    .hosting-venue-detail-hero-inner {
        position: relative;
        z-index: 2;
        padding: 3rem 2.4rem;
        min-height: 430px;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }

    .hosting-venue-detail-kicker {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        width: fit-content;
        padding: 0.52rem 1rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.14);
        border: 1px solid rgba(255, 255, 255, 0.22);
        color: #ffe7aa;
        font-size: 0.84rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 1rem;
        backdrop-filter: blur(10px);
    }

    .hosting-venue-detail-hero h1 {
        font-size: clamp(2.15rem, 4vw, 3.65rem);
        font-weight: 950;
        line-height: 1.08;
        letter-spacing: -0.045em;
        margin-bottom: 0.75rem;
        max-width: 900px;
    }

    .hosting-venue-detail-hero p {
        max-width: 850px;
        margin-bottom: 0;
        color: rgba(255, 255, 255, 0.88);
        font-size: 1.03rem;
        line-height: 1.8;
    }

    .hosting-venue-detail-badges {
        display: flex;
        flex-wrap: wrap;
        gap: 0.65rem;
        margin: 1.4rem 0 1.6rem;
    }

    .hosting-detail-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.5rem 0.82rem;
        border-radius: 999px;
        font-size: 0.78rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        background: rgba(255, 255, 255, 0.14);
        border: 1px solid rgba(255, 255, 255, 0.20);
        color: #ffffff;
        backdrop-filter: blur(8px);
    }

    .hosting-detail-badge.gold {
        background: rgba(255, 193, 7, 0.92);
        color: #2d1716;
        border-color: rgba(255, 193, 7, 0.95);
    }

    .hosting-detail-badge.white {
        background: rgba(255, 255, 255, 0.92);
        color: #2d1716;
    }

    .hosting-venue-detail-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.85rem;
    }

    .hosting-venue-detail-actions .btn {
        border-radius: 999px;
        font-weight: 850;
        padding: 0.82rem 1.35rem;
        min-height: 48px;
    }

    .hosting-btn-gold {
        background: #ffc107;
        color: #2d1716;
        border: none;
    }

    .hosting-btn-gold:hover {
        background: #ffe082;
        color: #2d1716;
        transform: translateY(-1px);
    }

    .hosting-btn-light-outline {
        background: rgba(255, 255, 255, 0.10);
        color: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.42);
    }

    .hosting-btn-light-outline:hover {
        background: #ffffff;
        color: #2d1716;
    }

    .hosting-detail-card {
        border-radius: 34px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(239, 226, 211, 0.95);
        box-shadow: 0 24px 56px rgba(58, 30, 24, 0.10);
        overflow: hidden;
        margin-bottom: 1.5rem;
    }

    .hosting-detail-card-header {
        padding: 1.55rem 1.7rem 1.1rem;
        border-bottom: 1px solid #efe2d3;
        background:
            radial-gradient(circle at top right, rgba(255, 193, 7, 0.08), transparent 28%),
            linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
    }

    .hosting-detail-card-header h2,
    .hosting-detail-card-header h3 {
        color: #2d1716;
        font-weight: 950;
        margin-bottom: 0.35rem;
    }

    .hosting-detail-card-header p {
        color: #7a655d;
        margin-bottom: 0;
        line-height: 1.65;
    }

    .hosting-detail-card-body {
        padding: 1.7rem;
    }

    .hosting-description {
        color: #6f5b53;
        line-height: 1.85;
        font-size: 1rem;
        margin-bottom: 0;
        white-space: pre-line;
    }

    .hosting-info-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .hosting-info-item {
        border-radius: 22px;
        border: 1px solid #efe2d3;
        background: #fffaf5;
        padding: 1rem;
    }

    .hosting-info-item span {
        display: block;
        color: #7a655d;
        font-size: 0.76rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 0.3rem;
    }

    .hosting-info-item strong,
    .hosting-info-item a {
        color: #2d1716;
        font-weight: 900;
        text-decoration: none;
        word-break: break-word;
    }

    .hosting-info-item a:hover {
        color: #a7601b;
        text-decoration: underline;
    }

    .hosting-chip-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0.65rem;
    }

    .hosting-chip {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        border-radius: 999px;
        padding: 0.56rem 0.85rem;
        background: #fffaf5;
        border: 1px solid #efe2d3;
        color: #6f5b53;
        font-size: 0.84rem;
        font-weight: 800;
    }

    .hosting-chip.active {
        background: #fff4e4;
        color: #2d1716;
        border-color: #efd7ae;
    }

    .hosting-chip i {
        color: #a7601b;
    }

    .hosting-gallery-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
    }

    .hosting-gallery-item {
        border-radius: 22px;
        overflow: hidden;
        border: 1px solid #efe2d3;
        background: #fffaf5;
    }

    .hosting-gallery-item img {
        width: 100%;
        height: 170px;
        object-fit: cover;
        display: block;
    }

    .hosting-gallery-caption {
        padding: 0.8rem 0.9rem;
        color: #6f5b53;
        font-size: 0.9rem;
        line-height: 1.55;
    }

    .hosting-mini-list {
        display: grid;
        gap: 0.85rem;
    }

    .hosting-mini-item {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 1rem;
        border: 1px solid #efe2d3;
        border-radius: 20px;
        background: #fffaf5;
        padding: 1rem;
    }

    .hosting-mini-item h4 {
        color: #2d1716;
        font-size: 1rem;
        font-weight: 900;
        margin-bottom: 0.25rem;
    }

    .hosting-mini-item p {
        color: #7a655d;
        line-height: 1.55;
        font-size: 0.9rem;
        margin-bottom: 0;
    }

    .hosting-mini-pill {
        flex-shrink: 0;
        border-radius: 999px;
        padding: 0.4rem 0.65rem;
        background: #fff4e4;
        color: #a7601b;
        font-size: 0.74rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        white-space: nowrap;
    }

    .hosting-empty-mini {
        border-radius: 22px;
        border: 1px dashed #d8bfa3;
        background: #fffaf5;
        padding: 1.4rem;
        color: #7a655d;
        line-height: 1.7;
        text-align: center;
    }

    .hosting-empty-mini i {
        display: block;
        color: #a7601b;
        font-size: 2rem;
        margin-bottom: 0.65rem;
    }

    .hosting-side-card {
        border-radius: 34px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(239, 226, 211, 0.95);
        box-shadow: 0 24px 56px rgba(58, 30, 24, 0.09);
        overflow: hidden;
        margin-bottom: 1.5rem;
    }

    .hosting-side-card-header {
        padding: 1.45rem 1.55rem 1rem;
        border-bottom: 1px solid #efe2d3;
        background:
            radial-gradient(circle at top right, rgba(255, 193, 7, 0.08), transparent 28%),
            linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
    }

    .hosting-side-card-header h3 {
        color: #2d1716;
        font-weight: 950;
        margin-bottom: 0.25rem;
    }

    .hosting-side-card-header p {
        color: #7a655d;
        line-height: 1.65;
        margin-bottom: 0;
    }

    .hosting-side-card-body {
        padding: 1.45rem;
    }

    .hosting-side-action-list {
        display: grid;
        gap: 0.65rem;
    }

    .hosting-side-action-list .btn {
        border-radius: 999px;
        min-height: 46px;
        font-weight: 850;
    }

    .hosting-notes-box {
        border-radius: 24px;
        border: 1px solid #efd7ae;
        background: #fff4e4;
        padding: 1.15rem;
        color: #7a4c18;
        line-height: 1.75;
        white-space: pre-line;
    }

    @media (max-width: 1199.98px) {
        .hosting-gallery-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    @media (max-width: 991.98px) {
        .hosting-venue-detail-page {
            padding-top: 2.8rem;
        }

        .hosting-venue-detail-hero,
        .hosting-venue-detail-hero-inner {
            min-height: auto;
        }

        .hosting-venue-detail-hero-inner {
            padding: 2.4rem 1.45rem;
        }
    }

    @media (max-width: 767.98px) {
        .hosting-venue-detail-hero {
            border-radius: 30px;
        }

        .hosting-venue-detail-actions {
            flex-direction: column;
            align-items: stretch;
        }

        .hosting-venue-detail-actions .btn {
            width: 100%;
        }

        .hosting-info-grid {
            grid-template-columns: 1fr;
        }

        .hosting-gallery-grid {
            grid-template-columns: 1fr;
        }

        .hosting-detail-card-body,
        .hosting-detail-card-header,
        .hosting-side-card-header,
        .hosting-side-card-body {
            padding-left: 1.15rem;
            padding-right: 1.15rem;
        }
    }
</style>


<section class="hosting-venue-detail-page">
    <div class="container">

        <!-- HERO -->
        <div class="hosting-venue-detail-hero">

            {% if venue.cover_image %}
                <div class="hosting-venue-detail-hero-bg">
                    <img src="{{ venue.cover_image.url }}" alt="{{ venue.venue_name }}">
                </div>
            {% else %}
                <div class="hosting-venue-detail-hero-placeholder"></div>
            {% endif %}

            <div class="hosting-venue-detail-hero-inner">

                <span class="hosting-venue-detail-kicker">
                    <i class="bi bi-building-heart"></i>
                    {% if venue.venue_category %}
                        {{ venue.get_venue_category_display }}
                    {% else %}
                        Host Venue
                    {% endif %}
                </span>

                <h1>{{ venue.venue_name }}</h1>

                <p>
                    {{ venue.short_description }}
                </p>

                <div class="hosting-venue-detail-badges">

                    <span class="hosting-detail-badge white">
                        <i class="bi bi-circle-fill"></i>
                        {% if venue.listing_status %}
                            {{ venue.get_listing_status_display }}
                        {% else %}
                            Draft
                        {% endif %}
                    </span>

                    {% if venue.is_public %}
                        <span class="hosting-detail-badge">
                            <i class="bi bi-eye-fill"></i>
                            Public
                        </span>
                    {% else %}
                        <span class="hosting-detail-badge">
                            <i class="bi bi-eye-slash-fill"></i>
                            Not Public
                        </span>
                    {% endif %}

                    {% if venue.is_featured %}
                        <span class="hosting-detail-badge gold">
                            <i class="bi bi-star-fill"></i>
                            Featured
                        </span>
                    {% endif %}

                    {% if venue.max_guest_capacity %}
                        <span class="hosting-detail-badge">
                            <i class="bi bi-people-fill"></i>
                            Up to {{ venue.max_guest_capacity }} Guests
                        </span>
                    {% endif %}

                </div>

                <div class="hosting-venue-detail-actions">
                    <a href="{% url 'hosting_app:host_venue_update' venue.slug %}"
                       class="btn hosting-btn-gold">
                        <i class="bi bi-pencil-square me-2"></i>
                        Edit Venue
                    </a>

                    <a href="{% url 'hosting_app:host_venue_gallery_manage' venue.slug %}"
                       class="btn hosting-btn-light-outline">
                        <i class="bi bi-images me-2"></i>
                        Manage Gallery
                    </a>

                    <a href="{% url 'hosting_app:host_venue_list' %}"
                       class="btn hosting-btn-light-outline">
                        <i class="bi bi-arrow-left-circle me-2"></i>
                        Back to Venues
                    </a>
                </div>

            </div>
        </div>


        <div class="row g-4 align-items-start">

            <!-- MAIN CONTENT -->
            <div class="col-lg-8">

                <!-- DESCRIPTION -->
                <div class="hosting-detail-card">
                    <div class="hosting-detail-card-header">
                        <h2>Venue Description</h2>
                        <p>
                            Main details guests and Ensolanka staff can use to understand this venue.
                        </p>
                    </div>

                    <div class="hosting-detail-card-body">
                        <p class="hosting-description">
                            {{ venue.full_description }}
                        </p>
                    </div>
                </div>


                <!-- LOCATION -->
                <div class="hosting-detail-card">
                    <div class="hosting-detail-card-header">
                        <h3>Location & Access</h3>
                        <p>
                            District, city, address, and map details for this venue.
                        </p>
                    </div>

                    <div class="hosting-detail-card-body">
                        <div class="hosting-info-grid">

                            <div class="hosting-info-item">
                                <span>District</span>
                                <strong>
                                    {% if venue.get_district_display %}
                                        {{ venue.get_district_display }}
                                    {% else %}
                                        {{ venue.district }}
                                    {% endif %}
                                </strong>
                            </div>

                            <div class="hosting-info-item">
                                <span>City</span>
                                <strong>
                                    {% if venue.get_city_display %}
                                        {{ venue.get_city_display }}
                                    {% else %}
                                        {{ venue.city }}
                                    {% endif %}
                                </strong>
                            </div>

                            <div class="hosting-info-item">
                                <span>Address</span>
                                <strong>
                                    {% if venue.address %}
                                        {{ venue.address|linebreaksbr }}
                                    {% else %}
                                        Not provided
                                    {% endif %}
                                </strong>
                            </div>

                            <div class="hosting-info-item">
                                <span>Google Map</span>
                                {% if venue.google_map_link %}
                                    <a href="{{ venue.google_map_link }}" target="_blank">
                                        Open Map
                                        <i class="bi bi-box-arrow-up-right ms-1"></i>
                                    </a>
                                {% else %}
                                    <strong>Not provided</strong>
                                {% endif %}
                            </div>

                        </div>
                    </div>
                </div>


                <!-- EVENT SUITABILITY -->
                <div class="hosting-detail-card">
                    <div class="hosting-detail-card-header">
                        <h3>Event Suitability</h3>
                        <p>
                            Celebration types this venue can support.
                        </p>
                    </div>

                    <div class="hosting-detail-card-body">
                        <div class="hosting-chip-grid">

                            {% if venue.supports_romantic_dates %}
                                <span class="hosting-chip active"><i class="bi bi-heart-fill"></i> Romantic Dates</span>
                            {% endif %}

                            {% if venue.supports_proposal_events %}
                                <span class="hosting-chip active"><i class="bi bi-gem"></i> Proposal Events</span>
                            {% endif %}

                            {% if venue.supports_anniversaries %}
                                <span class="hosting-chip active"><i class="bi bi-calendar-heart"></i> Anniversaries</span>
                            {% endif %}

                            {% if venue.supports_birthdays %}
                                <span class="hosting-chip active"><i class="bi bi-cake2-fill"></i> Birthdays</span>
                            {% endif %}

                            {% if venue.supports_honeymoon_experiences %}
                                <span class="hosting-chip active"><i class="bi bi-suit-heart-fill"></i> Honeymoon Experiences</span>
                            {% endif %}

                            {% if venue.supports_private_dinners %}
                                <span class="hosting-chip active"><i class="bi bi-cup-hot-fill"></i> Private Dinners</span>
                            {% endif %}

                            {% if venue.supports_engagement_events %}
                                <span class="hosting-chip active"><i class="bi bi-stars"></i> Engagement Events</span>
                            {% endif %}

                            {% if venue.supports_small_weddings %}
                                <span class="hosting-chip active"><i class="bi bi-flower1"></i> Small Weddings</span>
                            {% endif %}

                            {% if venue.supports_custom_celebrations %}
                                <span class="hosting-chip active"><i class="bi bi-magic"></i> Custom Celebrations</span>
                            {% endif %}

                            {% if not venue.supports_romantic_dates and not venue.supports_proposal_events and not venue.supports_anniversaries and not venue.supports_birthdays and not venue.supports_honeymoon_experiences and not venue.supports_private_dinners and not venue.supports_engagement_events and not venue.supports_small_weddings and not venue.supports_custom_celebrations %}
                                <div class="hosting-empty-mini w-100">
                                    <i class="bi bi-heart"></i>
                                    No event suitability options selected yet.
                                </div>
                            {% endif %}

                        </div>
                    </div>
                </div>


                <!-- FACILITIES -->
                <div class="hosting-detail-card">
                    <div class="hosting-detail-card-header">
                        <h3>Facilities & Capabilities</h3>
                        <p>
                            Practical venue capabilities available for guest arrangements.
                        </p>
                    </div>

                    <div class="hosting-detail-card-body">
                        <div class="hosting-chip-grid">

                            {% if venue.meal_service_available %}
                                <span class="hosting-chip active"><i class="bi bi-cup-hot-fill"></i> Meal Service</span>
                            {% endif %}

                            {% if venue.alcohol_available %}
                                <span class="hosting-chip active"><i class="bi bi-cup-straw"></i> Alcohol Available</span>
                            {% endif %}

                            {% if venue.decoration_available %}
                                <span class="hosting-chip active"><i class="bi bi-balloon-heart-fill"></i> Decoration Available</span>
                            {% endif %}

                            {% if venue.photography_allowed %}
                                <span class="hosting-chip active"><i class="bi bi-camera-fill"></i> Photography Allowed</span>
                            {% endif %}

                            {% if venue.music_allowed %}
                                <span class="hosting-chip active"><i class="bi bi-music-note-beamed"></i> Music Allowed</span>
                            {% endif %}

                            {% if venue.indoor_available %}
                                <span class="hosting-chip active"><i class="bi bi-house-heart-fill"></i> Indoor Area</span>
                            {% endif %}

                            {% if venue.outdoor_available %}
                                <span class="hosting-chip active"><i class="bi bi-tree-fill"></i> Outdoor Area</span>
                            {% endif %}

                            {% if venue.private_area_available %}
                                <span class="hosting-chip active"><i class="bi bi-shield-lock-fill"></i> Private Area</span>
                            {% endif %}

                            {% if venue.parking_available %}
                                <span class="hosting-chip active"><i class="bi bi-p-square-fill"></i> Parking</span>
                            {% endif %}

                            {% if not venue.meal_service_available and not venue.alcohol_available and not venue.decoration_available and not venue.photography_allowed and not venue.music_allowed and not venue.indoor_available and not venue.outdoor_available and not venue.private_area_available and not venue.parking_available %}
                                <div class="hosting-empty-mini w-100">
                                    <i class="bi bi-stars"></i>
                                    No facility options selected yet.
                                </div>
                            {% endif %}

                        </div>
                    </div>
                </div>


                <!-- GALLERY -->
                <div class="hosting-detail-card">
                    <div class="hosting-detail-card-header">
                        <h3>Venue Gallery</h3>
                        <p>
                            Gallery images help Ensolanka and guests understand the venue atmosphere.
                        </p>
                    </div>

                    <div class="hosting-detail-card-body">
                        {% if gallery_images %}
                            <div class="hosting-gallery-grid">
                                {% for image in gallery_images %}
                                    <div class="hosting-gallery-item">
                                        <img src="{{ image.image.url }}"
                                             alt="{{ image.caption|default:venue.venue_name }}">

                                        <div class="hosting-gallery-caption">
                                            {% if image.caption %}
                                                {{ image.caption }}
                                            {% else %}
                                                Venue gallery image
                                            {% endif %}
                                        </div>
                                    </div>
                                {% endfor %}
                            </div>
                        {% else %}
                            <div class="hosting-empty-mini">
                                <i class="bi bi-images"></i>
                                No gallery images added yet.
                                <div class="mt-3">
                                    <a href="{% url 'hosting_app:host_venue_gallery_manage' venue.slug %}"
                                       class="btn btn-outline-dark rounded-pill fw-bold">
                                        <i class="bi bi-plus-circle me-2"></i>
                                        Add Gallery Images
                                    </a>
                                </div>
                            </div>
                        {% endif %}
                    </div>
                </div>


                <!-- IMPORTANT NOTES -->
                {% if venue.important_notes %}
                    <div class="hosting-detail-card">
                        <div class="hosting-detail-card-header">
                            <h3>Important Notes</h3>
                            <p>
                                Venue rules, restrictions, advance notice requirements, or practical notes.
                            </p>
                        </div>

                        <div class="hosting-detail-card-body">
                            <div class="hosting-notes-box">
                                {{ venue.important_notes }}
                            </div>
                        </div>
                    </div>
                {% endif %}

            </div>


            <!-- SIDEBAR -->
            <div class="col-lg-4">

                <!-- QUICK INFO -->
                <div class="hosting-side-card">
                    <div class="hosting-side-card-header">
                        <h3>Venue Summary</h3>
                        <p>
                            Quick status and listing readiness information.
                        </p>
                    </div>

                    <div class="hosting-side-card-body">
                        <div class="hosting-info-grid" style="grid-template-columns: 1fr;">

                            <div class="hosting-info-item">
                                <span>Listing Status</span>
                                <strong>
                                    {% if venue.listing_status %}
                                        {{ venue.get_listing_status_display }}
                                    {% else %}
                                        Draft
                                    {% endif %}
                                </strong>
                            </div>

                            <div class="hosting-info-item">
                                <span>Public Visibility</span>
                                <strong>
                                    {% if venue.is_public %}
                                        Public
                                    {% else %}
                                        Not Public
                                    {% endif %}
                                </strong>
                            </div>

                            <div class="hosting-info-item">
                                <span>Featured</span>
                                <strong>
                                    {% if venue.is_featured %}
                                        Yes
                                    {% else %}
                                        No
                                    {% endif %}
                                </strong>
                            </div>

                            <div class="hosting-info-item">
                                <span>Gallery Images</span>
                                <strong>{{ gallery_images.count }}</strong>
                            </div>

                            <div class="hosting-info-item">
                                <span>Created</span>
                                <strong>{{ venue.created_at|date:"M d, Y" }}</strong>
                            </div>

                            <div class="hosting-info-item">
                                <span>Last Updated</span>
                                <strong>{{ venue.updated_at|date:"M d, Y" }}</strong>
                            </div>

                        </div>
                    </div>
                </div>


                <!-- ACTIONS -->
                <div class="hosting-side-card">
                    <div class="hosting-side-card-header">
                        <h3>Venue Actions</h3>
                        <p>
                            Continue preparing this venue for listing and package creation.
                        </p>
                    </div>

                    <div class="hosting-side-card-body">
                        <div class="hosting-side-action-list">

                            <a href="{% url 'hosting_app:host_venue_update' venue.slug %}"
                               class="btn btn-dark">
                                <i class="bi bi-pencil-square me-2"></i>
                                Edit Venue
                            </a>

                            <a href="{% url 'hosting_app:host_venue_gallery_manage' venue.slug %}"
                               class="btn btn-outline-dark">
                                <i class="bi bi-images me-2"></i>
                                Manage Gallery
                            </a>

                            <a href="{% url 'hosting_app:host_event_package_create_for_venue' venue.slug %}"
                               class="btn btn-outline-secondary">
                                <i class="bi bi-gift-fill me-2"></i>
                                Create Event Package
                            </a>

                            <a href="{% url 'hosting_app:host_meal_plan_create_for_venue' venue.slug %}"
                                class="btn btn-outline-dark">
                                <i class="bi bi-cup-hot-fill me-2"></i>
                                Add Meal Plan
                            </a>

                            <a href="{% url 'hosting_app:host_add_on_service_create_for_venue' venue.slug %}"
                                class="btn btn-outline-dark">
                                <i class="bi bi-stars me-2"></i>
                                Add Add-on Service
                            </a>

                            <a href="{% url 'hosting_app:host_venue_list' %}"
                               class="btn btn-outline-secondary">
                                <i class="bi bi-arrow-left-circle me-2"></i>
                                Back to Venue List
                            </a>

                        </div>
                    </div>
                </div>


                <!-- RELATED PACKAGE PREVIEW -->
                <div class="hosting-side-card">
                    <div class="hosting-side-card-header">
                        <h3>Connected Services</h3>
                        <p>
                            Packages, meal plans, and add-ons connected with this venue.
                        </p>
                    </div>

                    <div class="hosting-side-card-body">

                        <div class="hosting-mini-list">

                            <div class="hosting-mini-item">
                                <div>
                                    <h4>Event Packages</h4>
                                    <p>
                                        {% if event_packages %}
                                            {{ event_packages.count }} package{{ event_packages.count|pluralize }} connected.
                                        {% else %}
                                            No packages created yet.
                                        {% endif %}
                                    </p>
                                </div>
                                <span class="hosting-mini-pill">
                                    {{ event_packages.count|default:0 }}
                                </span>
                            </div>

                            <div class="hosting-mini-item">
                                <div>
                                    <h4>Meal Plans</h4>
                                    <p>
                                        {% if meal_plans %}
                                            {{ meal_plans.count }} meal plan{{ meal_plans.count|pluralize }} connected.
                                        {% else %}
                                            No meal plans created yet.
                                        {% endif %}
                                    </p>
                                </div>
                                <span class="hosting-mini-pill">
                                    {{ meal_plans.count|default:0 }}
                                </span>
                            </div>

                            <div class="hosting-mini-item">
                                <div>
                                    <h4>Add-on Services</h4>
                                    <p>
                                        {% if add_on_services %}
                                            {{ add_on_services.count }} add-on service{{ add_on_services.count|pluralize }} connected.
                                        {% else %}
                                            No add-on services created yet.
                                        {% endif %}
                                    </p>
                                </div>
                                <span class="hosting-mini-pill">
                                    {{ add_on_services.count|default:0 }}
                                </span>
                            </div>

                        </div>

                    </div>
                </div>

            </div>

        </div>

    </div>
</section>

{% endblock %}