/**
 * Advanced Consent Orchestrator - Modern UI Design
 *
 * Design: Modern, minimalistisch, "App-like"
 * Features: Floating-Banner, Modal mit Backdrop-Blur, iOS-Style Toggles
 *
 * @package AdvancedConsentOrchestrator
 */

/* ===========================
   CSS Custom Properties
   =========================== */

:root {
    /* Primary Brand Colors */
    --aco-primary: #6366f1;
    --aco-primary-hover: #4f46e5;
    --aco-primary-light: rgba(99, 102, 241, 0.1);

    /* Status Colors */
    --aco-success: #10b981;
    --aco-success-light: rgba(16, 185, 129, 0.1);
    --aco-danger: #ef4444;
    --aco-danger-light: rgba(239, 68, 68, 0.1);
    --aco-warning: #f59e0b;

    /* Background & Surface */
    --aco-bg: #ffffff;
    --aco-bg-secondary: #f8fafc;
    --aco-bg-overlay: rgba(15, 23, 42, 0.6);

    /* Text Colors */
    --aco-text-primary: #0f172a;
    --aco-text-secondary: #475569;
    --aco-text-muted: #94a3b8;
    --aco-text-inverse: #ffffff;

    /* Border & Separation */
    --aco-border: #e2e8f0;
    --aco-border-light: #f1f5f9;

    /* Shadows */
    --aco-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --aco-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --aco-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --aco-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Spacing */
    --aco-space-xs: 4px;
    --aco-space-sm: 8px;
    --aco-space-md: 16px;
    --aco-space-lg: 24px;
    --aco-space-xl: 32px;

    /* Border Radius */
    --aco-radius-sm: 6px;
    --aco-radius: 12px;
    --aco-radius-lg: 16px;
    --aco-radius-full: 9999px;

    /* Typography */
    --aco-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --aco-font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;

    /* Transitions */
    --aco-transition-fast: 150ms ease;
    --aco-transition: 200ms ease;
    --aco-transition-slow: 300ms ease;

    /* Z-Index */
    --aco-z-banner: 9998;
    --aco-z-modal: 9999;
    --aco-z-overlay: 9997;
}

/* ===========================
   Base Reset
   =========================== */

#aco-consent-banner,
#aco-consent-banner *,
#aco-preferences-panel,
#aco-preferences-panel * {
    box-sizing: border-box;
}

#aco-consent-banner,
#aco-preferences-panel {
    font-family: var(--aco-font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--aco-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===========================
   Floating Consent Banner
   =========================== */

/* Standardmäßig Banner WEG - NUR mit .aco-show-banner Klasse am HTML sichtbar */
#aco-consent-banner {
    display: none !important;
    position: fixed;
    z-index: var(--aco-z-banner);
    flex-direction: column;
    gap: var(--aco-space-lg);
    width: 100%;
    max-width: 480px;
    padding: var(--aco-space-lg);
    background: var(--aco-bg);
    border-radius: var(--aco-radius-lg);
    box-shadow: var(--aco-shadow-xl);
    border: 1px solid var(--aco-border);
    transition: opacity var(--aco-transition-slow), transform var(--aco-transition-slow), visibility var(--aco-transition-slow);
    visibility: hidden;
    opacity: 0;
}

/* NUR wenn diese Klasse durch das Head-Skript gesetzt wird */
html.aco-show-banner #aco-consent-banner {
    display: flex !important;
    visibility: visible;
    opacity: 1;
}

/* Overlay auch standardmäßig weg */
#aco-overlay {
    display: none !important;
    position: fixed;
    inset: 0;
    z-index: var(--aco-z-overlay);
    background: var(--aco-bg-overlay);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--aco-transition-slow), visibility var(--aco-transition-slow);
}

html.aco-show-banner #aco-overlay {
    display: block !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Aktiviert Klick-Abfang nur wenn Banner sichtbar */
}

/* Class to hide banner container when preferences panel is active
   Uses display: none !important to ensure the white container is removed from layout */
html.aco-show-banner #aco-consent-banner.aco-preferences-active {
    display: none !important;
}

/* General hidden class for all elements */
.hidden {
    display: none !important;
}

/* Banner Positions */
#aco-consent-banner.aco-bottom {
    bottom: var(--aco-space-lg);
    left: var(--aco-space-lg);
}

#aco-consent-banner.aco-bottom-right {
    bottom: var(--aco-space-lg);
    right: var(--aco-space-lg);
}

#aco-consent-banner.aco-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#aco-consent-banner.aco-center.hidden {
    transform: translate(-50%, -50%) translateY(20px);
}

/* Banner Content */
.aco-banner-content {
    display: flex;
    flex-direction: column;
    gap: var(--aco-space-sm);
}

.aco-banner-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--aco-text-primary);
    line-height: 1.3;
}

.aco-banner-description {
    font-size: 14px;
    color: var(--aco-text-secondary);
    line-height: 1.6;
}

/* Banner Buttons */
.aco-banner-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--aco-space-sm);
    margin-top: var(--aco-space-lg);
}

.aco-banner-buttons .aco-btn-full {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
}

.aco-banner-secondary-buttons {
    display: flex;
    justify-content: space-between;
    gap: var(--aco-space-sm);
}

.aco-banner-secondary-buttons .aco-btn {
    flex: 1;
    padding: 10px 12px;
    font-size: 13px;
}

@media (max-width: 400px) {
    .aco-banner-secondary-buttons {
        flex-wrap: wrap;
    }

    .aco-banner-secondary-buttons .aco-btn {
        flex: 1 1 calc(50% - var(--aco-space-xs));
    }
}

/* Banner Footer */
.aco-banner-footer {
    margin-top: var(--aco-space-md);
    text-align: center;
}

.aco-privacy-link {
    font-size: 14px;
    color: #888888;
    text-decoration: none;
    transition: color var(--aco-transition);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.aco-privacy-link:hover {
    color: #666666;
    text-decoration: underline;
}

.aco-imprint-link {
    font-size: 14px;
    color: #888888;
    text-decoration: none;
    transition: color var(--aco-transition);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.aco-imprint-link:hover {
    color: #666666;
    text-decoration: underline;
}

/* ===========================
   Revoke Icon
   =========================== */

.aco-revoke-icon {
    position: fixed;
    bottom: 20px;
    width: 48px;
    height: 48px;
    background: var(--aco-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--aco-shadow-lg);
    border: 1px solid var(--aco-border);
    color: var(--aco-text-primary);
    transition: all var(--aco-transition);
    z-index: 999997; /* Ueber Theme-Elementen (100000), unter ACO-Overlay/Banner (999998/999999) */
}

.aco-revoke-icon:hover {
    transform: scale(1.1);
    box-shadow: var(--aco-shadow-xl);
}

/* HINWEIS: Die .hidden Klasse wurde entfernt, da das Revoke-Icon
   laut Anforderung IMMER sichtbar sein muss */

.aco-revoke-icon--bottom-left {
    left: 20px;
}

.aco-revoke-icon--bottom-right {
    right: 20px;
}

/* ===========================
   History Panel
   =========================== */

.aco-history-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 480px;
    max-height: 80vh;
    background: var(--aco-bg);
    border-radius: var(--aco-radius-lg);
    box-shadow: var(--aco-shadow-xl);
    border: 1px solid var(--aco-border);
    z-index: 1000000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: transform var(--aco-transition-slow), opacity var(--aco-transition-slow), visibility var(--aco-transition-slow);
}

.aco-history-panel.visible {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.aco-history-panel.hidden {
    display: none;
}

.aco-history-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.aco-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--aco-space-lg);
    border-bottom: 1px solid var(--aco-border-light);
    flex-shrink: 0;
}

