/* =========================================================
   Cookie Banner Styles (Rüdinger)
   Alle Regeln sind unter #cookie-banner gekapselt, damit
   globale Seiten-Styles (z. B. .btn, h2, p aus style.css)
   das Banner nicht beeinflussen.
   ========================================================= */

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

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

#cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-height: 90vh;
    overflow-y: auto;
    font-family: var(--regular, -apple-system), 'Segoe UI', Roboto, 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: 1200px;
    margin: 0 auto;
    padding: 30px;
}

/* Überschrift + Text: globale h2/p-Regeln neutralisieren */
#cookie-banner .cookie-header h2 {
    margin: 0 0 10px 0;
    padding: 0;
    font-size: 24px;
    line-height: 1.3;
    color: #1f2937;
    text-align: left;
    font-family: var(--bold, inherit), sans-serif;
    letter-spacing: 0;
    text-transform: none;
    border: none;
    background: none;
    width: auto;
}

#cookie-banner .cookie-header p {
    margin: 0 0 20px 0;
    padding: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    width: auto;
}

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

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

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

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

#cookie-banner .category-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 16px;
    text-align: left;
}

#cookie-banner .category-desc {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
}

/* Toggle Switch — gekapselt, damit .toggle (Burger-Menü) nicht greift */
#cookie-banner .toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

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

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

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

#cookie-banner input:checked + .slider {
    background-color: var(--ruedingerskyBlue, #009fe3);
}

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

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

/* Buttons — überschreibt explizit die globale .btn-Regel aus style.css
   (position: absolute, 35x35px etc.) */
#cookie-banner .cookie-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    position: static;
}

#cookie-banner .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    height: auto;
    min-width: 150px;
    flex: 1 1 auto;
    margin: 0;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--regular, inherit), sans-serif;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    background-image: none;
    box-shadow: none;
    transition: opacity 0.2s ease;
}

#cookie-banner .btn-primary {
    background-color: var(--ruedingerskyBlue, #009fe3);
    color: #ffffff;
}

#cookie-banner .btn-primary:hover {
    background-color: var(--ruedingerskyBlue, #009fe3);
    opacity: 0.85;
    color: #ffffff;
}

#cookie-banner .btn-secondary {
    background-color: #e5e7eb;
    color: #1f2937;
}

#cookie-banner .btn-secondary:hover {
    background-color: #d1d5db;
}

/* Ablehnen: gleichwertig zu "Alle akzeptieren", nur andere Farbe */
#cookie-banner .btn-reject {
    background-color: var(--ruedingerDarkBlue, #021135);
    color: #ffffff;
}

#cookie-banner .btn-reject:hover {
    background-color: var(--ruedingerDarkBlue, #021135);
    opacity: 0.85;
    color: #ffffff;
}

#cookie-banner .btn-text {
    background: transparent;
    background-color: transparent;
    color: #6b7280;
    text-decoration: underline;
    flex: 0 0 auto;
    min-width: auto;
}

#cookie-banner .btn-text:hover {
    color: #1f2937;
}

/* Cookie-Button (unten links, öffnet Einstellungen erneut) */
#cookie-settings-btn {
    position: fixed;
    top: auto;
    bottom: 20px;
    left: 20px;
    right: auto;
    background: #6b7280;
    background-image: none;
    color: white;
    border: none;
    margin: 0;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 999;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

#cookie-banner .privacy-links {
    margin-top: 15px;
    font-size: 13px;
    color: #6b7280;
    text-align: left;
}

#cookie-banner .privacy-links a {
    color: var(--ruedingerskyBlue, #009fe3);
    text-decoration: none;
}

#cookie-banner .privacy-links a:hover {
    text-decoration: underline;
    color: var(--ruedingerDarkBlue, #021135);
}

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