Files
Website/cookie-consent.css
Claude Code afe25fc728 Add DSGVO-compliant cookie consent banner and fix navbar consistency
- Implement custom cookie consent banner with opt-in gating pattern
- Add comprehensive privacy documentation (DSGVO/GDPR compliant)
- Integrate consent management into production (index.html)
- Add multilingual support for cookie settings (DE/EN)
- Fix navbar font-size inconsistency across legal pages
- Include mobile.css in datenschutz.html and impressum.html
- Add complete implementation documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 19:45:31 +00:00

497 Zeilen
9.1 KiB
CSS

/**
* Cookie Consent Banner - DSGVO-konform
* IntelSight / Aegis-Sight
* Angepasst an Corporate Design (Rheinmetall Style)
*/
/* === CSS Variables (IntelSight Brand) === */
:root {
--consent-primary: #0f72b5; /* IntelSight Primary Blue */
--consent-primary-dark: #00406e; /* Dark Blue */
--consent-gray-light: #f4f4f4;
--consent-white: #FFFFFF;
--consent-text-dark: #333333;
--consent-text-gray: #666666;
--consent-border: #e0e0e0;
--consent-shadow: 0 2px 8px rgba(0,0,0,0.1);
--consent-shadow-hover: 0 8px 24px rgba(0,0,0,0.15);
}
/* === Demo Page Styling (IntelSight Style) === */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
margin: 0;
padding: 0;
line-height: 1.6;
color: var(--consent-text-dark);
}
header {
background: linear-gradient(135deg, var(--consent-primary-dark) 0%, var(--consent-primary) 100%);
color: white;
padding: 2rem;
text-align: center;
box-shadow: var(--consent-shadow);
}
header h1 {
font-size: 2rem;
font-weight: 600;
letter-spacing: 1px;
text-transform: uppercase;
}
main {
max-width: 1000px;
margin: 2rem auto;
padding: 0 2rem;
}
footer {
background: var(--consent-text-dark);
color: white;
padding: 2rem;
text-align: center;
margin-top: 4rem;
}
footer nav {
margin-bottom: 1rem;
}
footer nav a {
color: var(--consent-primary);
text-decoration: none;
margin: 0 1.5rem;
font-weight: 600;
transition: color 0.3s ease;
}
footer nav a:hover {
color: #fff;
text-decoration: underline;
}
/* === Cookie Consent Banner === */
/* Backdrop Overlay */
#cookie-consent-backdrop {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 9998;
display: none;
animation: fadeIn 0.3s ease;
}
#cookie-consent-backdrop.active {
display: block;
}
/* Main Banner Container */
#cookie-consent-banner {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: rgba(255, 255, 255, 0.98);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
border-top: 1px solid rgba(15, 114, 181, 0.2);
z-index: 9999;
transform: translateY(100%);
transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
max-height: 90vh;
overflow-y: auto;
}
#cookie-consent-banner.active {
transform: translateY(0);
}
/* Banner Content */
.consent-content {
max-width: 1200px;
margin: 0 auto;
padding: 1.5rem;
}
.consent-header {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 1rem;
}
.consent-header h2 {
margin: 0;
font-size: 1.5rem;
color: var(--consent-text-dark);
font-weight: 600;
}
.consent-text {
color: var(--consent-text-gray);
font-size: 0.95rem;
margin-bottom: 1.5rem;
line-height: 1.6;
}
.consent-text strong {
color: var(--consent-text-dark);
}
/* Button Group */
.consent-buttons {
display: flex;
gap: 1rem;
flex-wrap: wrap;
margin-top: 1.5rem;
}
.consent-btn {
padding: 0.75rem 1.5rem;
border: none;
border-radius: 6px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
font-family: inherit;
}
.consent-btn:focus {
outline: 3px solid rgba(52, 152, 219, 0.5);
outline-offset: 2px;
}
.consent-btn-primary {
background: var(--consent-primary);
color: white;
box-shadow: var(--consent-shadow);
}
.consent-btn-primary:hover {
background: var(--consent-primary-dark);
transform: translateY(-2px);
box-shadow: var(--consent-shadow-hover);
}
.consent-btn-secondary {
background: #95a5a6;
color: white;
}
.consent-btn-secondary:hover {
background: #7f8c8d;
}
.consent-btn-outline {
background: transparent;
border: 2px solid var(--consent-primary);
color: var(--consent-primary);
}
.consent-btn-outline:hover {
background: var(--consent-primary);
color: white;
}
/* Settings Modal */
#cookie-consent-settings {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(0.9);
background: white;
border-radius: 12px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
z-index: 10000;
max-width: 600px;
width: 90%;
max-height: 80vh;
overflow-y: auto;
opacity: 0;
pointer-events: none;
transition: all 0.3s ease;
}
#cookie-consent-settings.active {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
pointer-events: all;
}
.settings-header {
background: linear-gradient(135deg, var(--consent-primary-dark) 0%, var(--consent-primary) 100%);
color: white;
padding: 1.5rem;
border-radius: 12px 12px 0 0;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: var(--consent-shadow);
}
.settings-header h3 {
margin: 0;
font-size: 1.3rem;
}
.settings-close {
background: transparent;
border: none;
color: white;
font-size: 1.5rem;
cursor: pointer;
padding: 0.25rem 0.5rem;
line-height: 1;
border-radius: 4px;
transition: background 0.2s ease;
}
.settings-close:hover {
background: rgba(255, 255, 255, 0.1);
}
.settings-content {
padding: 1.5rem;
}
/* Category Cards */
.cookie-category {
border: 2px solid #e0e0e0;
border-radius: 8px;
padding: 1rem;
margin-bottom: 1rem;
transition: border-color 0.2s ease;
}
.cookie-category:hover {
border-color: var(--consent-primary);
}
.category-header {
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
user-select: none;
}
.category-title {
display: flex;
align-items: center;
gap: 0.75rem;
font-weight: 600;
color: var(--consent-text-dark);
}
.category-toggle {
position: relative;
width: 50px;
height: 26px;
background: #ccc;
border-radius: 13px;
transition: background 0.3s ease;
cursor: pointer;
}
.category-toggle::after {
content: '';
position: absolute;
top: 3px;
left: 3px;
width: 20px;
height: 20px;
background: white;
border-radius: 50%;
transition: transform 0.3s ease;
}
.category-toggle.active {
background: var(--consent-primary);
}
.category-toggle.active::after {
transform: translateX(24px);
}
.category-toggle.disabled {
opacity: 0.5;
cursor: not-allowed;
}
.category-description {
color: #666;
font-size: 0.9rem;
margin-top: 0.5rem;
line-height: 1.5;
}
.category-details {
margin-top: 1rem;
padding: 1rem;
background: #f8f9fa;
border-radius: 6px;
font-size: 0.85rem;
color: #555;
}
.category-details ul {
margin: 0.5rem 0;
padding-left: 1.5rem;
}
.category-details li {
margin: 0.25rem 0;
}
/* Badge */
.badge {
display: inline-block;
padding: 0.25rem 0.5rem;
background: #e0e0e0;
color: #555;
font-size: 0.75rem;
border-radius: 4px;
font-weight: 600;
}
.badge-required {
background: var(--consent-primary);
color: white;
}
/* Settings Footer */
.settings-footer {
padding: 1rem 1.5rem;
border-top: 1px solid #e0e0e0;
display: flex;
gap: 1rem;
flex-wrap: wrap;
}
.settings-footer .consent-btn {
flex: 1;
min-width: 150px;
}
/* Links */
.settings-links {
display: flex;
gap: 1.5rem;
padding: 1rem 1.5rem;
border-top: 1px solid #e0e0e0;
font-size: 0.9rem;
}
.settings-links a {
color: var(--consent-primary);
text-decoration: none;
font-weight: 600;
}
.settings-links a:hover {
color: var(--consent-primary-dark);
text-decoration: underline;
}
/* GPC Notice */
.gpc-notice {
background: #fff3cd;
border: 2px solid #ffc107;
border-radius: 8px;
padding: 1rem;
margin-bottom: 1rem;
display: flex;
align-items: start;
gap: 0.75rem;
}
.gpc-notice-icon {
font-size: 1.5rem;
}
.gpc-notice-text {
flex: 1;
color: #856404;
}
.gpc-notice-text strong {
display: block;
margin-bottom: 0.25rem;
}
/* Mobile Responsive */
@media (max-width: 768px) {
.consent-content {
padding: 1rem;
}
.consent-header h2 {
font-size: 1.25rem;
}
.consent-buttons {
flex-direction: column;
}
.consent-btn {
width: 100%;
text-align: center;
}
#cookie-consent-settings {
width: 95%;
max-height: 90vh;
}
.settings-footer {
flex-direction: column;
}
.settings-footer .consent-btn {
width: 100%;
}
.settings-links {
flex-direction: column;
gap: 0.5rem;
}
}
/* Accessibility */
@media (prefers-reduced-motion: reduce) {
#cookie-consent-banner,
#cookie-consent-settings,
.category-toggle::after {
transition: none;
}
}
/* High Contrast Mode */
@media (prefers-contrast: high) {
#cookie-consent-banner {
border-top: 3px solid #000;
}
.cookie-category {
border-width: 3px;
}
}
/* Animations */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}