{{-- GDPR / CCPA cookie consent UI — two layers: 1) A compact sticky banner (bottom or top per the admin setting, or modal if the admin picked "Centered modal" style). This is the FIRST surface a visitor sees — Decline, Customize, Accept. 2) A detailed preferences modal with three category toggles (Strictly Necessary locked-on, Analytics, Marketing). Hidden by default; opens only when the visitor clicks "Customize" or any [data-cookie-prefs-open] link (footer, account page). Server-side, partials/site-analytics.blade.php reads the wadesk_cookie_consent cookie on every request and only emits the trackers matching each enabled category. --}} @php $cookieBannerEnabled = (bool) \App\Models\SystemSetting::get('privacy_cookie_banner_enabled', true); $cookieBannerStyle = (string) \App\Models\SystemSetting::get('privacy_cookie_banner_style', 'bottom-bar'); $cookieMessage = (string) \App\Models\SystemSetting::get( 'privacy_cookie_message', 'We use cookies to improve your experience and analyze site traffic. By continuing, you agree to our Privacy Policy.', ); $privacyPolicyUrl = (string) \App\Models\SystemSetting::get('privacy_policy_url', ''); $cookiesPolicyUrl = (string) \App\Models\SystemSetting::get('privacy_cookies_policy_url', ''); $learnMoreUrl = $cookiesPolicyUrl ?: $privacyPolicyUrl; $dntRespect = (bool) \App\Models\SystemSetting::get('privacy_dnt_respect', true); // Position class for the sticky banner. Modal style still shows a // banner at the bottom — the modal is only triggered on Customize. $isTop = $cookieBannerStyle === 'top-bar'; $isModal = $cookieBannerStyle === 'modal'; $position = $isTop ? 'top-3' : 'bottom-3'; @endphp @if ($cookieBannerEnabled) {{-- Mark so cookie-consent.js can read the DNT preference. --}} {{-- ── 1. Compact banner (default surface) ────────────────────── --}}
{{-- ── 2. Granular modal (opens on Customize) ─────────────────── --}} @endif