|
44 | 44 | banner.id = 'consent-banner'; |
45 | 45 | banner.innerHTML = ` |
46 | 46 | <div class="consent-content"> |
47 | | - <h3>🍪 We use cookies</h3> |
48 | | - <p>We use cookies and similar technologies to improve website functionality, analyze traffic, and personalize content. You can choose which types of cookies to allow.</p> |
| 47 | + <div class="consent-header"> |
| 48 | + <h3>🍪 We use cookies</h3> |
| 49 | + <p>We use cookies and similar technologies to improve website functionality, analyze traffic, and personalize content.</p> |
| 50 | + </div> |
49 | 51 | <div class="consent-options"> |
50 | 52 | <label> |
51 | 53 | <input type="checkbox" id="consent-analytics" checked> |
@@ -229,115 +231,138 @@ <h3>🍪 We use cookies</h3> |
229 | 231 | /* Consent Banner Styles */ |
230 | 232 | #consent-banner { |
231 | 233 | position: fixed; |
232 | | - bottom: 0; |
233 | | - left: 0; |
234 | | - right: 0; |
235 | | - background: rgba(0, 0, 0, 0.95); |
| 234 | + bottom: 20px; |
| 235 | + left: 50%; |
| 236 | + transform: translateX(-50%); |
| 237 | + width: 380px; |
| 238 | + max-width: 90vw; |
| 239 | + background: rgba(26, 26, 46, 0.85); |
236 | 240 | backdrop-filter: blur(10px); |
237 | | - border-top: 1px solid rgba(255, 255, 255, 0.1); |
| 241 | + border: 1px solid rgba(139, 92, 246, 0.2); |
| 242 | + border-radius: 12px; |
238 | 243 | z-index: 10000; |
239 | | - padding: 20px; |
| 244 | + padding: 14px; |
240 | 245 | animation: slideInUp 0.5s ease-out; |
| 246 | + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); |
241 | 247 | } |
242 | 248 |
|
243 | 249 | @keyframes slideInUp { |
244 | 250 | from { |
245 | | - transform: translateY(100%); |
| 251 | + transform: translate(-50%, 100%); |
246 | 252 | opacity: 0; |
247 | 253 | } |
248 | 254 | to { |
249 | | - transform: translateY(0); |
| 255 | + transform: translate(-50%, 0); |
250 | 256 | opacity: 1; |
251 | 257 | } |
252 | 258 | } |
253 | 259 |
|
254 | 260 | .consent-content { |
255 | | - max-width: 1200px; |
256 | | - margin: 0 auto; |
257 | 261 | color: #ffffff; |
258 | 262 | } |
259 | 263 |
|
| 264 | + .consent-header { |
| 265 | + margin-bottom: 12px; |
| 266 | + } |
| 267 | + |
260 | 268 | .consent-content h3 { |
261 | | - font-size: 1.2rem; |
262 | | - margin-bottom: 10px; |
263 | | - color: #ffffff; |
| 269 | + font-size: 0.95rem; |
| 270 | + margin-bottom: 6px; |
| 271 | + color: rgba(255, 255, 255, 0.9); |
264 | 272 | } |
265 | 273 |
|
266 | 274 | .consent-content p { |
267 | | - margin-bottom: 15px; |
268 | | - color: #cccccc; |
269 | | - font-size: 0.9rem; |
| 275 | + margin-bottom: 0; |
| 276 | + color: rgba(255, 255, 255, 0.7); |
| 277 | + font-size: 0.75rem; |
| 278 | + line-height: 1.3; |
270 | 279 | } |
271 | 280 |
|
272 | 281 | .consent-options { |
273 | | - margin-bottom: 20px; |
| 282 | + margin-bottom: 12px; |
274 | 283 | } |
275 | 284 |
|
276 | 285 | .consent-options label { |
277 | 286 | display: flex; |
278 | | - align-items: center; |
279 | | - margin-bottom: 10px; |
| 287 | + align-items: flex-start; |
| 288 | + margin-bottom: 6px; |
280 | 289 | cursor: pointer; |
281 | | - color: #ffffff; |
| 290 | + color: rgba(255, 255, 255, 0.85); |
| 291 | + font-size: 0.8rem; |
| 292 | + line-height: 1.3; |
282 | 293 | } |
283 | 294 |
|
284 | 295 | .consent-options input[type="checkbox"] { |
285 | | - margin-right: 10px; |
286 | | - width: 18px; |
287 | | - height: 18px; |
| 296 | + margin-right: 8px; |
| 297 | + width: 16px; |
| 298 | + height: 16px; |
288 | 299 | accent-color: #6366f1; |
289 | 300 | } |
290 | 301 |
|
291 | 302 | .consent-buttons { |
292 | 303 | display: flex; |
293 | | - gap: 10px; |
| 304 | + gap: 8px; |
294 | 305 | flex-wrap: wrap; |
295 | 306 | } |
296 | 307 |
|
297 | 308 | .btn-primary, .btn-secondary { |
298 | | - padding: 10px 20px; |
| 309 | + padding: 8px 16px; |
299 | 310 | border: none; |
300 | 311 | border-radius: 6px; |
301 | | - font-size: 0.9rem; |
| 312 | + font-size: 0.8rem; |
302 | 313 | font-weight: 500; |
303 | 314 | cursor: pointer; |
304 | 315 | transition: all 0.2s ease; |
305 | 316 | } |
306 | 317 |
|
307 | 318 | .btn-primary { |
308 | | - background: #6366f1; |
| 319 | + background: rgba(139, 92, 246, 0.8); |
309 | 320 | color: white; |
310 | 321 | } |
311 | 322 |
|
312 | 323 | .btn-primary:hover { |
313 | | - background: #5855eb; |
| 324 | + background: rgba(139, 92, 246, 0.9); |
314 | 325 | transform: translateY(-1px); |
315 | 326 | } |
316 | 327 |
|
317 | 328 | .btn-secondary { |
318 | | - background: rgba(255, 255, 255, 0.1); |
319 | | - color: #ffffff; |
320 | | - border: 1px solid rgba(255, 255, 255, 0.2); |
| 329 | + background: rgba(255, 255, 255, 0.08); |
| 330 | + color: rgba(255, 255, 255, 0.8); |
| 331 | + border: 1px solid rgba(255, 255, 255, 0.15); |
321 | 332 | } |
322 | 333 |
|
323 | 334 | .btn-secondary:hover { |
324 | | - background: rgba(255, 255, 255, 0.2); |
| 335 | + background: rgba(255, 255, 255, 0.15); |
| 336 | + color: rgba(255, 255, 255, 0.9); |
325 | 337 | transform: translateY(-1px); |
326 | 338 | } |
327 | 339 |
|
328 | 340 | /* Responsive design for consent banner */ |
329 | 341 | @media (max-width: 768px) { |
330 | 342 | #consent-banner { |
331 | | - padding: 15px; |
| 343 | + width: 95vw; |
| 344 | + padding: 12px; |
| 345 | + bottom: 10px; |
332 | 346 | } |
333 | 347 |
|
334 | 348 | .consent-buttons { |
335 | 349 | flex-direction: column; |
| 350 | + gap: 6px; |
336 | 351 | } |
337 | 352 |
|
338 | 353 | .btn-primary, .btn-secondary { |
339 | 354 | width: 100%; |
340 | 355 | text-align: center; |
| 356 | + padding: 6px 12px; |
| 357 | + font-size: 0.75rem; |
| 358 | + } |
| 359 | + |
| 360 | + .consent-content h3 { |
| 361 | + font-size: 0.85rem; |
| 362 | + } |
| 363 | + |
| 364 | + .consent-content p { |
| 365 | + font-size: 0.7rem; |
341 | 366 | } |
342 | 367 | } |
343 | 368 |
|
|
0 commit comments