/* ============================================================
   Cookie-Consent-Banner — Michi Münzberg
   ============================================================ */

/* Overlay (nur bei Einstellungen-Ansicht) */
.cookie-banner-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}

.cookie-banner-overlay.is-visible {
    display: block;
}

/* Hauptbanner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-bg-dark, #1A2842);
    color: var(--color-text-light, #FAF7F2);
    z-index: 9999;
    padding: 1.5rem 2rem;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.35);
    transform: translateY(100%);
    transition: transform 0.35s ease;
}

.cookie-banner.is-visible {
    transform: translateY(0);
}

.cookie-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    align-items: center;
}

.cookie-banner__text {
    flex: 1;
    min-width: 260px;
}

.cookie-banner__title {
    font-family: var(--font-heading, 'Raleway', sans-serif);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary, #E3AB3D);
    margin: 0 0 0.35rem;
}

.cookie-banner__desc {
    font-size: 0.85rem;
    line-height: 1.55;
    margin: 0;
    opacity: 0.88;
}

.cookie-banner__desc a {
    color: var(--color-primary, #E3AB3D);
    text-decoration: underline;
}

.cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    flex-shrink: 0;
}

.cookie-banner__btn {
    padding: 0.6rem 1.25rem;
    font-family: var(--font-heading, 'Raleway', sans-serif);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    line-height: 1;
}

.cookie-banner__btn--accept {
    background: var(--color-primary, #E3AB3D);
    color: #fff;
    border-color: var(--color-primary, #E3AB3D);
}

.cookie-banner__btn--accept:hover {
    background: var(--color-primary-dark, #C49028);
    border-color: var(--color-primary-dark, #C49028);
}

.cookie-banner__btn--essential {
    background: transparent;
    color: var(--color-text-light, #FAF7F2);
    border-color: rgba(250,247,242,0.4);
}

.cookie-banner__btn--essential:hover {
    border-color: var(--color-text-light, #FAF7F2);
}

.cookie-banner__btn--settings {
    background: transparent;
    color: rgba(250,247,242,0.65);
    border-color: transparent;
    font-weight: 600;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    text-decoration: underline;
    font-size: 0.8rem;
}

.cookie-banner__btn--settings:hover {
    color: var(--color-text-light, #FAF7F2);
}

/* Einstellungen-Modal */
.cookie-settings {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-bg, #FAF7F2);
    color: var(--color-text, #2D2D2D);
    border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
    z-index: 10000;
    max-width: 520px;
    width: calc(100% - 2rem);
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
}

.cookie-settings.is-visible {
    display: block;
}

.cookie-settings__title {
    font-family: var(--font-heading, 'Raleway', sans-serif);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: var(--color-text, #2D2D2D);
}

.cookie-settings__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--color-text, #2D2D2D);
    opacity: 0.5;
    padding: 0.25rem;
    line-height: 1;
}

.cookie-settings__close:hover {
    opacity: 1;
}

.cookie-category {
    border: 1px solid #e0d9cf;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}

.cookie-category__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-category__name {
    font-weight: 700;
    font-size: 0.95rem;
}

.cookie-category__badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    background: #e8f5e9;
    color: #2e7d32;
    white-space: nowrap;
}

.cookie-category__desc {
    font-size: 0.82rem;
    color: #666;
    margin: 0.4rem 0 0;
    line-height: 1.5;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.cookie-toggle input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cookie-toggle__slider {
    display: block;
    width: 42px;
    height: 24px;
    background: #ccc;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.cookie-toggle__slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.cookie-toggle input:checked + .cookie-toggle__slider {
    background: var(--color-primary, #E3AB3D);
}

.cookie-toggle input:checked + .cookie-toggle__slider::after {
    transform: translateX(18px);
}

.cookie-toggle input:disabled + .cookie-toggle__slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-settings__actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.cookie-settings__actions .cookie-banner__btn {
    flex: 1;
    text-align: center;
}

/* Video-Consent-Wrapper */
.video-consent {
    background: var(--color-bg-dark, #1A2842);
    border-radius: 8px;
    padding: 2.5rem 2rem;
    text-align: center;
    margin: 1.5rem 0;
}

.video-consent__icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.video-consent__title {
    font-family: var(--font-heading, 'Raleway', sans-serif);
    font-weight: 700;
    color: var(--color-text-light, #FAF7F2);
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.video-consent__desc {
    color: rgba(250,247,242,0.75);
    font-size: 0.85rem;
    line-height: 1.55;
    margin: 0 auto 1.25rem;
    max-width: 420px;
}

.video-consent__desc a {
    color: var(--color-primary, #E3AB3D);
    text-decoration: underline;
}

/* Einwilligungs-Hinweis (nach Akzeptieren) */
.cookie-revoke {
    text-align: center;
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.5rem;
}

.cookie-revoke a {
    color: inherit;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 1.25rem;
    }

    .cookie-banner__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-banner__actions {
        flex-direction: column;
    }

    .cookie-banner__btn {
        text-align: center;
        width: 100%;
    }

    .cookie-banner__btn--settings {
        text-align: center;
    }
}