.aco-history-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--aco-text-primary);
    margin: 0;
}

.aco-history-body {
    padding: var(--aco-space-lg);
    overflow-y: auto;
    flex: 1;
}

.aco-history-entry {
    background: var(--aco-bg-secondary);
    border-radius: var(--aco-radius);
    padding: var(--aco-space-md);
    margin-bottom: var(--aco-space-md);
}

.aco-history-entry:last-child {
    margin-bottom: 0;
}

.aco-history-entry-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--aco-space-sm);
    font-size: 13px;
}

.aco-history-date {
    color: var(--aco-text-muted);
}

.aco-history-action {
    font-weight: 500;
    color: var(--aco-text-primary);
}

.aco-history-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.aco-history-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--aco-space-xs) 0;
    font-size: 13px;
}

.aco-history-category-item.enabled .aco-history-category-name {
    color: var(--aco-success);
}

.aco-history-category-item.disabled .aco-history-category-name {
    color: var(--aco-text-muted);
}

.aco-history-empty {
    text-align: center;
    color: var(--aco-text-muted);
    padding: var(--aco-space-xl);
}

.aco-history-link,
#aco-consent-banner .aco-history-link,
#aco-preferences-panel .aco-history-link {
    font-size: 14px !important;
    color: #888888 !important;
    text-decoration: none !important;
    transition: color 200ms ease !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    font-family: inherit !important;
}

.aco-history-link:hover,
#aco-consent-banner .aco-history-link:hover,
#aco-preferences-panel .aco-history-link:hover {
    color: #666666 !important;
    text-decoration: underline !important;
}

.aco-footer-separator {
    margin: 0 var(--aco-space-sm);
    color: var(--aco-text-muted);
}

/* History category tags */
.aco-history-cats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--aco-space-xs);
    margin-top: var(--aco-space-sm);
}

.aco-history-cat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: var(--aco-radius-full);
    background: var(--aco-bg-secondary);
    color: var(--aco-text-secondary);
}

.aco-history-cat.enabled {
    background: var(--aco-success-light);
    color: var(--aco-success);
}

.aco-history-cat.disabled {
    background: var(--aco-danger-light);
    color: var(--aco-danger);
}

/* History entry styles - improved layout */
.aco-history-entry {
    padding: var(--aco-space-md);
    border-bottom: 1px solid var(--aco-border);
}

.aco-history-entry:last-child {
    border-bottom: none;
}

.aco-history-date {
    font-size: 12px;
    color: var(--aco-text-muted);
    margin-bottom: var(--aco-space-sm);
}

.aco-history-details {
    display: flex;
    flex-direction: column;
    gap: var(--aco-space-xs);
}

.aco-history-cats-row,
.aco-history-status-row {
    display: flex;
    gap: var(--aco-space-sm);
}

.aco-history-label {
    font-size: 12px;
    color: var(--aco-text-muted);
    min-width: 120px;
}

.aco-history-cats-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--aco-text-primary);
}

.aco-history-status-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--aco-success);
}

.aco-history-id-row {
    display: flex;
    gap: var(--aco-space-sm);
}

.aco-history-id-value {
    font-size: 12px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    background: var(--aco-bg-secondary);
    padding: 2px 8px;
    border-radius: var(--aco-radius-sm);
    color: var(--aco-text-secondary);
    letter-spacing: 0.5px;
}

.aco-history-id-value:hover {
    background: var(--aco-primary-light);
    color: var(--aco-primary);
}

/* ===========================
   Buttons
   =========================== */

.aco-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--aco-space-sm);
    padding: 12px 20px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    border: none;
    border-radius: var(--aco-radius);
    cursor: pointer;
    transition: all var(--aco-transition);
    white-space: nowrap;
    user-select: none;
}

.aco-btn:focus-visible {
    outline: 2px solid var(--aco-primary);
    outline-offset: 2px;
}

.aco-btn:active {
    transform: scale(0.98);
}

/* Primary Button - "Alle akzeptieren" */
.aco-btn--primary {
    background: var(--aco-primary);
    color: var(--aco-text-inverse);
    box-shadow: var(--aco-shadow-sm);
}

.aco-btn--primary:hover {
    background: var(--aco-primary-hover);
    box-shadow: var(--aco-shadow);
}

/* Secondary Button - "Einstellungen" */
.aco-btn--secondary {
    background: transparent;
    color: var(--aco-text-secondary);
    border: 1px solid var(--aco-border);
}

.aco-btn--secondary:hover {
    background: var(--aco-bg-secondary);
    border-color: var(--aco-text-muted);
    color: var(--aco-text-primary);
}

/* Ghost Button - "Ablehnen" */
.aco-btn--ghost {
    background: transparent;
    color: var(--aco-text-muted);
    padding: 12px 16px;
}

.aco-btn--ghost:hover {
    color: var(--aco-text-secondary);
    background: var(--aco-bg-secondary);
}

/* ===========================
   Modal Backdrop Overlay
   =========================== */

#aco-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--aco-z-overlay);
    background: var(--aco-bg-overlay);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--aco-transition-slow), visibility var(--aco-transition-slow);
}

#aco-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Always show overlay when banner is centered */
#aco-consent-banner.aco-center~#aco-overlay,
.aco-overlay-visible {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ===========================
   Preferences Modal Panel
   =========================== */

#aco-preferences-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: var(--aco-z-modal);
    display: flex;
    flex-direction: column;
    width: calc(100% - 32px);
    max-width: 520px;
    height: -webkit-fit-content;
    height: -moz-fit-content;
    height: fit-content;
    margin: auto;
    max-height: calc(100vh - 64px);
    max-height: calc(100dvh - 64px);
    background: var(--aco-bg);
    border-radius: var(--aco-radius-lg);
    box-shadow: var(--aco-shadow-xl);
    border: 1px solid var(--aco-border);
    transform: scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--aco-transition-slow), opacity var(--aco-transition-slow), visibility var(--aco-transition-slow);
    overflow: hidden;
}

#aco-preferences-panel.visible {
    display: flex;
    transform: scale(1);
    opacity: 1;
    visibility: visible;
}

