<!-- Connection Header -->
{% if current_connection %}
<header class="bg-primary text-primary-content shadow-lg mb-6" role="banner" aria-label="Aktuelle Solr-Verbindung">
    <div class="max-w-7xl mx-auto px-4 py-3">
        <div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2">
            <!-- Connection Info -->
            <div class="flex items-center gap-3">
                <div class="flex items-center gap-2">
                    <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.141 0M1.394 9.393c5.857-5.857 15.355-5.857 21.213 0" />
                    </svg>
                    <span class="font-semibold">{{ current_connection.name }}</span>
                </div>
                <div class="hidden sm:block text-primary-content/70">
                    <span class="text-sm">{{ current_connection.core }}</span>
                    <span class="mx-1">•</span>
                    <span class="text-xs">{{ current_connection.url }}</span>
                </div>
            </div>

            <!-- Mobile Connection Details -->
            <div class="sm:hidden text-primary-content/70 text-sm">
                <div>Core: {{ current_connection.core }}</div>
                <div class="text-xs">{{ current_connection.url }}</div>
            </div>

            <!-- Actions -->
            <nav class="flex items-center gap-2" role="navigation" aria-label="Hauptnavigation">
                <a href="/connections"
                   class="btn btn-sm btn-ghost text-primary-content hover:bg-primary-content/20"
                   aria-label="Zu Verbindungsverwaltung wechseln">
                    <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.111 16.404a5.5 5.5 0 717.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.141 0M1.394 9.393c5.857-5.857 15.355-5.857 21.213 0" />
                    </svg>
                    <span class="hidden sm:inline">Verbindung wechseln</span>
                    <span class="sm:hidden">Wechseln</span>
                </a>
                <a href="/"
                   class="btn btn-sm btn-ghost text-primary-content hover:bg-primary-content/20"
                   aria-label="Zur Suchseite">
                    <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2H5a2 2 0 00-2-2z" />
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5a2 2 0 012-2h4a2 2 0 012 2v2H8V5z" />
                    </svg>
                    <span class="hidden sm:inline">Suche</span>
                    <span class="sm:hidden">Home</span>
                </a>
            </nav>
        </div>
    </div>
</header>
{% endif %}
