:root {
    --resonanz-consent-bg: rgba(8, 13, 24, 0.94);
    --resonanz-consent-surface: rgba(15, 22, 42, 0.96);
    --resonanz-consent-surface-strong: #0f172a;
    --resonanz-consent-border: rgba(148, 163, 184, 0.2);
    --resonanz-consent-text: #e5edf8;
    --resonanz-consent-muted: #9fb0c8;
    --resonanz-consent-accent: #8ecfff;
    --resonanz-consent-accent-strong: #d6f0ff;
    --resonanz-consent-glow: rgba(142, 207, 255, 0.22);
    --resonanz-consent-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --resonanz-consent-radius: 18px;
}

.resonanz-consent {
    position: relative;
    z-index: 99999;
}

.resonanz-consent [hidden] {
    display: none !important;
}

.resonanz-consent__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 9, 18, 0.7);
    backdrop-filter: blur(8px);
    z-index: 99996;
}

.resonanz-consent--enhanced .resonanz-consent__backdrop,
.resonanz-consent--enhanced .resonanz-consent__banner,
.resonanz-consent--enhanced .resonanz-consent__modal,
.resonanz-consent--enhanced .resonanz-consent__manage-button,
.resonanz-consent--enhanced .resonanz-consent__status {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.resonanz-consent__banner,
.resonanz-consent__modal,
.resonanz-consent__manage-button,
.resonanz-consent__status,
.resonanz-consent-inline-button {
    font-family: 'Manrope', 'Segoe UI', sans-serif;
}

.resonanz-consent__banner {
    position: fixed;
    left: 24px;
    right: 24px;
    bottom: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) auto;
    gap: 24px;
    align-items: end;
    padding: 24px;
    color: var(--resonanz-consent-text);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(11, 18, 32, 0.98));
    border: 1px solid var(--resonanz-consent-border);
    border-radius: calc(var(--resonanz-consent-radius) + 2px);
    box-shadow: var(--resonanz-consent-shadow);
    overflow: hidden;
    isolation: isolate;
    z-index: 99997;
}

.resonanz-consent__banner::before,
.resonanz-consent__modal::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(142, 207, 255, 0.16), transparent 34%),
        radial-gradient(circle at bottom left, rgba(142, 207, 255, 0.09), transparent 36%);
    pointer-events: none;
    z-index: -2;
}

.resonanz-consent__banner::after,
.resonanz-consent__modal::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(142, 207, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    pointer-events: none;
    z-index: -1;
}

.resonanz-consent--enhanced .resonanz-consent__banner {
    transform: translateY(30px) scale(0.965) rotateX(7deg);
    transform-origin: bottom center;
    filter: blur(14px) saturate(0.88);
    transition:
        opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.6s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0.6s,
        box-shadow 0.35s ease;
}

.resonanz-consent--enhanced .resonanz-consent__banner.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1) rotateX(0deg);
    filter: blur(0) saturate(1);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(142, 207, 255, 0.08),
        0 0 40px rgba(142, 207, 255, 0.08);
    transition-delay: 0s;
}