#aco-preferences-panel.hidden {
    display: none;
}

/* Preferences Panel Header */
.aco-preferences-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--aco-space-lg) var(--aco-space-lg);
    border-bottom: 1px solid var(--aco-border-light);
    flex-shrink: 0;
}

.aco-preferences-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--aco-text-primary);
    margin: 0;
}

.aco-close-btn,
#aco-preferences-panel .aco-close-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: #888888 !important;
    cursor: pointer !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    transition: color 200ms ease !important;
    padding: 0 !important;
    font-family: inherit !important;
}

.aco-close-btn:hover {
    background: transparent;
    color: #666666;
    text-decoration: underline;
}

/* Preferences Panel Body */
.aco-preferences-body {
    padding: var(--aco-space-lg);
    overflow-y: auto;
    flex: 1;
}

/* Preferences Panel Footer */
.aco-preferences-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--aco-space-md);
    padding: var(--aco-space-lg);
    border-top: 1px solid var(--aco-border-light);
    background: var(--aco-bg);
    flex-shrink: 0;
}

/* Category Items */
.aco-category-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--aco-space-md);
    padding: var(--aco-space-md);
    background: var(--aco-bg-secondary);
    border-radius: var(--aco-radius);
    margin-bottom: var(--aco-space-md);
    transition: background var(--aco-transition);
}

.aco-category-item:last-child {
    margin-bottom: 0;
}

.aco-category-item:hover {
    background: var(--aco-bg);
}

.aco-category-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--aco-space-xs);
}

.aco-category-name {
    display: flex;
    align-items: center;
    gap: var(--aco-space-sm);
    font-size: 15px;
    font-weight: 500;
    color: var(--aco-text-primary);
    margin: 0 0 var(--aco-space-xs) 0;
}

.aco-category-required {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--aco-border);
    color: var(--aco-text-muted);
    border-radius: var(--aco-radius-full);
}

.aco-category-description {
    font-size: 13px;
    color: var(--aco-text-secondary);
    line-height: 1.5;
    margin: 0;
}

.aco-toggle-wrapper {
    flex-shrink: 0;
    min-width: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Header */
.aco-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--aco-space-lg) var(--aco-space-lg);
    border-bottom: 1px solid var(--aco-border-light);
    flex-shrink: 0;
}

.aco-modal__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--aco-text-primary);
}

.aco-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--aco-radius-sm);
    color: var(--aco-text-muted);
    cursor: pointer;
    transition: all var(--aco-transition);
}

.aco-modal__close:hover {
    background: var(--aco-bg-secondary);
    color: var(--aco-text-primary);
}

.aco-modal__close svg {
    width: 20px;
    height: 20px;
}

/* Modal Body */
.aco-modal__body {
    padding: var(--aco-space-lg);
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

#aco-preferences-panel .aco-modal__body > * {
    max-width: 100%;
}

/* Category List */
.aco-categories {
    display: flex;
    flex-direction: column;
    gap: var(--aco-space-md);
}

.aco-category {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--aco-space-md);
    padding: var(--aco-space-md);
    background: var(--aco-bg-secondary);
    border-radius: var(--aco-radius);
    transition: background var(--aco-transition);
}

.aco-category:hover {
    background: var(--aco-bg);
}

.aco-category__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--aco-space-xs);
}

.aco-category__name {
    display: flex;
    align-items: center;
    gap: var(--aco-space-sm);
    font-size: 15px;
    font-weight: 500;
    color: var(--aco-text-primary);
}

.aco-category__badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--aco-border);
    color: var(--aco-text-muted);
    border-radius: var(--aco-radius-full);
}

.aco-category__description {
    font-size: 13px;
    color: var(--aco-text-secondary);
    line-height: 1.5;
}

/* Modal Footer */
.aco-modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--aco-space-md);
    padding: var(--aco-space-lg);
    border-top: 1px solid var(--aco-border-light);
    background: var(--aco-bg);
    flex-shrink: 0;
}

/* ===========================
   iOS-Style Toggle Switch
   =========================== */

.aco-toggle {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 52px;
    height: 30px;
    background: #e5e7eb;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 200ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
    box-sizing: border-box;
}

.aco-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 26px;
    height: 26px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.08);
    transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.aco-toggle:hover:not(:checked) {
    background: #d1d5db;
}

.aco-toggle:hover::after {
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.aco-toggle:checked {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.aco-toggle:checked::after {
    transform: translateX(24px);
}

.aco-toggle:disabled {
    cursor: not-allowed;
}

/* Disabled toggle for necessary/required categories - Enhanced visual feedback */
.aco-category-item[data-consent-category="necessary"] .aco-toggle {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
    cursor: default;
    pointer-events: none;
}

/* Locked toggle state - extra protection */
.aco-toggle-locked {
    pointer-events: none !important;
    cursor: not-allowed !important;
    opacity: 0.8 !important;
}

/* Necessary category locked - keep the toggle knob visible when checked */
.aco-category-item[data-consent-category="necessary"] .aco-toggle::after {
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.16);
    transform: translateX(24px);
}

/* Visual indicator that necessary category is locked */
.aco-category-item[data-consent-category="necessary"] .aco-category-name::after {
    content: '(Gesperrt)';
    font-size: 11px;
    color: var(--aco-text-muted);
    font-weight: 400;
    margin-left: 8px;
    opacity: 0.7;
}

.aco-toggle:focus-visible {
    outline: 2px solid var(--aco-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .aco-toggle,
    .aco-toggle::after {
        transition: none;
    }
}

/* ===========================
   Consent Settings Panel
   =========================== */

.aco-settings-panel {
    background: var(--aco-bg);
    border-radius: var(--aco-radius);
    padding: var(--aco-space-lg);
    box-shadow: var(--aco-shadow);
    border: 1px solid var(--aco-border);
}

.aco-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--aco-space-lg);
    padding-bottom: var(--aco-space-md);
    border-bottom: 1px solid var(--aco-border-light);
}

.aco-settings-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--aco-text-primary);
}

.aco-consent-id {
    display: flex;
    flex-direction: column;
    gap: var(--aco-space-xs);
    padding: var(--aco-space-md);
    background: var(--aco-bg-secondary);
    border-radius: var(--aco-radius-sm);
    margin-bottom: var(--aco-space-lg);
}

.aco-consent-id__label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--aco-text-muted);
}

.aco-consent-id__value {
    font-family: var(--aco-font-mono);
    font-size: 12px;
    color: var(--aco-text-secondary);
    word-break: break-all;
}

/* Status List */
.aco-status-list {
    display: flex;
    flex-direction: column;
    gap: var(--aco-space-sm);
    margin-bottom: var(--aco-space-lg);
}

.aco-status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--aco-space-md);
    padding: var(--aco-space-md);
    background: var(--aco-bg-secondary);
    border-radius: var(--aco-radius-sm);
}

