<div class="border flex flex-col flex-grow overflow-hidden p-6 relative rounded shadow-sm dark:border-base-800 {% if class %} {{ class }}{% endif %}">
    {% if title %}
        <h2 class="bg-base-50 border-b font-semibold mb-6 -mt-6 -mx-6 py-4 px-6 text-font-important-light dark:text-font-important-dark dark:border-base-800 dark:bg-white/[.02]">
            {{ title }}
        </h2>
    {% endif %}

    <div class="flex-grow relative {% if icon %} pl-6{% endif %}">
        {{ children }}

        {% if label %}
            <div class="absolute right-0 top-0">
                {% include "unfold/helpers/label.html" with text=label type="primary" %}
            </div>
        {% endif %}

        {% if icon %}
            <span class="material-symbols-outlined absolute -left-6 text-base-300 top-1/2 -translate-x-1/3 -translate-y-1/2 !text-6xl dark:text-base-500">{{ icon }}</span>
        {% endif %}
    </div>

    {% if footer %}
        <div class="border-t flex items-center -mb-6 -mx-6 mt-6 pb-2 pt-2 px-6 text-sm dark:border-base-800">
            {{ footer }}
        </div>
    {% endif %}
</div>
