/* ===== COOKIE CONSENT BANNER ===== */

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99980;
    background: #13131a;
    border-top: 1px solid rgba(0, 206, 168, 0.25);
    padding: 18px 24px 20px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.6);
}

#cookie-banner.visible {
    transform: translateY(0);
}

/* ── Struktur ── */

#cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Kopfzeile: Text + Details-Toggle ── */

#cookie-banner-top {
    display: flex;
    align-items: baseline;
    gap: 20px;
    flex-wrap: wrap;
}

#cookie-banner-text {
    flex: 1 1 260px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

#cookie-banner-text a {
    color: #00cea8;
    text-decoration: underline;
    text-decoration-color: rgba(0, 206, 168, 0.45);
    text-underline-offset: 3px;
    transition: color 0.2s, text-decoration-color 0.2s;
}

#cookie-banner-text a:hover {
    color: #00e8bc;
    text-decoration-color: #00e8bc;
}

#cookie-details-toggle {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    flex-shrink: 0;
    background: transparent;
    border: 1px solid rgba(0, 206, 168, 0.35);
    color: #00cea8;
    border-radius: 5px;
    padding: 5px 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    line-height: 1.4;
}

#cookie-details-toggle:hover {
    border-color: #00cea8;
    background: rgba(0, 206, 168, 0.08);
}

/* ── Details-Panel ── */

#cookie-details-panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

#cookie-details-panel.open {
    max-height: 600px;
}

#cookie-categories {
    list-style: none;
    margin: 14px 0 4px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cookie-category {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 14px;
}

.cookie-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.cookie-cat-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
}

.cookie-cat-badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    color: #00cea8;
    border: 1px solid rgba(0, 206, 168, 0.45);
    border-radius: 20px;
    padding: 2px 10px;
    white-space: nowrap;
    margin-left: auto;
}

.cookie-cat-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 8px;
}

.cookie-cat-services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cookie-service-tag {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 4px;
    padding: 2px 8px;
}

/* ── Toggle-Switch ── */

.cookie-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: auto;
}

.cookie-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-track {
    width: 38px;
    height: 22px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 11px;
    position: relative;
    transition: background 0.25s;
    flex-shrink: 0;
}

.cookie-toggle input:checked~.cookie-toggle-track {
    background: #00cea8;
}

.cookie-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.cookie-toggle input:checked~.cookie-toggle-track .cookie-toggle-thumb {
    transform: translateX(16px);
}

.cookie-toggle input:focus-visible~.cookie-toggle-track {
    outline: 2px solid #00cea8;
    outline-offset: 2px;
}

/* ── Buttons ── */

#cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
    justify-content: flex-end;
}

/* Alle drei Buttons: gemeinsame Basis */
#cookie-btn-decline,
#cookie-btn-save,
#cookie-btn-accept {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 9px 20px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
    line-height: 1.4;
}

#cookie-btn-decline:active,
#cookie-btn-save:active,
#cookie-btn-accept:active {
    transform: translateY(0) !important;
}

/* Ablehnen – Ghost */
#cookie-btn-decline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.65);
}

#cookie-btn-decline:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    transform: translateY(-1px);
}

/* Auswahl speichern – Outline teal */
#cookie-btn-save {
    background: transparent;
    border: 1px solid #00cea8;
    color: #00cea8;
    font-weight: 600;
}

#cookie-btn-save:hover {
    background: rgba(0, 206, 168, 0.1);
    transform: translateY(-1px);
}

/* Alle akzeptieren – Solid teal */
#cookie-btn-accept {
    background: #00cea8;
    border: 1px solid #00cea8;
    color: #0d0d0f;
    font-weight: 600;
}

#cookie-btn-accept:hover {
    background: #00e8bc;
    border-color: #00e8bc;
    transform: translateY(-1px);
}

/* ── sr-only (Screenreader-Only) ── */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* ── OpenStreetMap Consent Gate Placeholder ── */

.osm-consent-gate {
    width: 100%;
    height: 100%;
    min-height: 300px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    box-sizing: border-box;
}

.osm-consent-gate svg {
    opacity: 0.4;
}

.osm-consent-gate p {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.osm-consent-gate button {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 9px 22px;
    border-radius: 6px;
    border: 1px solid #00cea8;
    background: transparent;
    color: #00cea8;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.osm-consent-gate button:hover {
    background: rgba(0, 206, 168, 0.12);
}

/* ── Video Modal: Kein-Medien-Consent-Overlay ── */

#video-modal-noconsent {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 32px 24px;
    text-align: center;
    background: #0c1018;
    aspect-ratio: 16 / 9;
}

#video-modal-noconsent p {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    max-width: 360px;
}

#video-modal-noconsent button {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 6px;
    border: 1px solid #D54AD2;
    background: transparent;
    color: #E867EA;
    cursor: pointer;
    transition: background 0.2s;
}

#video-modal-noconsent button:hover {
    background: rgba(213, 74, 210, 0.12);
}

/* ── Responsive ── */

@media (max-width: 700px) {
    #cookie-banner {
        padding: 14px 16px 16px;
    }

    #cookie-details-panel.open {
        max-height: 900px;
    }

    #cookie-categories {
        gap: 8px;
    }

    #cookie-banner-actions {
        justify-content: stretch;
    }

    #cookie-btn-decline,
    #cookie-btn-save,
    #cookie-btn-accept {
        flex: 1;
        text-align: center;
        padding: 10px 12px;
    }
}