<div class="apps-dropdown-content">
    <div class="apps-dropdown-title">Applications</div>
    <div class="apps-grid">
        {% for app in apps %}
        <a href="{{ app.url }}"
           class="app-item {% if app.active %}active{% endif %}"
           hx-get="{{ app.url }}"
           hx-target="#main-content"
           hx-push-url="true">
            <span class="app-icon">{{ app.icon }}</span>
            <span class="app-name">{{ app.name }}</span>
        </a>
        {% endfor %}
    </div>
</div>

<style>
    .apps-dropdown-content {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 0.5rem;
        min-width: 250px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .apps-dropdown-title {
        font-weight: 600;
        padding: 0.5rem;
        border-bottom: 1px solid var(--border);
        margin-bottom: 0.5rem;
    }

    .apps-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .app-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0.75rem 0.5rem;
        border-radius: var(--radius);
        text-decoration: none;
        color: var(--text);
        transition: all 0.2s ease;
        text-align: center;
    }

    .app-item:hover {
        background: var(--background);
    }

    .app-item.active {
        background: var(--primary);
        color: white;
    }

    .app-icon {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .app-name {
        font-size: 0.75rem;
        font-weight: 500;
    }
</style>
