/*
 * Fuhrwerk Cookie Consent
 * Das Design lässt sich über CSS-Variablen anpassen, z. B. im Theme:
 *   :root { --fwpcc-bg: #fff; --fwpcc-text: #111; --fwpcc-accent: #0055aa; }
 */
:root {
    --fwpcc-bg: #0a0a0a;
    --fwpcc-bg-soft: #161616;
    --fwpcc-text: #ffffff;
    --fwpcc-muted: #b5b5b5;
    --fwpcc-accent: #9b1003;
    --fwpcc-accent-text: #ffffff;
    --fwpcc-border: #333333;
    --fwpcc-radius: 10px;
    --fwpcc-font: inherit;
    --fwpcc-z: 99999;
}

.fwpcc, .fwpcc-modal {
    font-family: var(--fwpcc-font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--fwpcc-text);
    box-sizing: border-box;
}
.fwpcc *, .fwpcc-modal * { box-sizing: border-box; }

/* ---------- Hinweis (unten) ---------- */
.fwpcc {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--fwpcc-z);
    padding: 16px;
    pointer-events: none;
}
.fwpcc__box {
    pointer-events: auto;
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 24px;
    background: var(--fwpcc-bg);
    border: 1px solid var(--fwpcc-border);
    border-radius: var(--fwpcc-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}
.fwpcc__title {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--fwpcc-text);
    text-transform: none;
}
.fwpcc__text {
    margin: 0 0 16px;
    color: var(--fwpcc-text);
    font-size: 15px;
}
.fwpcc__text a, .fwpcc-cat__desc a {
    color: var(--fwpcc-text);
    text-decoration: underline;
}
.fwpcc__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

/* Beide Hauptbuttons sind gleich gestaltet: Ablehnen ist so leicht wie Zustimmen. */
.fwpcc__btn {
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: var(--fwpcc-radius);
    border: 1px solid var(--fwpcc-accent);
    background: transparent;
    color: var(--fwpcc-text);
    transition: background .15s, color .15s;
}
.fwpcc__btn--main:hover, .fwpcc__btn--main:focus-visible {
    background: var(--fwpcc-accent);
    color: var(--fwpcc-accent-text);
}
.fwpcc__btn--link {
    border-color: transparent;
    color: var(--fwpcc-muted);
    text-decoration: underline;
    padding-left: 8px;
    padding-right: 8px;
}
.fwpcc__btn--link:hover, .fwpcc__btn--link:focus-visible { color: var(--fwpcc-text); }
.fwpcc__btn:focus-visible, .fwpcc-modal__close:focus-visible, .fwpcc-cat input:focus-visible {
    outline: 2px solid var(--fwpcc-text);
    outline-offset: 2px;
}

/* ---------- Dialog ---------- */
.fwpcc-modal {
    position: fixed;
    inset: 0;
    z-index: calc(var(--fwpcc-z) + 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, .7);
}
.fwpcc-modal__dialog {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 680px;
    max-height: 100%;
    background: var(--fwpcc-bg);
    border: 1px solid var(--fwpcc-border);
    border-radius: var(--fwpcc-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
    outline: none;
}
.fwpcc-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px 0;
}
.fwpcc-modal__head .fwpcc__title { margin: 0; }
.fwpcc-modal__close {
    flex: none;
    width: 36px;
    height: 36px;
    margin: -4px -8px 0 0;
    border: 0;
    background: transparent;
    color: var(--fwpcc-muted);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}
.fwpcc-modal__close:hover { color: var(--fwpcc-text); }
.fwpcc-modal__body {
    padding: 16px 24px;
    overflow-y: auto;
}
.fwpcc-modal__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--fwpcc-border);
}

.fwpcc-cat {
    margin: 0 0 12px;
    padding: 14px 16px;
    background: var(--fwpcc-bg-soft);
    border: 1px solid var(--fwpcc-border);
    border-radius: var(--fwpcc-radius);
}
.fwpcc-cat__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.fwpcc-cat__label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-weight: 700;
    cursor: pointer;
}
.fwpcc-cat__label input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--fwpcc-accent);
}
.fwpcc-cat__badge {
    font-size: 13px;
    color: var(--fwpcc-muted);
}
.fwpcc-cat__desc {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--fwpcc-muted);
}
.fwpcc-cat__details { margin-top: 10px; font-size: 14px; }
.fwpcc-cat__details summary { cursor: pointer; color: var(--fwpcc-muted); }
.fwpcc-cat__details summary:hover { color: var(--fwpcc-text); }

.fwpcc-table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
    font-size: 13px;
}
.fwpcc-table th, .fwpcc-table td {
    padding: 6px 8px;
    text-align: left;
    vertical-align: top;
    border-top: 1px solid var(--fwpcc-border);
    color: var(--fwpcc-text);
    word-break: break-word;
}
.fwpcc-table th { color: var(--fwpcc-muted); font-weight: 600; }

.fwpcc-lock { overflow: hidden; }

@media (max-width: 575px) {
    .fwpcc { padding: 8px; }
    .fwpcc__box { padding: 16px; }
    .fwpcc__actions .fwpcc__btn--main, .fwpcc-modal__foot .fwpcc__btn { flex: 1 1 100%; }
    .fwpcc-modal__head, .fwpcc-modal__body, .fwpcc-modal__foot { padding-left: 16px; padding-right: 16px; }
}

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