/* ============================================================
   Cookie Consent Banner · Clementine Media
   DSGVO-konform · integriert mit Google Consent Mode v2
   ============================================================ */

.clem-cc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 17, 22, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.clem-cc-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.clem-cc {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 940px;
    margin: 0 auto;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 30px 80px -20px rgba(0, 42, 60, 0.45),
                0 0 0 1px rgba(0, 42, 60, 0.06);
    z-index: 9999;
    font-family: 'Red Hat Text', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1f2a30;
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    overflow: hidden;
}
.clem-cc.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.clem-cc__main {
    padding: 26px 30px 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
}

.clem-cc__text strong {
    display: block;
    font-family: 'Red Hat Display', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #002a3c;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}
.clem-cc__text p {
    font-size: 14px;
    line-height: 1.55;
    color: #475569;
    margin: 0;
}
.clem-cc__text a {
    color: #e07d0a;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.clem-cc__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.clem-cc__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    font-family: 'Red Hat Display', sans-serif;
    font-size: 14px;
    font-weight: 700;
    border-radius: 100px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.clem-cc__btn--primary {
    background: #f79520;
    color: #fff;
    box-shadow: 0 8px 20px -8px rgba(247, 149, 32, 0.55);
}
.clem-cc__btn--primary:hover {
    background: #e07d0a;
    transform: translateY(-2px);
}
.clem-cc__btn--secondary {
    background: transparent;
    color: #002a3c;
    border-color: rgba(0, 42, 60, 0.15);
}
.clem-cc__btn--secondary:hover {
    border-color: #002a3c;
    background: rgba(0, 42, 60, 0.03);
}
.clem-cc__btn--ghost {
    background: transparent;
    color: #475569;
    padding: 12px 16px;
}
.clem-cc__btn--ghost:hover {
    color: #002a3c;
}

/* Settings panel */
.clem-cc__settings {
    border-top: 1px solid rgba(0, 42, 60, 0.08);
    padding: 24px 30px 26px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.4s ease;
}
.clem-cc.is-expanded .clem-cc__settings {
    max-height: 700px;
    opacity: 1;
}

.clem-cc__settings-title {
    font-family: 'Red Hat Display', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #002a3c;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.clem-cc__categories {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
}

.clem-cc__cat {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    padding: 16px 18px;
    background: #fafafa;
    border-radius: 14px;
    border: 1px solid rgba(0, 42, 60, 0.06);
    align-items: center;
}

.clem-cc__cat-info strong {
    display: block;
    font-family: 'Red Hat Display', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #002a3c;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}
.clem-cc__cat-info p {
    font-size: 13px;
    line-height: 1.5;
    color: #475569;
    margin: 0;
}
.clem-cc__cat-info code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    background: rgba(0, 42, 60, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: #475569;
}

/* Toggle */
.clem-cc__toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.clem-cc__toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.clem-cc__toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(0, 42, 60, 0.2);
    border-radius: 24px;
    transition: background 0.2s ease;
}
.clem-cc__toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.clem-cc__toggle input:checked + .clem-cc__toggle-slider {
    background: #f79520;
}
.clem-cc__toggle input:checked + .clem-cc__toggle-slider::before {
    transform: translateX(20px);
}
.clem-cc__toggle input:disabled + .clem-cc__toggle-slider {
    background: rgba(0, 42, 60, 0.35);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Tiny "manage cookies" reopen button (after consent) */
.clem-cc-reopen {
    position: fixed;
    bottom: 18px;
    left: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(0, 42, 60, 0.1);
    box-shadow: 0 8px 24px -8px rgba(0, 42, 60, 0.25);
    cursor: pointer;
    z-index: 9990;
    display: none;
    align-items: center;
    justify-content: center;
    color: #002a3c;
    transition: all 0.2s ease;
}
.clem-cc-reopen.is-visible { display: inline-flex; }
.clem-cc-reopen:hover {
    background: #f79520;
    color: #fff;
    border-color: #f79520;
    transform: translateY(-2px);
}
.clem-cc-reopen svg { width: 20px; height: 20px; }

/* Responsive */
@media (max-width: 720px) {
    .clem-cc { left: 12px; right: 12px; bottom: 12px; border-radius: 18px; }
    .clem-cc__main { grid-template-columns: 1fr; padding: 22px 22px 18px; gap: 18px; }
    .clem-cc__actions { width: 100%; flex-direction: column-reverse; gap: 8px; }
    .clem-cc__btn { width: 100%; }
    .clem-cc__settings { padding: 20px 22px 22px; }
    .clem-cc__cat { grid-template-columns: 1fr; gap: 12px; }
    .clem-cc__cat .clem-cc__toggle { justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
    .clem-cc, .clem-cc-overlay, .clem-cc__settings, .clem-cc__toggle-slider, .clem-cc__toggle-slider::before {
        transition-duration: 0.01ms !important;
    }
}
