/* ==========================================================================
   Alivion – Cookie-Consent (DSGVO / TTDSG)
   ========================================================================== */

#cookie-consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.25rem 2rem;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(6px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: #f2f2f2;
    font-family: inherit;
}

#cookie-consent-banner[hidden] {
    display: none;
}

.cc-text {
     font-family: 'IBM Plex Sans', sans-serif;
    flex: 1 1 320px;
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 60ch;
}

.cc-text a {
    color: #f2f2f2;
    text-decoration: underline;
}

.cc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.cc-btn {
    font-family: 'Teko', sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 1rem;
    padding: 0.6rem 1.4rem;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    color: #f2f2f2;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.cc-btn:hover,
.cc-btn:focus-visible {
    background: #f2f2f2;
    color: #0a0a0a;
}

.cc-btn-primary {
    background: #f2f2f2;
    color: #0a0a0a;
}

.cc-btn-primary:hover,
.cc-btn-primary:focus-visible {
    background: transparent;
    color: #f2f2f2;
}

/* ---- Einstellungen-Dialog ---- */

#cookie-consent-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 1.5rem;
}

#cookie-consent-modal[hidden] {
    display: none;
}

.cc-modal-box {
    width: 100%;
    max-width: 480px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 1.75rem;
    color: #f2f2f2;
    max-height: 85vh;
    overflow-y: auto;
}

.cc-modal-box h2 {    
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 1.9rem;
    color: eceadd; 
    margin: 0 0 1rem;
}

.cc-category {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cc-category:last-of-type {
    border-bottom: none;
}

.cc-category-info strong {
    display: block;
     font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: eceadd; 
    line-height: 1.4; 
    font-size: 0.95rem;
}

.cc-category-info span {
    display: block;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: eceadd; 
    line-height: 1.4; 
    opacity: 0.75;
    margin-top: 0.2rem;
}

.cc-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 auto;
}

.cc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cc-switch label {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cc-switch label::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #f2f2f2;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.cc-switch input:checked + label {
    background: #4caf7d;
}

.cc-switch input:checked + label::before {
    transform: translateX(18px);
}

.cc-switch input:disabled + label {
    cursor: not-allowed;
    opacity: 0.6;
}

.cc-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

@media (max-width: 560px) {
    #cookie-consent-banner {
        position: fixed;
        inset: 0;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end; /* Drückt die gesamte Gruppe an den unteren Rand */
        gap: 1.5rem;        
        padding: 2rem 1.5rem 4rem 1.5rem; /* 4rem unten, damit es auf iPhones nicht in die Home-Bar rutscht */
        background: rgba(10, 10, 10, 0.286);
        border-top: none;
        text-align: center;
    }

    .cc-text {  
        flex: none; /* DAS IST DER SCHLÜSSEL: Tötet die Desktop-Vererbung und verhindert, dass der Container wächst */
        font-size: 1rem;
        color: #eceadd; 
        line-height: 1.45;
        padding: 0; 
        margin: 0; 
        max-width: 100%;
    }

    .cc-actions {
        flex-direction: column;
        justify-content: stretch;
        width: 100%;
        max-width: 280px;
        gap: 0.6rem;
    }

    .cc-actions .cc-btn {
        flex: 1 1 auto;
        padding: 0.65rem 1rem;       
        font-size: 1rem;
    }
}
