/* FundiLink — privacy / cookie preference banner */
.cookie-consent {
    --cc-bg: rgba(20, 20, 40, 0.92);
    --cc-fg: #f7f7fb;
    --cc-muted: rgba(247, 247, 251, 0.78);
    --cc-border: rgba(255, 255, 255, 0.1);
    --cc-ghost-bg: transparent;
    --cc-ghost-fg: #f7f7fb;
    --cc-ghost-border: rgba(255, 255, 255, 0.28);

    position: fixed;
    z-index: 11000; /* above site toast (10000) and lightbox (9999) */
    bottom: 1.25rem;
    max-width: min(34rem, calc(100vw - 1.5rem));
    opacity: 0;
    transform: translateY(1rem);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.cookie-consent.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-consent.is-hiding {
    opacity: 0;
    transform: translateY(0.75rem);
    pointer-events: none;
}

.cookie-consent.is-dismissed {
    display: none !important;
}

.cookie-consent--bottom-center {
    left: 50%;
    transform: translate(-50%, 1rem);
}

.cookie-consent--bottom-center.is-visible {
    transform: translate(-50%, 0);
}

.cookie-consent--bottom-center.is-hiding {
    transform: translate(-50%, 0.75rem);
}

.cookie-consent--bottom-left { left: 1rem; }
.cookie-consent--bottom-right { right: 1rem; left: auto; }

.cookie-consent--light {
    --cc-bg: rgba(255, 255, 255, 0.94);
    --cc-fg: #141428;
    --cc-muted: #5a5a72;
    --cc-border: rgba(20, 20, 40, 0.08);
    --cc-ghost-bg: transparent;
    --cc-ghost-fg: #141428;
    --cc-ghost-border: rgba(20, 20, 40, 0.18);
}

.cookie-consent__inner {
    display: grid;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: var(--cc-bg);
    color: var(--cc-fg);
    border: 1px solid var(--cc-border);
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-family: var(--font-family, inherit);
}

.cookie-consent__message {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--cc-muted);
}

.cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    justify-content: flex-end;
}

.cookie-consent__link {
    margin-right: auto;
    color: var(--cc-fg);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.cookie-consent__link:hover,
.cookie-consent__link:focus-visible {
    color: var(--color-primary, #960000);
}

.cookie-consent__btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 650;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cookie-consent__btn:focus-visible {
    outline: 3px solid rgba(var(--color-primary-rgb, 150, 0, 0), 0.35);
    outline-offset: 2px;
}

.cookie-consent__btn--primary {
    background: var(--color-primary, #960000);
    color: #fff;
}

.cookie-consent__btn--primary:hover {
    filter: brightness(1.05);
}

.cookie-consent__btn--ghost {
    background: var(--cc-ghost-bg);
    color: var(--cc-ghost-fg);
    border: 1px solid var(--cc-ghost-border);
}

.cookie-consent__btn--ghost:hover {
    border-color: var(--color-primary, #960000);
    color: var(--color-primary, #960000);
}

@media (max-width: 640px) {
    .cookie-consent {
        left: 0.75rem !important;
        right: 0.75rem !important;
        bottom: 0.75rem;
        max-width: none;
        transform: translateY(1rem);
    }

    .cookie-consent--bottom-center,
    .cookie-consent--bottom-center.is-visible,
    .cookie-consent--bottom-center.is-hiding {
        left: 0.75rem !important;
        transform: none;
    }

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

    .cookie-consent.is-hiding {
        transform: translateY(0.75rem);
    }

    .cookie-consent__actions {
        justify-content: stretch;
    }

    .cookie-consent__link {
        width: 100%;
        margin-right: 0;
    }

    .cookie-consent__btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent {
        transition: none;
    }
}