.resonanz-consent__eyebrow {
    margin: 0 0 8px;
    color: var(--resonanz-consent-accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.resonanz-consent__banner h2,
.resonanz-consent__modal h2,
.resonanz-consent__group h3 {
    margin: 0;
    color: var(--resonanz-consent-text);
    font-family: 'Cinzel', 'Palatino Linotype', serif;
}

.resonanz-consent__banner p,
.resonanz-consent__modal p,
.resonanz-consent__service-item p {
    margin: 0;
    color: var(--resonanz-consent-muted);
    line-height: 1.65;
}

.resonanz-consent__banner-copy {
    display: grid;
    gap: 10px;
}

.resonanz-consent--enhanced .resonanz-consent__banner-copy,
.resonanz-consent--enhanced .resonanz-consent__banner-actions,
.resonanz-consent--enhanced .resonanz-consent__modal-copy,
.resonanz-consent--enhanced .resonanz-consent__group,
.resonanz-consent--enhanced .resonanz-consent__modal-actions {
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity 0.34s ease,
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.resonanz-consent--enhanced .resonanz-consent__banner.is-active .resonanz-consent__banner-copy,
.resonanz-consent--enhanced .resonanz-consent__banner.is-active .resonanz-consent__banner-actions,
.resonanz-consent--enhanced .resonanz-consent__modal.is-active .resonanz-consent__modal-copy,
.resonanz-consent--enhanced .resonanz-consent__modal.is-active .resonanz-consent__group,
.resonanz-consent--enhanced .resonanz-consent__modal.is-active .resonanz-consent__modal-actions {
    opacity: 1;
    transform: translateY(0);
}

.resonanz-consent--enhanced .resonanz-consent__banner.is-active .resonanz-consent__banner-copy {
    transition-delay: 0.08s;
}

.resonanz-consent--enhanced .resonanz-consent__banner.is-active .resonanz-consent__banner-actions {
    transition-delay: 0.16s;
}

.resonanz-consent__banner-copy a {
    color: var(--resonanz-consent-accent-strong);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.resonanz-consent__banner-actions,
.resonanz-consent__modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.resonanz-consent__button,
.resonanz-consent__manage-button,
.resonanz-consent-inline-button,
.resonanz-consent__icon-button {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.resonanz-consent__button,
.resonanz-consent-inline-button {
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 700;
}

.resonanz-consent__button:hover,
.resonanz-consent__manage-button:hover,
.resonanz-consent-inline-button:hover,
.resonanz-consent__icon-button:hover {
    transform: translateY(-1px);
}

.resonanz-consent__button--primary,
.resonanz-consent-inline-button {
    color: #07111f;
    background: linear-gradient(135deg, #d7f2ff, #8ecfff);
    box-shadow: 0 12px 24px rgba(142, 207, 255, 0.18);
}

.resonanz-consent__button--secondary {
    color: var(--resonanz-consent-text);
    background: rgba(142, 207, 255, 0.12);
    border-color: rgba(142, 207, 255, 0.22);
}

.resonanz-consent__button--ghost,
.resonanz-consent__manage-button,
.resonanz-consent__icon-button {
    color: var(--resonanz-consent-text);
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--resonanz-consent-border);
}

.resonanz-consent__modal {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(780px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 24px;
    color: var(--resonanz-consent-text);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(8, 13, 24, 0.98));
    border: 1px solid var(--resonanz-consent-border);
    border-radius: calc(var(--resonanz-consent-radius) + 4px);
    box-shadow: var(--resonanz-consent-shadow);
    transform: translate(-50%, -50%);
    isolation: isolate;
    z-index: 99998;
}

.resonanz-consent--enhanced .resonanz-consent__modal {
    transform: translate(-50%, -46%) scale(0.965);
    filter: blur(18px) saturate(0.9);
    transition:
        opacity 0.32s ease,
        transform 0.52s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.52s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0.52s;
}

.resonanz-consent--enhanced .resonanz-consent__modal.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0) saturate(1);
    transition-delay: 0s;
}

.resonanz-consent__modal-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.resonanz-consent__modal-copy {
    margin-bottom: 20px;
}

.resonanz-consent__groups {
    display: grid;
    gap: 14px;
    margin-bottom: 20px;
}

.resonanz-consent__group {
    padding: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
}

.resonanz-consent--enhanced .resonanz-consent__modal.is-active .resonanz-consent__modal-copy {
    transition-delay: 0.08s;
}

.resonanz-consent--enhanced .resonanz-consent__modal.is-active .resonanz-consent__group:nth-child(1) {
    transition-delay: 0.14s;
}

.resonanz-consent--enhanced .resonanz-consent__modal.is-active .resonanz-consent__group:nth-child(2) {
    transition-delay: 0.2s;
}

.resonanz-consent--enhanced .resonanz-consent__modal.is-active .resonanz-consent__group:nth-child(3) {
    transition-delay: 0.26s;
}

.resonanz-consent--enhanced .resonanz-consent__modal.is-active .resonanz-consent__modal-actions {
    transition-delay: 0.28s;
}

.resonanz-consent__group-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
}

.resonanz-consent__group-header > div {
    display: grid;
    gap: 6px;
}

.resonanz-consent__service-list {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.resonanz-consent__service-item {
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.resonanz-consent__service-head {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 6px;
}

.resonanz-consent__service-head span,
.resonanz-consent__service-meta {
    font-size: 0.88rem;
    color: var(--resonanz-consent-muted);
}

.resonanz-consent__toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.resonanz-consent__toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.resonanz-consent__toggle-ui {
    width: 58px;
    height: 32px;
    background: rgba(148, 163, 184, 0.2);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    position: relative;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.resonanz-consent__toggle-ui::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
    transition: transform 0.18s ease;
}

.resonanz-consent__toggle input:checked + .resonanz-consent__toggle-ui {
    background: rgba(142, 207, 255, 0.18);
    border-color: rgba(142, 207, 255, 0.45);
}

.resonanz-consent__toggle input:checked + .resonanz-consent__toggle-ui::after {
    transform: translateX(26px);
    background: var(--resonanz-consent-accent-strong);
}

.resonanz-consent__toggle input:disabled + .resonanz-consent__toggle-ui {
    opacity: 0.82;
}

.resonanz-consent__icon-button {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.resonanz-consent__manage-button {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 99995;
    padding: 11px 16px;
    font-size: 0.9rem;
    font-weight: 700;
    backdrop-filter: blur(12px);
}

.resonanz-consent--enhanced .resonanz-consent__manage-button {
    transform: translateY(16px) scale(0.94);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    transition:
        opacity 0.28s ease,
        transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0.42s,
        border-color 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease;
}

.resonanz-consent--enhanced .resonanz-consent__manage-button.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
}

.resonanz-consent__status {
    position: fixed;
    left: 50%;
    bottom: 96px;
    transform: translateX(-50%);
    max-width: calc(100vw - 32px);
    padding: 10px 14px;
    color: var(--resonanz-consent-text);
    background: rgba(9, 15, 27, 0.92);
    border: 1px solid var(--resonanz-consent-border);
    border-radius: 999px;
    box-shadow: var(--resonanz-consent-shadow);
    z-index: 99999;
    white-space: nowrap;
}

.resonanz-consent--enhanced .resonanz-consent__status {
    transform: translate(-50%, 18px) scale(0.96);
    filter: blur(10px);
    transition:
        opacity 0.22s ease,
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0.4s;
}

.resonanz-consent--enhanced .resonanz-consent__status.is-active,
.resonanz-consent--enhanced .resonanz-consent__status.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0) scale(1);
    filter: blur(0);
    transition-delay: 0s;
}

.resonanz-consent--enhanced .resonanz-consent__backdrop {
    transition:
        opacity 0.32s ease,
        visibility 0s linear 0.32s,
        backdrop-filter 0.32s ease;
}

.resonanz-consent--enhanced .resonanz-consent__backdrop.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    backdrop-filter: blur(12px);
    transition-delay: 0s;
}

body.resonanz-consent-modal-open {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .resonanz-consent--enhanced .resonanz-consent__backdrop,
    .resonanz-consent--enhanced .resonanz-consent__banner,
    .resonanz-consent--enhanced .resonanz-consent__modal,
    .resonanz-consent--enhanced .resonanz-consent__manage-button,
    .resonanz-consent--enhanced .resonanz-consent__status,
    .resonanz-consent--enhanced .resonanz-consent__banner-copy,
    .resonanz-consent--enhanced .resonanz-consent__banner-actions,
    .resonanz-consent--enhanced .resonanz-consent__modal-copy,
    .resonanz-consent--enhanced .resonanz-consent__group,
    .resonanz-consent--enhanced .resonanz-consent__modal-actions {
        transition: none;
        filter: none;
        transform: none;
    }
}

@media (max-width: 860px) {
    .resonanz-consent__banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .resonanz-consent__banner-actions,
    .resonanz-consent__modal-actions {
        justify-content: stretch;
    }

    .resonanz-consent__button,
    .resonanz-consent-inline-button {
        width: 100%;
        justify-content: center;
    }

    .resonanz-consent__modal {
        top: 8px;
        right: 8px;
        bottom: 8px;
        left: 8px;
        width: auto;
        max-height: none;
        padding: 18px;
        transform: none;
    }

    .resonanz-consent--enhanced .resonanz-consent__modal {
        transform: translateY(18px) scale(0.985);
    }

    .resonanz-consent--enhanced .resonanz-consent__modal.is-active {
        transform: translateY(0) scale(1);
    }

    .resonanz-consent__group-header {
        grid-template-columns: 1fr;
        display: grid;
    }

    .resonanz-consent__manage-button {
        left: 12px;
        bottom: 12px;
    }

    .resonanz-consent__status {
        white-space: normal;
        text-align: center;
    }
}
