/**
 * Cookie-Consent-Tool - Front-End
 *
 * Die drei Schaltflächen teilen sich bewusst eine einzige Klasse: Eine
 * hervorgehobene Zustimmung neben einer unauffälligen Ablehnung gilt als
 * unwirksame Einwilligung.
 */

#agcc-injected {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.agcc-root {
    color: var(--agcc-text, #232323);
    font-size: 14px;
    line-height: 1.5;
}

.agcc-root[hidden] {
    display: none;
}

.agcc-backdrop {
    position: fixed;
    inset: 0;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 99998;
}

.agcc-banner {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 99999;
    background: var(--agcc-bg, #fff);
    border-top: 3px solid var(--agcc-primary, #2f6f4e);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .18);
}

.agcc-details {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 99999;
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    transform: translate(-50%, -50%);
    background: var(--agcc-bg, #fff);
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
}

.agcc-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.agcc-headline {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
}

.agcc-text {
    margin-bottom: 10px;
}

.agcc-text p:last-child {
    margin-bottom: 0;
}

.agcc-links {
    margin: 0 0 14px;
    font-size: 13px;
}

.agcc-links a {
    color: inherit;
    text-decoration: underline;
    margin-right: 14px;
}

.agcc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.agcc-btn {
    flex: 1 1 200px;
    padding: 11px 16px;
    font: inherit;
    font-weight: 600;
    color: var(--agcc-text, #232323);
    background: transparent;
    border: 2px solid var(--agcc-primary, #2f6f4e);
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}

.agcc-btn:hover,
.agcc-btn:focus-visible {
    background: rgba(0, 0, 0, .05);
}

.agcc-btn:focus-visible {
    outline: 3px solid var(--agcc-primary, #2f6f4e);
    outline-offset: 2px;
}

.agcc-group {
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .12);
}

.agcc-group__text {
    margin: 6px 0 0 62px;
    font-size: 13px;
}

.agcc-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
}

.agcc-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.agcc-switch__track {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 24px;
    background: #b9b9b9;
    border-radius: 12px;
    transition: background .15s ease-in-out;
}

.agcc-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .15s ease-in-out;
}

.agcc-switch input:checked + .agcc-switch__track {
    background: var(--agcc-primary, #2f6f4e);
}

.agcc-switch input:checked + .agcc-switch__track::after {
    transform: translateX(22px);
}

.agcc-switch input:disabled + .agcc-switch__track {
    opacity: .65;
}

.agcc-switch input:focus-visible + .agcc-switch__track {
    outline: 3px solid var(--agcc-primary, #2f6f4e);
    outline-offset: 2px;
}

.agcc-switch__label em {
    font-weight: 400;
    font-style: normal;
    opacity: .7;
}

.agcc-cookies {
    margin: 10px 0 0 62px;
    font-size: 13px;
}

.agcc-cookies summary {
    cursor: pointer;
    text-decoration: underline;
}

.agcc-table-wrap {
    overflow-x: auto;
    margin-top: 8px;
}

.agcc-table {
    width: 100%;
    border-collapse: collapse;
}

.agcc-table th,
.agcc-table td {
    padding: 6px 8px;
    text-align: left;
    vertical-align: top;
    border: 1px solid rgba(0, 0, 0, .12);
}

.agcc-table th {
    background: rgba(0, 0, 0, .04);
    white-space: nowrap;
}

.agcc-host {
    opacity: .7;
    font-size: 12px;
}

.agcc-details .agcc-actions {
    margin-top: 18px;
}

.agcc-reopen {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 99997;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: var(--agcc-primary, #2f6f4e);
    background: var(--agcc-bg, #fff);
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
    cursor: pointer;
}

.agcc-reopen[hidden] {
    display: none;
}

.agcc-reopen:focus-visible {
    outline: 3px solid var(--agcc-primary, #2f6f4e);
    outline-offset: 2px;
}

@media (max-width: 600px) {
    .agcc-inner {
        padding: 16px;
    }

    .agcc-btn {
        flex: 1 1 100%;
    }

    .agcc-group__text,
    .agcc-cookies {
        margin-left: 0;
    }

    .agcc-details {
        width: 100vw;
        max-height: 100vh;
        top: 0;
        left: 0;
        border-radius: 0;
        transform: none;
    }
}

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