.ddcb-card {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 999999;
    max-width: 360px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    padding: 20px;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}

.ddcb-card.ddcb-visible {
    opacity: 1;
    transform: none;
}

/*
 * Modale Variante: Banner mittig, Seite dahinter abgedunkelt und unscharf.
 * Deutlich schwerer zu übersehen als die Ecke unten links — und wer nicht
 * entscheidet, wird auch nicht gemessen.
 *
 * Bewusst KEINE Cookie-Wall: Der Hintergrund ist nur visuell zurückgenommen,
 * nicht gesperrt. Beide Schaltflächen sind gleichwertig, „Ablehnen" führt
 * ohne Umweg zur vollständig nutzbaren Seite. Eine Einwilligung, die man
 * erzwingt, ist nach Art. 4 Nr. 11 DSGVO keine.
 */
.ddcb-overlay {
    position: fixed;
    inset: 0;
    z-index: 999998;
    background: rgba(20, 22, 25, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.18s ease-out;
}

.ddcb-overlay.ddcb-visible {
    opacity: 1;
}

body.ddcb-modal .ddcb-card {
    left: 50%;
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -46%);
    max-width: 460px;
}

body.ddcb-modal .ddcb-card.ddcb-visible {
    transform: translate(-50%, -50%);
}

/* Auf schmalen Displays die Ränder nicht verschenken. */
@media (max-width: 520px) {
    body.ddcb-modal .ddcb-card {
        width: calc(100vw - 24px);
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ddcb-overlay {
        transition: none;
    }
    body.ddcb-modal .ddcb-card,
    body.ddcb-modal .ddcb-card.ddcb-visible {
        transform: translate(-50%, -50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ddcb-card {
        transition: none;
    }
}

@media (max-width: 480px) {
    .ddcb-card {
        left: 8px;
        right: 8px;
        bottom: 8px;
        max-width: none;
    }
}

.ddcb-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    margin-bottom: 8px;
}

.ddcb-text {
    margin: 0;
    font-size: 13.5px;
    color: #555;
}

.ddcb-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.ddcb-btn {
    flex: 1 1 0;
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
}

.ddcb-btn-primary {
    background: var(--ddcb-accent, #5a7a20);
    color: #fff;
}

.ddcb-btn-primary:hover {
    background: var(--ddcb-accent-hover, #4c6719);
}

.ddcb-btn-secondary {
    background: #e9e9e9;
    color: #333;
}

.ddcb-btn-secondary:hover {
    background: #dcdcdc;
}

.ddcb-links {
    margin-top: 10px;
    font-size: 12px;
    color: #767676;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.ddcb-links a {
    color: #666;
    text-decoration: underline;
}

.ddcb-linkbtn {
    background: none;
    border: 0;
    padding: 0;
    font-size: 12px;
    color: #666;
    text-decoration: underline;
    cursor: pointer;
}

.ddcb-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
}

.ddcb-rowtext {
    font-size: 13px;
}

.ddcb-rowtext small {
    color: #6b6b6b;
}

.ddcb-rowtext a {
    color: #666;
    text-decoration: underline;
}

.ddcb-rowtext code {
    background: none;
    border: 0;
    padding: 0;
    font-size: inherit;
    color: inherit;
}

.ddcb-details {
    margin-top: 4px;
    font-size: 12px;
}

.ddcb-details summary {
    color: #666;
    text-decoration: underline;
    cursor: pointer;
    list-style: none;
    display: inline;
}

.ddcb-details summary::-webkit-details-marker {
    display: none;
}

.ddcb-details p {
    margin: 6px 0 0;
    color: #6b6b6b;
}

.ddcb-note {
    margin: 10px 0 0;
    font-size: 11.5px;
    color: #767676;
}

.ddcb-switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
    flex: 0 0 auto;
    margin-top: 1px;
}

.ddcb-switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.ddcb-switch span {
    display: block;
    width: 34px;
    height: 20px;
    border-radius: 10px;
    background: #ccc;
    transition: background 0.15s ease-out;
}

.ddcb-switch span::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s ease-out;
}

.ddcb-switch input:checked + span {
    background: var(--ddcb-accent, #719430);
}

.ddcb-switch input:checked + span::after {
    transform: translateX(14px);
}

.ddcb-switch input:focus-visible + span {
    outline: 2px solid var(--ddcb-accent, #719430);
    outline-offset: 2px;
}

.ddcb-switch-locked span {
    opacity: 0.55;
}

.ddcb-switch-locked input {
    cursor: default;
}

a.ddcb-inlinebtn,
button.ddcb-inlinebtn {
    display: inline-block;
    flex: none;
    text-decoration: none;
}

a.ddcb-inlinebtn,
a.ddcb-inlinebtn:hover {
    color: #fff;
}

.ddcb-tabelle-wrap {
    overflow-x: auto;
    margin: 1em 0;
}

.ddcb-tabelle {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ddcb-tabelle th,
.ddcb-tabelle td {
    border: 1px solid #ddd;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.ddcb-tabelle th {
    background: #f5f5f5;
}

.ddcb-status {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px 18px;
    margin: 1em 0;
    background: #fafafa;
    font-size: 14px;
}

.ddcb-status code {
    word-break: break-all;
}