.aco-status-item--active {
    background: var(--aco-success-light);
}

.aco-status-item--inactive {
    background: var(--aco-danger-light);
}

.aco-status-item__name {
    font-size: 14px;
    font-weight: 500;
    color: var(--aco-text-primary);
}

.aco-status-item__badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--aco-radius-full);
}

.aco-status-item--active .aco-status-item__badge {
    background: var(--aco-success);
    color: white;
}

.aco-status-item--inactive .aco-status-item__badge {
    background: var(--aco-danger);
    color: white;
}

/* Revoke Button */
.aco-revoke-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--aco-space-sm);
    padding: 12px 20px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--aco-danger);
    background: transparent;
    border: 1px solid var(--aco-danger);
    border-radius: var(--aco-radius);
    cursor: pointer;
    transition: all var(--aco-transition);
}

.aco-revoke-btn:hover {
    background: var(--aco-danger);
    color: white;
}

.aco-revoke-btn:focus-visible {
    outline: 2px solid var(--aco-danger);
    outline-offset: 2px;
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 480px) {

    /* Cookie Banner - zentriertes Modal auf Mobile (entspricht Desktop .aco-center) */
    #aco-consent-banner {
        left: var(--aco-space-md) !important;
        right: var(--aco-space-md) !important;
        bottom: var(--aco-space-md) !important;
        width: auto !important;
        max-width: none !important;
        padding: var(--aco-space-md);
    }

    #aco-consent-banner.aco-center {
        top: 50% !important;
        bottom: auto !important;
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%) !important;
        width: calc(100% - 32px) !important;
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);
        overflow-y: auto;
    }

    #aco-consent-banner.aco-center.hidden {
        transform: translate(-50%, -50%) translateY(20px) !important;
    }

    /* Banner Buttons - Stack vertically on mobile */
    .aco-banner-buttons {
        flex-direction: column !important;
        gap: var(--aco-space-sm) !important;
        margin-top: var(--aco-space-md) !important;
    }

    .aco-banner-buttons .aco-btn {
        width: 100%;
        padding: 10px 16px;
    }

    /* Banner Content */
    .aco-banner-title {
        font-size: 15px;
    }

    .aco-banner-description {
        font-size: 13px;
        line-height: 1.5;
    }

    /* Preferences Panel */
    #aco-preferences-panel {
        width: calc(100% - 24px) !important;
        max-height: calc(100vh - 48px);
        max-height: calc(100dvh - 48px);
        transform: scale(0.95);
    }

    #aco-preferences-panel.visible {
        transform: scale(1);
    }

    .aco-preferences-header {
        padding: var(--aco-space-md);
    }

    .aco-preferences-title {
        font-size: 16px;
    }

    .aco-preferences-body {
        padding: var(--aco-space-md);
    }

    .aco-preferences-footer {
        flex-direction: column;
        gap: var(--aco-space-sm);
        padding: var(--aco-space-md);
    }

    .aco-preferences-footer .aco-btn {
        width: 100%;
        padding: 10px 16px;
    }

    /* Category Items - Stack vertically on mobile */
    .aco-category-item {
        flex-direction: column;
        gap: var(--aco-space-md);
        padding: var(--aco-space-md);
    }

    .aco-category-info {
        order: 0;
    }

    .aco-toggle-wrapper {
        order: -1;
        align-self: flex-end;
    }

    /* Toggle sizing for mobile */
    .aco-toggle {
        appearance: none;
        -webkit-appearance: none;
        width: 52px;
        height: 30px;
        background: #e5e7eb;
        border-radius: 9999px;
    }

    .aco-toggle::after {
        width: 26px;
        height: 26px;
        top: 2px;
        left: 2px;
    }

    .aco-toggle:checked::after {
        transform: translateX(24px);
    }

    .aco-category-name {
        font-size: 14px;
    }

    .aco-category-description {
        font-size: 12px;
    }

    .aco-close-btn {
        width: 32px;
        height: 32px;
        font-size: 24px;
    }
}

/* ===========================
   Accessibility
   =========================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.aco-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --aco-border: #000000;
        --aco-text-muted: #333333;
        --aco-bg-overlay: rgba(0, 0, 0, 0.8);
    }

    #aco-consent-banner,
    #aco-preferences-panel {
        border-width: 2px;
    }
}

/* Focus visible polyfill support */
.aco-btn:focus:not(:focus-visible),
.aco-modal__close:focus:not(:focus-visible),
.aco-revoke-btn:focus:not(:focus-visible) {
    outline: none;
}

/* ===========================
   Embed Protection - Video Facades
   =========================== */

/* Standard Video Facade Container */
.aco-embed-facade {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    cursor: pointer;
    overflow: hidden;
    border-radius: 0;
    background: #000;
}

/* HIDE YouTube iframes that haven't been converted yet
   This provides an extra layer of protection against cookie setting
   BUT: iframes with aco-iframe-unlocked class are explicitly allowed */
iframe[src*="youtube.com/embed"]:not(.aco-iframe-unlocked):not([data-aco-embed-loaded]),
iframe[src*="youtube-nocookie.com"]:not(.aco-iframe-unlocked):not([data-aco-embed-loaded]),
iframe[data-aco-src*="youtube.com/embed"]:not(.aco-iframe-unlocked):not([data-aco-embed-loaded]),
iframe[data-aco-src*="youtube-nocookie.com"]:not(.aco-iframe-unlocked):not([data-aco-embed-loaded]) {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
}

/* Show unlocked iframes - override the hiding rules */
iframe.aco-iframe-unlocked {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Show facades properly */
.aco-embed-facade,
.aco-embed-facade iframe {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
}

.aco-embed-facade img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Consent Overlay - Direkt auf dem Video */
.aco-embed-consent-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.55) 50%, rgba(0, 0, 0, 0.75) 100%);
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
}

/* Overlay anzeigen wenn has-consent-overlay Klasse gesetzt ist */
.aco-embed-facade.has-consent-overlay .aco-embed-consent-overlay {
    opacity: 1;
    pointer-events: auto;
}

.aco-embed-facade:hover .aco-embed-consent-overlay {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.65) 50%, rgba(0, 0, 0, 0.85) 100%);
}

/* Consent Text */
.aco-embed-consent-text {
    color: white;
    font-family: var(--aco-font);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    padding: 0 20px;
}

/* [ACO 2026-10-03] Legacy-Block .aco-embed-accept-btn entfernt - Styles liegen in aco-embeds.css (vereinheitlicht mit .aco-iframe-accept-btn). */


/* Play Button Container */
.aco-embed-play-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.aco-embed-facade.has-consent-overlay .aco-embed-play-container {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
}

