/* ================= Cookie Consent – scoped styles =================Strikt nur für den Banner;
keine globalen Selektoren!– nutzt Theme-Variablen falls vorhanden, sonst Fallbacks=================================================================== */
/* Seite sperren, wenn offen */
body.consent-locked {
    overflow: hidden;
}

/* Blur-Backdrop */
#cc-backdrop {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, .45);
    z-index: 9999;
    display: none;
}

/* Panel */
#cc-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 84vw;
    max-height: 86vh;
    overflow: auto;
    background: var(--secondary-color, #3f4e4f);
    color: var(--text-color-light, #dcd7c9);
    border-radius: 1.2vw;
    box-shadow: 0 1.6vh 4vh rgba(0, 0, 0, .5);
    padding: 4vh 3vw;
    z-index: 10000;
    font-family: inherit;
    /* übernimmt Seite */
}

#cc-panel h2 {
    margin: 0 0 2vh 0;
    font-size: 1.7rem;
    line-height: 1.2;
}

#cc-panel p {
    margin: 1.2vh 0 2.4vh 0;
    line-height: 1.55;
    font-size: 1.05rem;
    opacity: .98;
}

/* Kategorien-Grid */
#cc-panel .cc-categories {
    display: grid;
    grid-template-columns: 2fr .6fr;
    gap: 2.2vh 2vw;
    align-items: center;
    margin: 2.4vh 0 2.8vh 0;
    background: rgba(0, 0, 0, .08);
    border-radius: .8vw;
    padding: 2.4vh 1.8vw;
}

#cc-panel .cc-cat {
    display: grid;
    grid-template-rows: auto auto;
    row-gap: .8vh;
}

#cc-panel .cc-cat-title {
    font-weight: 700;
    font-size: 1.12rem;
}

#cc-panel .cc-cat-desc {
    opacity: .92;
    font-size: 1rem;
}

/* Switches */
#cc-panel .cc-switch {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 1vw;
}

#cc-panel .cc-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

#cc-panel .cc-slider {
    width: 10vh;
    height: 3.2vh;
    background: #666;
    border-radius: 999vw;
    position: relative;
    transition: filter .2s ease, background .2s ease, box-shadow .2s ease;
    box-shadow: inset 0 0 0 .3vh rgba(0, 0, 0, .25);
}

#cc-panel .cc-slider::after {
    content: "";
    position: absolute;
    top: 50%;
    left: .6vh;
    transform: translateY(-50%);
    width: 2.8vh;
    height: 2.8vh;
    border-radius: 50%;
    background: var(--lait, #dcd7c9);
    box-shadow: 0 .25vh 1vh rgba(0, 0, 0, .35);
    transition: left .2s ease;
}

#cc-panel .cc-switch input:checked+.cc-slider {
    background: var(--accent-color, #237d7d);
}

#cc-panel .cc-switch input:checked+.cc-slider::after {
    left: calc(100% - 2.8vh - .6vh);
}

#cc-panel .cc-switch input:disabled+.cc-slider {
    background: #444;
    opacity: .7;
    cursor: not-allowed;
}

/* Buttons */
#cc-panel .cc-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1vw;
    margin-top: 3vh;
}

#cc-panel .cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: 2vh 1.2vw;
    border-radius: 2.4vh;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    min-height: 6vh;
    text-decoration: none;
}

#cc-panel .cc-btn:focus-visible {
    outline: .45vh solid var(--accent-color, #237d7d);
    outline-offset: .2vh;
    border-radius: .8vh;
}

#cc-panel .cc-btn--ghost {
    background: transparent;
    color: var(--text-color-light, #dcd7c9);
    outline: .35vh solid var(--text-color-light, #dcd7c9);
}

#cc-panel .cc-btn--primary {
    background: var(--accent-color, #237d7d);
    color: var(--lait, #dcd7c9);
}

#cc-panel .cc-btn--neutral {
    background: var(--lait, #dcd7c9);
    color: var(--accent-color, #237d7d);
}

/* Links im Panel */
#cc-panel .cc-more {
    margin-top: 2.2vh;
}

#cc-panel .cc-more a {
    color: var(--accent-color, #237d7d);
    text-decoration: none;
    border-bottom: .35vh solid transparent;
}

#cc-panel .cc-more a:hover {
    border-bottom-color: currentColor;
}

/* Responsive */
@media (max-width: 900px) {
    #cc-panel {
        width: 92vw;
        padding: 3.2vh 4vw;
    }

    #cc-panel .cc-categories {
        grid-template-columns: 1fr;
    }

    #cc-panel .cc-switch {
        justify-self: start;
    }

    #cc-panel .cc-actions {
        grid-template-columns: 1fr;
    }

    #cc-panel .cc-btn {
        min-height: 6.4vh;
    }
}