diff --git a/admin-compliance/app/sdk/layout.tsx b/admin-compliance/app/sdk/layout.tsx
index 5bd3054..b475c20 100644
--- a/admin-compliance/app/sdk/layout.tsx
+++ b/admin-compliance/app/sdk/layout.tsx
@@ -7,6 +7,7 @@ import { SDKSidebar } from '@/components/sdk/Sidebar/SDKSidebar'
import { CommandBar } from '@/components/sdk/CommandBar'
import { SDKPipelineSidebar } from '@/components/sdk/SDKPipelineSidebar'
import { ComplianceAdvisorWidget } from '@/components/sdk/ComplianceAdvisorWidget'
+import { CookieBannerOverlay, CookieBannerFAB } from '@/components/sdk/CookieBannerOverlay'
import { useSDK } from '@/lib/sdk'
// =============================================================================
@@ -212,6 +213,10 @@ function SDKInnerLayout({ children }: { children: React.ReactNode }) {
{/* Compliance Advisor Widget — immer sichtbar, auch ohne Projekt */}
+
+ {/* Cookie Banner — opens on first visit, reopenable via FAB */}
+
+
)
}
diff --git a/admin-compliance/components/sdk/CookieBannerOverlay.tsx b/admin-compliance/components/sdk/CookieBannerOverlay.tsx
new file mode 100644
index 0000000..d292f3d
--- /dev/null
+++ b/admin-compliance/components/sdk/CookieBannerOverlay.tsx
@@ -0,0 +1,277 @@
+'use client'
+
+import { useState, useEffect, useCallback } from 'react'
+
+/**
+ * CookieBannerOverlay — Live cookie consent banner for the Compliance SDK.
+ *
+ * - Opens automatically on first visit (localStorage check)
+ * - Can be reopened via FAB button (right-[10rem])
+ * - Records consent choice to localStorage
+ * - Fires custom event 'sdkCookieConsentUpdated' for other components
+ */
+
+const STORAGE_KEY = 'bp-sdk-cookie-consent'
+
+interface ConsentState {
+ necessary: boolean
+ statistics: boolean
+ marketing: boolean
+ functional: boolean
+ timestamp: string
+}
+
+function getStoredConsent(): ConsentState | null {
+ if (typeof window === 'undefined') return null
+ try {
+ const raw = localStorage.getItem(STORAGE_KEY)
+ if (!raw) return null
+ return JSON.parse(raw)
+ } catch {
+ return null
+ }
+}
+
+export function CookieBannerOverlay() {
+ const [isOpen, setIsOpen] = useState(false)
+ const [showSettings, setShowSettings] = useState(false)
+ const [consent, setConsent] = useState({
+ necessary: true,
+ statistics: false,
+ marketing: false,
+ functional: false,
+ timestamp: '',
+ })
+
+ // Check on mount if consent was already given
+ useEffect(() => {
+ const stored = getStoredConsent()
+ if (!stored) {
+ // First visit — show banner
+ setIsOpen(true)
+ } else {
+ setConsent(stored)
+ }
+ }, [])
+
+ // Listen for reopen event from FAB button
+ useEffect(() => {
+ const handler = () => {
+ setIsOpen(true)
+ setShowSettings(true)
+ }
+ window.addEventListener('openCookieBanner', handler)
+ return () => window.removeEventListener('openCookieBanner', handler)
+ }, [])
+
+ const saveConsent = useCallback((state: ConsentState) => {
+ const withTimestamp = { ...state, timestamp: new Date().toISOString() }
+ localStorage.setItem(STORAGE_KEY, JSON.stringify(withTimestamp))
+ setConsent(withTimestamp)
+ setIsOpen(false)
+ setShowSettings(false)
+ window.dispatchEvent(new CustomEvent('sdkCookieConsentUpdated', { detail: withTimestamp }))
+ }, [])
+
+ const handleAcceptAll = () => {
+ saveConsent({ necessary: true, statistics: true, marketing: true, functional: true, timestamp: '' })
+ }
+
+ const handleRejectAll = () => {
+ saveConsent({ necessary: true, statistics: false, marketing: false, functional: false, timestamp: '' })
+ }
+
+ const handleSaveSettings = () => {
+ saveConsent(consent)
+ }
+
+ if (!isOpen) return null
+
+ return (
+ <>
+ {/* Overlay */}
+
{/* Don't close on overlay click — consent is required */}}
+ />
+
+ {/* Banner */}
+
+
+ {/* Header */}
+
+
+
+ Cookie-Einstellungen
+
+
+ Wir verwenden Cookies und aehnliche Technologien, um Ihnen die bestmoegliche Erfahrung zu bieten.
+ Sie koennen Ihre Praeferenzen jederzeit aendern.
+