.aco-embed-play-btn {
    width: 68px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.aco-embed-play-btn svg {
    margin-left: 4px;
    fill: #333;
}

.aco-embed-facade:hover .aco-embed-play-btn {
    transform: scale(1.1);
}

/* Vimeo specific play button */
.aco-embed-vimeo .aco-embed-play-btn {
    background: #1ab7ea;
}

.aco-embed-vimeo .aco-embed-play-btn svg {
    fill: white;
}

/* Consent warning badge - zentrierte Pille (identisch zu .aco-overlay-badge) */
.aco-embed-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #2c333a;
    background: #e7eaee;
    border: 1px solid #d0d7de;
    border-radius: 999px;
}

.aco-embed-facade.has-consent-overlay .aco-embed-badge {
    opacity: 0;
}

.aco-embed-badge svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Loaded state */
.aco-embed-loaded iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Consent notice for embeds - Only used as fallback */
.aco-consent-notice {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: var(--aco-z-modal);
    background: var(--aco-bg);
    padding: 24px;
    border-radius: var(--aco-radius-lg);
    box-shadow: var(--aco-shadow-xl);
    text-align: center;
    max-width: 360px;
    font-family: var(--aco-font);
}

.aco-consent-notice p {
    margin: 0 0 16px 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--aco-text-primary);
}

.aco-consent-notice .aco-btn {
    margin: 4px;
}

.aco-consent-notice-overlay {
    position: fixed;
    inset: 0;
    background: var(--aco-bg-overlay);
    backdrop-filter: blur(4px);
    z-index: calc(var(--aco-z-modal) - 1);
}

/* Responsive video containers */
.aco-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.aco-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Dark Mode Support - REMOVED */
/* The privacy center and consent settings always use light mode */
/* Keine Dark Mode Anpassungen mehr - alles wird Weiß dargestellt */
@media (prefers-color-scheme: dark) {

    /* All CSS variables keep light mode values to ensure consistency */
    :root {
        --aco-bg: #ffffff;
        --aco-bg-secondary: #f8fafc;
        --aco-text-primary: #333333;
        --aco-text-secondary: #333333;
        --aco-text-muted: #94a3b8;
        --aco-border: #e2e8f0;
        --aco-border-light: #e2e8f0;
        --aco-bg-overlay: rgba(0, 0, 0, 0.5);
    }

    .aco-btn--primary {
        background: #6366f1;
    }

    .aco-btn--primary:hover {
        background: #4f46e5;
    }
}

/* Force Light Mode for History Panel and Privacy Center - Always white */
html .aco-history-panel,
html .aco-history-panel *,
html #aco-history-panel,
html #aco-history-panel *,
.aco-history-panel,
.aco-history-panel *,
#aco-history-panel,
#aco-history-panel *,
.aco-privacy-center,
.aco-privacy-center *,
.aco-privacy-center .aco-privacy-header,
.aco-privacy-center .aco-privacy-section,
.aco-privacy-center .aco-category,
.aco-privacy-center .aco-history-item,
.aco-privacy-center .aco-history-loading,
.aco-privacy-center .aco-history-empty,
.aco-privacy-center .aco-history-error,
.aco-privacy-center .aco-consent-id-value {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    border-bottom-color: #e2e8f0 !important;
}

/* Force text colors for history panel */
html .aco-history-panel,
html .aco-history-panel *,
.aco-history-panel,
.aco-history-panel *,
.aco-history-panel .aco-history-title,
.aco-history-panel .aco-history-action,
.aco-history-panel .aco-history-date,
.aco-history-panel .aco-history-empty,
.aco-history-panel .aco-history-empty p {
    color: #333333 !important;
}

/* Force history category tags */
.aco-history-panel .aco-history-cat,
.aco-history-panel .aco-history-cats,
.aco-history-panel .aco-history-entry {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
    color: #64748b !important;
}

.aco-history-panel .aco-history-cat.enabled {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
}

.aco-history-panel .aco-history-cat.disabled {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}

/* Force history close button */
.aco-history-panel .aco-close-btn {
    color: #64748b !important;
    background: transparent !important;
}

.aco-history-panel .aco-close-btn:hover {
    background: #f1f5f9 !important;
    color: #333333 !important;
}

/* Force spinner color */
.aco-history-panel .aco-spinner {
    border-color: #e2e8f0 !important;
    border-top-color: #6366f1 !important;
}

/* Force History Panel z-index to be highest */
.aco-history-panel {
    z-index: 1000001 !important;
}

/* ===========================
   Scroll Lock - Prevent background scrolling
   =========================== */

body.aco-noscroll {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ===========================
   Inline History View within Banner
   =========================== */

.aco-inline-history {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 320px;
}

.aco-inline-history.hidden {
    display: none;
}

.aco-inline-history-header {
    display: flex;
    align-items: center;
    gap: var(--aco-space-md);
    padding: var(--aco-space-lg);
    border-bottom: 1px solid var(--aco-border-light);
    flex-shrink: 0;
}

.aco-back-btn {
    display: flex;
    align-items: center;
    gap: var(--aco-space-sm);
    padding: var(--aco-space-sm) var(--aco-space-md);
    background: var(--aco-bg-secondary);
    border: 1px solid var(--aco-border);
    border-radius: var(--aco-radius);
    color: var(--aco-text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--aco-transition);
}

.aco-back-btn:hover {
    background: var(--aco-bg);
    border-color: var(--aco-primary);
    color: var(--aco-primary);
}

.aco-inline-history-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--aco-text-primary);
    margin: 0;
}

.aco-inline-history-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--aco-space-lg);
    max-height: 220px;
    scrollbar-width: thin;
    scrollbar-color: var(--aco-border) transparent;
}

/* Custom scrollbar for webkit browsers */
.aco-inline-history-body::-webkit-scrollbar {
    width: 6px;
}

.aco-inline-history-body::-webkit-scrollbar-track {
    background: transparent;
}

.aco-inline-history-body::-webkit-scrollbar-thumb {
    background-color: var(--aco-border);
    border-radius: 3px;
}

.aco-inline-history-body::-webkit-scrollbar-thumb:hover {
    background-color: var(--aco-text-muted);
}

/* History entries styling for inline view */
.aco-inline-history-body .aco-history-entries {
    display: flex;
    flex-direction: column;
    gap: var(--aco-space-md);
}

.aco-inline-history-body .aco-history-entry {
    background: var(--aco-bg-secondary);
    border-radius: var(--aco-radius);
    padding: var(--aco-space-md);
}

.aco-inline-history-body .aco-history-entry-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--aco-space-sm);
    flex-wrap: wrap;
    gap: var(--aco-space-xs);
}

.aco-inline-history-body .aco-history-date {
    font-size: 12px;
    color: var(--aco-text-muted);
}

.aco-inline-history-body .aco-history-action {
    font-size: 13px;
    font-weight: 500;
    color: var(--aco-text-primary);
}

.aco-inline-history-body .aco-history-cats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--aco-space-xs);
}

