/* =========================================================
   Cookie consent banner: self-contained, first-party, no CMP.
   Loaded by index.html, privacy.html, and terms.html.
   Uses the site's design tokens when present (index.html) and
   falls back to the same dark-theme values on other pages.
   ========================================================= */

.cookie-banner {
    /* Use Placetory tokens where they exist; otherwise self-fallback. */
    --cc-bg: var(--bg, #09080F);
    --cc-card: var(--card, #16131F);
    --cc-text: var(--text, #F3F1FA);
    --cc-muted: var(--muted, #B3AECB);
    --cc-purple: var(--purple, #9A6BF0);
    --cc-purple-light: var(--purple-light, #B79BFF);
    --cc-blue: var(--blue, #5B8DEF);
    --cc-grad: var(--grad, linear-gradient(135deg, #9A6BF0, #5B8DEF));
    --cc-font-body: var(--font-body, 'Hanken Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);

    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;

    font-family: var(--cc-font-body);
    color: var(--cc-text);
    background: rgba(9, 8, 15, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);

    padding: 18px 0;

    /* Hidden by default; shown via .is-visible */
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.cookie-banner[hidden] {
    display: none !important;
}

.cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.cookie-banner-text {
    flex: 1 1 320px;
    min-width: 0;
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--cc-text);
}

.cookie-banner-text a {
    color: var(--cc-purple-light);
    text-decoration: underline;
    font-weight: 500;
}

.cookie-banner-text a:hover,
.cookie-banner-text a:focus-visible {
    color: var(--cc-blue);
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex: none;
}

.cookie-banner-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid transparent;
    border-radius: 11px;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.cookie-banner-btn:focus-visible {
    outline: 2px solid var(--cc-purple-light);
    outline-offset: 2px;
}

/* Accept: primary gradient button */
.cookie-banner-btn-accept {
    background: var(--cc-grad);
    color: #fff;
    box-shadow: 0 8px 22px -10px rgba(123, 108, 242, 0.9);
}

.cookie-banner-btn-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -10px rgba(123, 108, 242, 1);
}

/* Reject: equal-prominence ghost button */
.cookie-banner-btn-reject {
    background: transparent;
    color: var(--cc-text);
    border-color: rgba(255, 255, 255, 0.2);
}

.cookie-banner-btn-reject:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.35);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cookie-banner {
        transition: none !important;
    }
    .cookie-banner-btn {
        transition: none !important;
    }
}

/* Narrow viewports */
@media (max-width: 600px) {
    .cookie-banner-inner {
        padding: 0 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

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

    .cookie-banner-actions {
        justify-content: stretch;
        width: 100%;
    }

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

@media (max-width: 380px) {
    .cookie-banner-text {
        font-size: 14px;
    }

    .cookie-banner-btn {
        font-size: 14px;
        padding: 10px 16px;
    }
}
