/* 1. Hintergrund-Overlay (Das gesamte Fenster) */
.cookie-banner {
    /* Absolute Fixierung über den gesamten Viewport */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    
    /* Hintergrund-Design */
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    
    /* Die entscheidende Zentrierung */
    display: flex !important; /* Wichtig: Muss flex sein für die Zentrierung */
    align-items: center;      /* Vertikal mittig */
    justify-content: center;   /* Horizontal mittig */
    
    /* Ganz nach vorne bringen */
    z-index: 999999;
    margin: 0;
    padding: 0;
}

/* 2. Modal-Container (Das weiße Fenster) */
.cookie-content {
    background: #ffffff;
    width: 90%;
    max-width: 550px;
    /* Verhindert, dass das Modal bei kleinen Bildschirmen oben/unten rausragt */
    max-height: 90vh;
    overflow-y: auto;
    
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    
    /* Schrift & Farbe */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a202c;
    
    /* Wichtig für die korrekte Breitenberechnung */
    box-sizing: border-box;
    position: relative;
}

/* Header & Texte */
.cookie-content h3 {
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2d3748;
    font-size: 1.5rem;
}

.cookie-content p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #4a5568;
    margin-bottom: 1.5rem;
}

/* 3. Dynamische Zeilen (Cookie-Optionen) */
.cookie-row {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Vertikal zentriert innerhalb der Zeile */
    padding: 1rem 0;
    border-top: 1px solid #edf2f7;
    text-align: left;
}

.cookie-row:last-of-type {
    border-bottom: 1px solid #edf2f7;
    margin-bottom: 1.5rem;
}

.cookie-info {
    padding-right: 15px;
}

.cookie-info strong {
    display: block;
    font-size: 1rem;
    color: #2d3748;
}

.cookie-info p {
    font-size: 0.85rem;
    margin: 4px 0 0 0;
    line-height: 1.3;
}

/* 4. Button-Logik */
.cookie-actions {
    display: flex;
    gap: 12px;
    justify-content: stretch; /* Buttons füllen die Breite */
}

.cookie-actions button {
    flex: 1; /* Beide Buttons gleich groß */
    cursor: pointer;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    border: none;
}

.btn-primary {
    background: #3182ce;
    color: white;
}

.btn-primary:hover {
    background: #2b6cb0;
}

.btn-secondary {
    background: #edf2f7;
    color: #4a5568;
    border: 1px solid #cbd5e0 !important;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* 5. Der Toggle-Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0; /* Verhindert das Quetschen des Schalters */
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e0;
    transition: .3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #48bb78;
}

input:checked + .slider:before {
    transform: translateX(20px);
}