.aco-inline-history-body .aco-history-cat {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 9999px;
    background: var(--aco-border);
    color: var(--aco-text-secondary);
}

.aco-inline-history-body .aco-history-cat.enabled {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
}

.aco-inline-history-body .aco-history-cat.disabled {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}

/* Consent ID row in inline history */
.aco-inline-history-body .aco-history-id-row {
    display: flex;
    align-items: center;
    gap: var(--aco-space-sm);
    margin-top: var(--aco-space-sm);
    padding-top: var(--aco-space-sm);
    border-top: 1px dashed var(--aco-border);
}

.aco-inline-history-body .aco-history-id-label {
    font-size: 12px;
    color: var(--aco-text-muted);
    flex-shrink: 0;
}

.aco-inline-history-body .aco-history-id-value {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 12px;
    color: var(--aco-text-primary);
    background: var(--aco-bg);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--aco-border);
    word-break: break-all;
}

.aco-inline-history-body .aco-history-id-value:hover {
    border-color: var(--aco-primary);
    color: var(--aco-primary);
}

/* Loading state for inline history */
.aco-inline-history-body .aco-history-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--aco-space-xl);
    gap: var(--aco-space-md);
}

.aco-inline-history-body .aco-history-loading p {
    font-size: 14px;
    color: var(--aco-text-muted);
    margin: 0;
}

.aco-inline-history-body .aco-history-empty {
    text-align: center;
    color: var(--aco-text-muted);
    padding: var(--aco-space-xl);
    font-size: 14px;
}

/* ===========================
   Service Facade - Individual Services
   =========================== */

.aco-service-facade {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: var(--aco-space-lg);
    background: var(--aco-bg-secondary);
    border: 1px solid var(--aco-border);
    border-radius: var(--aco-radius-lg);
    overflow: hidden;
    transition: all var(--aco-transition);
}

.aco-service-facade:hover {
    border-color: var(--aco-primary);
    box-shadow: var(--aco-shadow);
}

.aco-service-facade-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--aco-space-md);
    transition: opacity var(--aco-transition);
}

.aco-service-facade-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--aco-bg);
    border-radius: 50%;
    color: var(--aco-primary);
    box-shadow: var(--aco-shadow-sm);
}

.aco-service-facade-icon svg {
    width: 32px;
    height: 32px;
}

.aco-service-facade-info {
    display: flex;
    flex-direction: column;
    gap: var(--aco-space-xs);
}

.aco-service-facade-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--aco-text-primary);
    margin: 0;
}

.aco-service-facade-description {
    font-size: 13px;
    color: var(--aco-text-secondary);
    line-height: 1.5;
    margin: 0;
    max-width: 300px;
}

/* Service Facade Overlay - Shown when no consent */
.aco-service-facade-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--aco-space-md);
    background: var(--aco-bg);
    background-image: url('/wp-content/plugins/advanced-consent-orchestrator/assets/css/../images/youtube-placeholder.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--aco-transition), visibility var(--aco-transition);
    padding: var(--aco-space-lg);
}

.aco-service-facade.has-consent-overlay .aco-service-facade-overlay {
    opacity: 1;
    visibility: visible;
}

.aco-service-facade.has-consent-overlay .aco-service-facade-content {
    opacity: 0;
    visibility: hidden;
}

.aco-service-facade-consent-text {
    font-size: 14px;
    color: var(--aco-text-primary);
    text-align: center;
    line-height: 1.5;
}

.aco-service-facade-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--aco-space-sm);
    padding: 12px 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: white;
    background: var(--aco-primary);
    border: none;
    border-radius: var(--aco-radius);
    cursor: pointer;
    transition: all var(--aco-transition);
}

.aco-service-facade-btn:hover {
    background: var(--aco-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--aco-shadow);
}

.aco-service-facade-btn svg {
    width: 18px;
    height: 18px;
}

/* Service Facade - Loaded State */
.aco-service-facade.aco-service-loaded {
    min-height: auto;
    padding: 0;
    background: transparent;
    border: none;
}

/* Service Facade - Responsive */
@media (max-width: 480px) {
    .aco-service-facade {
        min-height: 160px;
        padding: var(--aco-space-md);
    }

    .aco-service-facade-icon {
        width: 56px;
        height: 56px;
    }

    .aco-service-facade-icon svg {
        width: 28px;
        height: 28px;
    }

    .aco-service-facade-title {
        font-size: 15px;
    }

    .aco-service-facade-description {
        font-size: 12px;
    }
}

/* ===========================
   Banner Redesign - Professional Style
   =========================== */

/* Banner Header */
.aco-banner-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    margin-bottom: 20px;
}

.aco-banner-logo {
    max-height: 40px;
    max-width: 120px;
    object-fit: contain;
}

.aco-banner-header .aco-banner-title {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin: 0;
}

.aco-banner-header .aco-close-btn {
    position: absolute;
    top: var(--aco-space-md);
    right: var(--aco-space-md);
}

/* Banner Body - Scrollable Content */
.aco-banner-body {
    flex: 1;
    overflow-y: auto;
    min-height: 80px;
    max-height: 180px;
    padding-right: 8px;
    margin-bottom: 24px;
}

.aco-banner-body::-webkit-scrollbar {
    width: 6px;
}

.aco-banner-body::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 9999px;
}

.aco-banner-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}

.aco-banner-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* USA Transfer Warning */
.aco-usa-warning {
    display: flex;
    align-items: flex-start;
    gap: var(--aco-space-sm);
    margin-top: var(--aco-space-md);
    margin-bottom: 20px;
    padding: var(--aco-space-md);
    background: transparent;
    border: none;
    border-radius: var(--aco-radius);
}

.aco-usa-warning-icon {
    flex-shrink: 0;
    color: #6366f1;
}

.aco-usa-warning-text {
    font-size: 14px;
    line-height: 1.5;
    color: #333333;
    margin: 0;
}

/* Banner Buttons - Vertical Layout with Equal Prominence */
.aco-banner-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
    margin-top: auto;
}

.aco-banner-buttons .aco-btn-full {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
}

/* Button Styles - All buttons with same background color (purple/blue) */
.aco-btn-primary,
.aco-btn-secondary,
.aco-btn-outline {
    background: #6366f1;
    color: #ffffff;
    border: 2px solid #6366f1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.aco-btn-primary:hover,
.aco-btn-secondary:hover,
.aco-btn-outline:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
}

.aco-btn-primary:active,
.aco-btn-secondary:active,
.aco-btn-outline:active {
    transform: scale(0.98);
}

/* Banner Footer */
.aco-banner-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
    margin-top: 24px;
}

.aco-footer-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.aco-footer-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.aco-footer-link,
#aco-consent-banner .aco-footer-link {
    font-size: 14px !important;
    color: #888888 !important;
    text-decoration: none !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    font-family: inherit !important;
    transition: color 200ms ease !important;
}

