/* cookie-consent.css – DSGVO/TTDSG-konformer Cookie-Banner im Luminaz-Design */

.cc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 26, 29, 0.45);
    z-index: 99998;
    display: none;
}
.cc-overlay.cc-visible { display: block; }

/* Banner */
.cc-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 99999;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.12);
    padding: 1.4rem 1.5rem;
    font-family: 'Inter', sans-serif;
    color: #2c3e50;
    transform: translateY(110%);
    transition: transform 0.35s ease;
}
.cc-banner.cc-visible { transform: translateY(0); }

.cc-banner-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2rem;
}
.cc-banner-text {
    flex: 1 1 420px;
    font-size: 13.5px;
    line-height: 1.6;
    margin: 0;
}
.cc-banner-text a { color: #2fc9b4; text-decoration: underline; font-weight: 600; }

.cc-banner-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    flex: 0 0 auto;
}

.cc-btn {
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    padding: 0.65rem 1.3rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.cc-btn-primary { background: #2fc9b4; color: #fff; }
.cc-btn-primary:hover { background: #26a894; }
.cc-btn-secondary { background: #2c3e50; color: #fff; }
.cc-btn-secondary:hover { background: #1a252f; }
.cc-btn-ghost { background: transparent; color: #2c3e50; border: 1px solid #d0d0d0; }
.cc-btn-ghost:hover { background: #f1f1f1; }

/* Settings modal */
.cc-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    width: min(560px, 92vw);
    max-height: 85vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    z-index: 100000;
    font-family: 'Inter', sans-serif;
    color: #2c3e50;
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.cc-modal.cc-visible { display: block; opacity: 1; transform: translate(-50%, -50%) scale(1); }

.cc-modal-header {
    padding: 1.4rem 1.6rem 1rem;
    border-bottom: 1px solid #eee;
}
.cc-modal-header h2 { margin: 0; font-size: 1.2rem; font-weight: 700; }
.cc-modal-header p { margin: 0.4rem 0 0; font-size: 12.5px; color: #6c757d; }

.cc-modal-body { padding: 1rem 1.6rem; }

.cc-category {
    padding: 0.9rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.cc-category:last-child { border-bottom: none; }
.cc-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.cc-category-head strong { font-size: 13.5px; }
.cc-category-desc { font-size: 12px; color: #6c757d; margin: 0.35rem 0 0; line-height: 1.5; }
.cc-category-meta { font-size: 11px; color: #9aa3ab; margin: 0.35rem 0 0; }

/* Toggle switch */
.cc-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 24px;
    flex: 0 0 auto;
    padding: 10px; /* vergrößert die Antipp-Fläche, ohne die Optik zu verändern */
    margin: -10px;
    -webkit-tap-highlight-color: transparent;
}
.cc-switch input { opacity: 0; width: 0; height: 0; }
.cc-slider {
    position: absolute;
    top: 10px; left: 10px;
    width: 42px; height: 24px;
    background: #ccc;
    border-radius: 24px;
    cursor: pointer;
    transition: 0.2s;
}
.cc-slider::before {
    content: "";
    position: absolute;
    height: 18px; width: 18px;
    left: 3px; top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}
.cc-switch input:checked + .cc-slider { background: #2fc9b4; }
.cc-switch input:checked + .cc-slider::before { transform: translateX(18px); }
.cc-switch input:disabled + .cc-slider { background: #b7ded7; cursor: not-allowed; }

.cc-modal-footer {
    padding: 1rem 1.6rem 1.4rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
    border-top: 1px solid #eee;
}

/* Floating re-open button – bewusst komplett deaktiviert/ausgeblendet.
   Einstellungen bleiben über den Link "Cookie-Einstellungen" in der
   Datenschutzerklärung bzw. auf cookies.php erreichbar (CookieConsent.openSettings()). */
.cc-reopen-btn,
.cc-reopen-btn.cc-visible {
    display: none !important;
}

@media (max-width: 640px) {
    .cc-banner {
        padding: 1.1rem 1rem calc(1.1rem + env(safe-area-inset-bottom));
    }
    .cc-banner-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.9rem;
    }
    .cc-banner-text { font-size: 13px; flex-basis: auto; }
    .cc-banner-actions {
        justify-content: stretch;
        flex-direction: column;
        gap: 0.5rem;
    }
    /* Reihenfolge auf dem Handy: erst akzeptieren, dann Einstellungen, dann ablehnen –
       gleich große, gut antippbare Buttons statt einer engen Button-Reihe */
    .cc-banner-actions { display: flex; }
    .cc-banner-actions [data-cc-action="accept-all"] { order: 1; }
    .cc-banner-actions [data-cc-action="settings"] { order: 2; }
    .cc-banner-actions [data-cc-action="reject"] { order: 3; }
    .cc-btn {
        width: 100%;
        padding: 0.8rem 1rem;
        font-size: 14px;
    }

    /* Einstellungen-Modal wird auf dem Handy zum Bottom-Sheet: leichter mit dem
       Daumen erreichbar, kein "schwebendes Kästchen" in der Bildschirmmitte */
    .cc-modal {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        max-height: 88dvh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        transition: transform 0.28s ease;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .cc-modal.cc-visible { transform: translateY(0); }

    .cc-modal-header { padding: 1.2rem 1.2rem 0.9rem; }
    .cc-modal-header h2 { font-size: 1.1rem; }
    .cc-modal-body { padding: 0.8rem 1.2rem; }
    .cc-modal-footer {
        padding: 0.9rem 1.2rem calc(0.9rem + env(safe-area-inset-bottom));
        flex-direction: column-reverse;
        gap: 0.5rem;
    }
    .cc-modal-footer .cc-btn { width: 100%; }

    .cc-category-head strong { font-size: 14px; }
    .cc-category-desc { font-size: 12.5px; }

    /* Reopen-Button etwas kleiner und über den unteren Sicherheitsbereich (iPhone Home-Bar) gehoben */
    .cc-reopen-btn {
        left: 14px;
        bottom: calc(14px + env(safe-area-inset-bottom));
        width: 46px;
        height: 46px;
        font-size: 19px;
    }
}

@media (max-width: 380px) {
    .cc-banner-text { font-size: 12.5px; }
    .cc-btn { font-size: 13.5px; padding: 0.75rem 0.9rem; }
}