/* Cookie banner. Fixed position, so it never pushes the page about. */
.sdd-consent {
    --sdd-bar-h: 0px;
    position: fixed;
    left: 16px;
    bottom: calc(16px + var(--sdd-bar-h) + env(safe-area-inset-bottom, 0px));
    z-index: 250; /* above the sticky bar (200), below the mobile menu (300) and lightbox (400) */
    box-sizing: border-box;
    width: calc(100% - 32px);
    max-width: 420px;
    padding: 16px 18px;
    background: var(--white, #fff);
    color: var(--dark, #1A1A2E);
    border: 2px solid var(--purple-muted, #D4C5E2);
    border-radius: var(--radius-lg, 1rem);
    box-shadow: var(--shadow-xl, 0 16px 50px rgba(59, 21, 96, 0.15));
    font-family: var(--font-body, 'Nunito', sans-serif);
    animation: sdd-consent-in 300ms ease-out both;
}

.sdd-consent[hidden] {
    display: none;
}

.sdd-consent__text {
    margin: 0 0 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--grey-dark, #4A4A68);
}

.sdd-consent__text .fa-paw {
    color: var(--cyan-dark, #00A3B8);
    margin-right: 2px;
}

.sdd-consent__text a {
    color: var(--purple, #6B2FA0);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.sdd-consent__btns {
    display: flex;
    gap: 10px;
}

/* Accept and Reject are deliberately identical: rejecting is as easy as accepting. */
.sdd-consent__btn {
    flex: 1 1 0;
    min-height: 44px;
    margin: 0;
    padding: 10px 16px;
    border: 2px solid var(--purple, #6B2FA0);
    border-radius: var(--radius-full, 9999px);
    background: var(--purple, #6B2FA0);
    color: var(--white, #fff);
    font-family: var(--font-heading, 'Fredoka', sans-serif);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.sdd-consent__btn:hover {
    background: var(--purple-dark, #3B1560);
    border-color: var(--purple-dark, #3B1560);
}

.sdd-consent__btn:focus-visible,
.sdd-consent__text a:focus-visible,
.sdd-cookie-link:focus-visible {
    outline: 3px solid var(--cyan, #00CCE5);
    outline-offset: 2px;
}

/* "Cookie settings" in the footer bottom row, styled like the links beside it. */
.sdd-cookie-link {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.footer-bottom .sdd-cookie-link {
    color: var(--purple-muted, #D4C5E2);
}

.sdd-cookie-link:hover {
    color: var(--cyan, #00CCE5);
}

@media (max-width: 768px) {
    .sdd-consent {
        --sdd-bar-h: 64px; /* fallback; the script measures the real bar */
        left: 10px;
        width: calc(100% - 20px);
        max-width: none;
        bottom: calc(10px + var(--sdd-bar-h) + env(safe-area-inset-bottom, 0px));
        padding: 14px 16px;
    }

    .sdd-consent__text {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
}

@keyframes sdd-consent-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

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