/* GDPR/cookie consent banner — bottom of screen, EU-compliant one-liner. Persists acceptance to localStorage. Only shows once per browser. */ function CookieBanner() { const key = 'ellaride_cookies_ok'; const [visible, setVisible] = React.useState(false); const [hiding, setHiding] = React.useState(false); const t = window.t; const lang = window.__LANG__ || 'el'; React.useEffect(() => { try { if (!localStorage.getItem(key)) setVisible(true); } catch (e) { /* private mode */ } }, []); const accept = () => { setHiding(true); try { localStorage.setItem(key, '1'); } catch (e) {} setTimeout(() => setVisible(false), 420); }; if (!visible) return null; const text = lang === 'el' ? 'Χρησιμοποιούμε μόνο απαραίτητα cookies (localStorage) για τις προτιμήσεις γλώσσας. Δεν χρησιμοποιούμε tracking cookies.' : 'We use only essential cookies (localStorage) for language preferences. No tracking cookies.'; const btnText = lang === 'el' ? 'Εντάξει' : 'Got it'; const policyText = lang === 'el' ? 'Πολιτική απορρήτου' : 'Privacy policy'; return (
{text}{' '} {policyText}