.aco-footer-link:hover,
#aco-consent-banner .aco-footer-link:hover {
    color: #666666 !important;
    text-decoration: underline !important;
}

.aco-close-banner-btn,
#aco-consent-banner .aco-close-banner-btn {
    font-size: 14px !important;
    color: #888888 !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    font-family: inherit !important;
    transition: color 200ms ease !important;
}

.aco-close-banner-btn:hover,
#aco-consent-banner .aco-close-banner-btn:hover {
    color: #666666 !important;
    text-decoration: underline !important;
    background: transparent !important;
}



/* Updated Banner Container for Redesign - Light Mode */
#aco-consent-banner {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 480px;
    padding: 40px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: opacity 300ms ease, transform 300ms ease, visibility 300ms ease;
    overflow: hidden;
    z-index: 999999;
}

#aco-consent-banner.hidden {
    display: none;
}

/* Class to hide banner container when preferences panel is active
   Uses visibility/opacity instead of display to preserve event listeners */
#aco-consent-banner.aco-preferences-active {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Content area styling */
.aco-banner-content {
    display: none;
}

.aco-banner-title {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    line-height: 1.3;
}

.aco-banner-description {
    font-size: 14px;
    color: #333333;
    line-height: 1.5;
    margin: 0;
}

/* Secondary buttons container - Hidden in new design */
.aco-banner-secondary-buttons {
    display: none;
}

/* Footer separator - Hidden in new design */
.aco-footer-separator {
    display: none;
}

/* Preferences Footer Button */
.aco-preferences-footer .aco-btn-full {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
}

/* Mobile Optimization */
@media (max-width: 480px) {
    #aco-consent-banner {
        max-width: calc(100% - 32px);
        margin: 0;
        padding: 32px;
    }

    .aco-banner-header {
        padding: 0;
        padding-right: 40px;
        margin-bottom: 16px;
    }

    .aco-banner-logo {
        max-height: 32px;
        max-width: 80px;
    }

    .aco-banner-header .aco-banner-title {
        font-size: 16px;
    }

    .aco-banner-body {
        padding: 0;
        min-height: 60px;
        max-height: 150px;
        margin-bottom: 20px;
    }

    .aco-banner-buttons {
        padding: 0;
        gap: 10px;
    }

    .aco-banner-buttons .aco-btn-full {
        padding: 12px 16px;
        font-size: 14px;
    }

    .aco-banner-footer {
        padding: 16px 0 0 0;
        margin-top: 20px;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .aco-footer-links,
    .aco-footer-actions {
        flex-wrap: wrap;
        gap: 16px;
    }

    .aco-usa-warning {
        margin: 16px 0 0 0;
    }

    .aco-usa-warning-text {
        font-size: 11px;
    }
}
/* Iframe Overlay Styles - Facade-Look (vereinheitlicht mit .aco-embed-facade) */
.aco-iframe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f4f5f7;
    border: 1px solid #dcdfe4;
    border-radius: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.aco-iframe-overlay-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 440px;
    padding: 24px;
    text-align: center;
    color: #2c333a;
}

.aco-iframe-overlay-inner h4 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #1f2328;
}

.aco-iframe-overlay-inner p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #57606a;
}

.aco-overlay-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #2c333a;
    background: #e7eaee;
    border: 1px solid #d0d7de;
    border-radius: 999px;
}

.aco-overlay-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
}

.aco-overlay-actions button {
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    padding: 10px 16px;
    transition: background 0.25s, border-color 0.25s;
}

.aco-iframe-accept-btn {
    color: #fff;
    background: #4CAF50;
    border: none;
}

.aco-iframe-accept-btn:hover {
    background: #45a049;
}

.aco-iframe-settings-btn {
    color: #2c333a;
    background: #fff;
    border: 1px solid #d0d7de;
}

.aco-iframe-settings-btn:hover {
    background: #f3f4f6;
    border-color: #afb8c1;
}

@media (max-width: 480px) {
    .aco-overlay-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
}

/* [ACO 2026-10-03] Doppelter .aco-iframe-accept-btn-Block entfernt - kanonische Regel siehe oben. */

/* ACO 2.8.0: Inline-History in der Cookiebox scrollbar (max. 10 Eintraege) */
.aco-inline-history-body {
	max-height: 340px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}


