/* Cookie Consent Modal — DSGVO-konform */

.cc-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cc-backdrop.is-visible {
    opacity: 1;
}

.cc-modal {
    position: fixed;
    z-index: 9999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--night);
    border: 1px solid var(--border-dark-2);
    border-radius: 16px;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cc-modal.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.cc-title {
    font-family: var(--v23-font);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 0.75rem;
}

.cc-text {
    font-family: var(--v23-font);
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--muted-light);
    margin: 0 0 1.5rem;
}

.cc-link {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cc-link:hover {
    color: var(--brand-light);
}

.cc-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.cc-btn {
    font-family: var(--v23-font);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
    flex: 1;
    text-align: center;
}

.cc-btn--primary {
    background: var(--brand);
    color: var(--white);
}

.cc-btn--primary:hover {
    background: var(--brand-light);
}

.cc-btn--secondary {
    background: var(--night-3);
    color: var(--light);
    border: 1px solid var(--border-dark-2);
}

.cc-btn--secondary:hover {
    background: var(--slate);
}

.cc-btn--outline {
    background: transparent;
    color: var(--muted-light);
    border: 1px solid var(--border-dark-2);
}

.cc-btn--outline:hover {
    color: var(--light);
    border-color: var(--muted);
}

.cc-legal-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.cc-legal-links .cc-link {
    font-size: 0.75rem;
    color: var(--muted);
}

.cc-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-dark-2);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.cc-category__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cc-category__name {
    font-family: var(--v23-font);
    font-size: 0.9375rem;
    color: var(--white);
}

.cc-category__badge {
    font-family: var(--v23-font);
    font-size: 0.6875rem;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.cc-category__desc {
    font-family: var(--v23-font);
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--muted-light);
    margin: 0 0 0.5rem;
}

.cc-category__cookies {
    font-family: var(--v23-font);
    font-size: 0.75rem;
    color: var(--muted);
}

.cc-category__cookies code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.0625rem 0.375rem;
    border-radius: 3px;
    font-size: 0.6875rem;
}

.cc-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cc-toggle__slider {
    position: absolute;
    inset: 0;
    background: var(--night-3);
    border: 1px solid var(--border-dark-2);
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cc-toggle__slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--muted-light);
    border-radius: 50%;
    transition: transform 0.2s ease, background 0.2s ease;
}

.cc-toggle input:checked + .cc-toggle__slider {
    background: var(--brand);
    border-color: var(--brand);
}

.cc-toggle input:checked + .cc-toggle__slider::before {
    transform: translateX(20px);
    background: var(--white);
}

.cc-legal {
    font-family: var(--v23-font);
    font-size: 0.6875rem;
    color: var(--muted);
    line-height: 1.5;
    margin-top: 0.75rem;
}

.footer-cookie-link {
    cursor: pointer;
}

@media (max-width: 640px) {
    .cc-modal {
        width: 95%;
        padding: 1.25rem;
        border-radius: 12px;
    }

    .cc-actions {
        flex-direction: column;
    }

    .cc-btn {
        width: 100%;
    }

    .cc-legal-links {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}
