.cookie-banner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.45);
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
}

.cookie-banner-overlay.hidden {
    display: none;
}

.cookie-banner-modal {
    width: 100%;
    max-width: 920px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    padding: 24px;
}

.cookie-banner-layer.hidden {
    display: none;
}

.cookie-banner-header {
    margin-bottom: 12px;
}

.cookie-banner-header-space {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cookie-banner-title {
    margin: 0;
    font-size: 24px;
    color: #111;
}

.cookie-banner-intro,
.cookie-banner-note,
.cookie-category-text p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.cookie-banner-intro {
    margin-bottom: 16px;
}

.cookie-banner-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.cookie-banner-links a {
    color: #111;
    text-decoration: underline;
    font-size: 14px;
}

.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.cookie-btn {
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid #ddd;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.cookie-btn-primary {
    background: #111;
    color: #fff;
    border-color: #111;
}

.cookie-btn-primary:hover {
    background: #333;
    border-color: #333;
}

.cookie-btn-secondary {
    background: #fff;
    color: #111;
}

.cookie-btn-secondary:hover {
    background: #f7f7f7;
}

.cookie-category {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cookie-category:last-of-type {
    border-bottom: none;
}

.cookie-category-text h3 {
    margin: 0 0 8px;
    font-size: 17px;
    color: #111;
}

.cookie-category-required {
    opacity: 0.95;
}

.cookie-category-status {
    white-space: nowrap;
    font-weight: 700;
    color: #111;
    background: #f5f5f5;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
}

.cookie-switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 30px;
    flex-shrink: 0;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-switch span {
    position: absolute;
    inset: 0;
    background: #d8d8d8;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cookie-switch span::before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    left: 4px;
    top: 4px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.cookie-switch input:checked + span {
    background: #111;
}

.cookie-switch input:checked + span::before {
    transform: translateX(24px);
}

.cookie-banner-close-text {
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    color: #111;
}

@media (max-width: 768px) {
    .cookie-banner-overlay {
        align-items: flex-end;
        padding: 12px;
    }

    .cookie-banner-modal {
        padding: 18px;
        border-radius: 18px;
    }

    .cookie-category,
    .cookie-banner-header-space {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-banner-actions {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }
}
/* Dynamisch deaktivierte Kategorien werden komplett ausgeblendet. */
.cookie-category.hidden {
    display: none;
}

/* Fehler beim Speichern der Consent-Auswahl. */
.cookie-banner-error {
    margin-top: 14px;
    color: #a40000;
    background: #fff0f0;
    border: 1px solid #ffc7c7;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
}

.cookie-banner-error.hidden {
    display: none;
}