/* === ACO THEME-ISOLATION (2.10.2) - schuetzt ACO-Design vor Theme-CSS (z.B. Elementor-Kit). === */
:is(#aco-consent-banner, #aco-preferences-panel) {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
	text-align: left !important;
}
:is(#aco-consent-banner, #aco-preferences-panel) :is(h1, h2, h3, h4, h5, h6, p, span, a, button, li, div, input, label) {
	text-transform: none !important;
	letter-spacing: normal !important;
	font-style: normal !important;
}
:is(#aco-consent-banner, #aco-preferences-panel) button {
	-webkit-appearance: none !important;
	appearance: none !important;
	background-image: none !important;
}
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-content { display: flex !important; flex-direction: column !important; gap: var(--aco-space-sm) !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-title { font-size: 16px !important; font-weight: 600 !important; color: var(--aco-text-primary) !important; line-height: 1.3 !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-description { font-size: 14px !important; color: var(--aco-text-secondary) !important; line-height: 1.6 !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-buttons { display: flex !important; flex-direction: column !important; gap: var(--aco-space-sm) !important; margin-top: var(--aco-space-lg) !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-buttons .aco-btn-full { width: 100% !important; padding: 14px 20px !important; font-size: 16px !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-secondary-buttons .aco-btn { flex: 1 !important; padding: 10px 12px !important; font-size: 13px !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-secondary-buttons .aco-btn { flex: 1 1 calc(50% - var(--aco-space-xs)) !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-footer { margin-top: var(--aco-space-md) !important; text-align: center !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-btn { display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: var(--aco-space-sm) !important; padding: 12px 20px !important; font-family: inherit !important; font-size: 14px !important; font-weight: 500 !important; line-height: 1 !important; text-decoration: none !important; border: none !important; border-radius: var(--aco-radius) !important; cursor: pointer !important; transition: all var(--aco-transition) !important; white-space: nowrap !important; user-select: none !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-btn:focus-visible { outline: 2px solid var(--aco-primary) !important; outline-offset: 2px !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-btn:active { transform: scale(0.98) !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-btn--primary { background: var(--aco-primary) !important; color: var(--aco-text-inverse) !important; box-shadow: var(--aco-shadow-sm) !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-btn--primary:hover { background: var(--aco-primary-hover) !important; box-shadow: var(--aco-shadow) !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-btn--secondary { background: transparent !important; color: var(--aco-text-secondary) !important; border: 1px solid var(--aco-border) !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-btn--secondary:hover { background: var(--aco-bg-secondary) !important; border-color: var(--aco-text-muted) !important; color: var(--aco-text-primary) !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-btn--ghost { background: transparent !important; color: var(--aco-text-muted) !important; padding: 12px 16px !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-btn--ghost:hover { color: var(--aco-text-secondary) !important; background: var(--aco-bg-secondary) !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-buttons .aco-btn { width: 100% !important; padding: 10px 16px !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-title { font-size: 15px !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-description { font-size: 13px !important; line-height: 1.5 !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-preferences-footer .aco-btn { width: 100% !important; padding: 10px 16px !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-btn:focus:not(:focus-visible), :is(#aco-consent-banner, #aco-preferences-panel) .aco-modal__close:focus:not(:focus-visible), :is(#aco-consent-banner, #aco-preferences-panel) .aco-revoke-btn:focus:not(:focus-visible) { outline: none !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-consent-notice .aco-btn { margin: 4px !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-btn--primary { background: #6366f1 !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-btn--primary:hover { background: #4f46e5 !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-header { display: flex !important; align-items: center !important; gap: 16px !important; padding-bottom: 20px !important; border-bottom: 1px solid #e2e8f0 !important; flex-shrink: 0 !important; margin-bottom: 20px !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-logo { max-height: 40px !important; max-width: 120px !important; object-fit: contain !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-header .aco-banner-title { flex: 1 !important; font-size: 18px !important; font-weight: 600 !important; color: #333333 !important; margin: 0 !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-header .aco-close-btn { position: absolute !important; top: var(--aco-space-md) !important; right: var(--aco-space-md) !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-usa-warning { display: flex !important; align-items: flex-start !important; gap: var(--aco-space-sm) !important; margin-top: var(--aco-space-md) !important; margin-bottom: 20px !important; padding: var(--aco-space-md) !important; background: transparent !important; border: none !important; border-radius: var(--aco-radius) !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-usa-warning-icon { flex-shrink: 0 !important; color: #6366f1 !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-usa-warning-text { font-size: 14px !important; line-height: 1.5 !important; color: #333333 !important; margin: 0 !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-buttons { display: flex !important; flex-direction: column !important; gap: 12px !important; flex-shrink: 0 !important; margin-top: auto !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-buttons .aco-btn-full { width: 100% !important; padding: 14px 20px !important; font-size: 15px !important; font-weight: 600 !important; border-radius: 8px !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-btn-primary, :is(#aco-consent-banner, #aco-preferences-panel) .aco-btn-secondary, :is(#aco-consent-banner, #aco-preferences-panel) .aco-btn-outline { background: #6366f1 !important; color: #ffffff !important; border: 2px solid #6366f1 !important; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-btn-primary:hover, :is(#aco-consent-banner, #aco-preferences-panel) .aco-btn-secondary:hover, :is(#aco-consent-banner, #aco-preferences-panel) .aco-btn-outline:hover { background: #4f46e5 !important; border-color: #4f46e5 !important; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07) !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-btn-primary:active, :is(#aco-consent-banner, #aco-preferences-panel) .aco-btn-secondary:active, :is(#aco-consent-banner, #aco-preferences-panel) .aco-btn-outline:active { transform: scale(0.98) !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-footer { display: flex !important; align-items: center !important; justify-content: space-between !important; padding-top: 20px !important; border-top: 1px solid #e2e8f0 !important; flex-shrink: 0 !important; margin-top: 24px !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-footer-links { display: flex !important; gap: 20px !important; align-items: center !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-footer-actions { display: flex !important; gap: 16px !important; align-items: center !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-content { display: none !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-title { font-size: 16px !important; font-weight: 600 !important; color: #333333 !important; line-height: 1.3 !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-description { font-size: 14px !important; color: #333333 !important; line-height: 1.5 !important; margin: 0 !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-preferences-footer .aco-btn-full { width: 100% !important; padding: 14px 20px !important; font-size: 15px !important; font-weight: 600 !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-header { padding: 0 !important; padding-right: 40px !important; margin-bottom: 16px !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-logo { max-height: 32px !important; max-width: 80px !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-header .aco-banner-title { font-size: 16px !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-buttons { padding: 0 !important; gap: 10px !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-buttons .aco-btn-full { padding: 12px 16px !important; font-size: 14px !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-footer { padding: 16px 0 0 0 !important; margin-top: 20px !important; flex-direction: column !important; gap: 12px !important; align-items: flex-start !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-footer-links, :is(#aco-consent-banner, #aco-preferences-panel) .aco-footer-actions { flex-wrap: wrap !important; gap: 16px !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-usa-warning { margin: 16px 0 0 0 !important; }
:is(#aco-consent-banner, #aco-preferences-panel) .aco-usa-warning-text { font-size: 11px !important; }


/* === ACO THEME-ISOLATION PATCH 2 (2.10.3) - Layout-Fixes + Hidden-Vorrang === */

/* Footer: alle Links in EINER Zeile (Umbruch nur bei echtem Platzmangel) */
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-footer {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px 16px !important;
}

/* Header: Logo zentral oben, Titel eine Zeile darunter */
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-header {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 10px !important;
    padding-right: 0 !important;
}
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-logo {
    align-self: center !important;
    margin: 0 auto !important;
}
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-title,
:is(#aco-consent-banner, #aco-preferences-panel) .aco-inline-history-title {
    width: 100% !important;
    text-align: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
:is(#aco-consent-banner, #aco-preferences-panel) .aco-inline-history-title {
    color: #0f172a !important;
    font-size: 18px !important;
    font-weight: 600 !important;
}

/* Zurueck-Button: ACO-Design statt Theme-Button (Elementor-Kit-Bleed) */
:is(#aco-consent-banner, #aco-preferences-panel) .aco-back-btn {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
    background-image: none !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: var(--aco-radius) !important;
    box-shadow: none !important;
    color: #0f172a !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
}

/* Hidden-Vorrang: JS-Sichtbarkeits-Toggles (.hidden) gewinnen IMMER ueber Design-Spiegel */
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-buttons .aco-btn-full.hidden,
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-buttons .aco-btn.hidden,
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-secondary-buttons .aco-btn.hidden,
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-header.hidden,
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-description.hidden,
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-buttons.hidden,
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-footer.hidden,
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-logo.hidden,
:is(#aco-consent-banner, #aco-preferences-panel) .aco-usa-warning.hidden,
:is(#aco-consent-banner, #aco-preferences-panel) .aco-inline-history.hidden,
:is(#aco-consent-banner, #aco-preferences-panel) .hidden {
    display: none !important;
}

/* Historie-Scroll: Mausrad-Scroll absichern, deprecated Prop neutralisieren */
:is(#aco-consent-banner, #aco-preferences-panel) .aco-inline-history-body {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: auto !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
}

/* ============ PATCH 3: Logo-Groesse + Abstand Hinweistext ============ */
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-logo {
  max-height: 64px !important;
  max-width: 220px !important;
}
:is(#aco-consent-banner, #aco-preferences-panel) .aco-banner-description {
  padding-bottom: 18px !important;
}
