/* ==========================================================================
   Cookie Consent — FuchsAndFriends
   Defensiv geschrieben: die globale style.css/form.css der Seite hat sehr
   aggressive Regeln (h2 7rem/uppercase, p centered/bold, .btn position:absolute
   50x50, button pink/rund). Deshalb setzen wir hier alles bewusst zurück und
   scopen streng unter #cookie-banner / #cookie-settings-btn.
   ========================================================================== */

#cookie-banner-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99980;
}

#cookie-banner-overlay.show {
    display: block;
}

#cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 99981;
    max-height: 90vh;
    overflow-y: auto;
    font-family: "KH Teka", -apple-system, BlinkMacSystemFont, sans-serif;
}

#cookie-banner.show {
    display: block;
    animation: cookieSlideUp 0.3s ease;
}

@keyframes cookieSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

#cookie-banner .cookie-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px;
    text-align: left;
}

/* Überschrift — gegen globales h2 (7rem, uppercase, centered, width:100%) */
#cookie-banner .cookie-header h2 {
    margin: 0 0 10px 0;
    padding: 0;
    font-family: "KH Teka", sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
    text-transform: none;
    text-align: left;
    width: auto;
    color: #111;
}

/* Fließtext — gegen globales p (centered, bold, acumin) */
#cookie-banner p {
    margin: 0 0 20px 0;
    padding: 0;
    font-family: "KH Teka", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    text-align: left;
    color: #575a70;
}

/* Kategorien */
#cookie-banner #cookie-categories {
    display: none;
    margin: 20px 0;
}

#cookie-banner #cookie-categories.show {
    display: block;
}

#cookie-banner .cookie-category {
    background: #f5f5f5;
    border: 1px solid #efefef;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

#cookie-banner .category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

#cookie-banner .category-title {
    font-family: "KH Teka", sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #111;
}

#cookie-banner .category-desc {
    font-family: "KH Teka", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    color: #575a70;
}

/* Toggle Switch */
#cookie-banner .toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    flex: 0 0 auto;
    margin: 0;
}

#cookie-banner .toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    position: absolute;
}

#cookie-banner .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: 0.3s;
}

#cookie-banner .slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

#cookie-banner input:checked + .slider {
    background-color: var(--fuchsPink, rgb(240, 4, 127));
}

#cookie-banner input:checked + .slider::before {
    transform: translateX(24px);
}

#cookie-banner input:disabled + .slider {
    background-color: #10b981;
    cursor: not-allowed;
}

/* Buttons — harte Resets gegen .btn (position:absolute 50x50) und button (pink/rund) */
#cookie-banner .cookie-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: stretch;
}

#cookie-banner button.btn {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    min-width: 150px;
    margin: 0;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-family: "KH Teka", sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    flex: 1 1 auto;
    opacity: 1;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

#cookie-banner button.btn.btn-primary {
    background: var(--fuchsPink, rgb(240, 4, 127));
    color: #fff;
}

#cookie-banner button.btn.btn-primary:hover {
    opacity: 0.9;
    background: var(--fuchsPink, rgb(240, 4, 127));
}

/* "Auswahl speichern" volle Breite innerhalb der Kategorien */
#cookie-banner #cookie-categories #save-preferences {
    width: 100%;
    flex: none;
    margin-top: 4px;
}

/* Ablehnen: gleichwertig groß, andere Farbe */
#cookie-banner button.btn.btn-reject {
    background: #111;
    color: #fff;
}

#cookie-banner button.btn.btn-reject:hover {
    opacity: 1;
    background: #333;
}

/* Einstellungen anpassen: als Textlink */
#cookie-banner button.btn.btn-text {
    background: transparent;
    color: #575a70;
    text-decoration: underline;
    flex: 0 0 auto;
    min-width: auto;
}

#cookie-banner button.btn.btn-text:hover {
    opacity: 1;
    background: transparent;
    color: #111;
}

#cookie-banner .privacy-links {
    margin-top: 15px;
    font-size: 13px;
    text-align: left;
    color: #575a70;
    font-family: "KH Teka", sans-serif;
}

#cookie-banner .privacy-links a {
    color: var(--fuchsPink, rgb(240, 4, 127));
    text-decoration: none;
}

#cookie-banner .privacy-links a:hover {
    text-decoration: underline;
}

/* Wieder-öffnen-Button (🍪) — gegen globales button (pink/rund/padding) */
#cookie-settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    padding: 0;
    display: grid;
    place-items: center;
    background: #575a70;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 99979;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

#cookie-settings-btn:hover {
    opacity: 1;
    background: #575a70;
}

@media (max-width: 768px) {
    #cookie-banner .cookie-content {
        padding: 20px;
    }
    #cookie-banner .cookie-actions {
        flex-direction: column;
    }
    #cookie-banner button.btn {
        width: 100%;
        min-width: 0;
    }
}
