/* Cookie consent banner — fixed bottom-of-viewport.
 * Hidden by default; the inline script in server.py removes the
 * `m-cookie-banner-hidden` modifier when no consent cookie is set.
 * All colors come from the theme tokens defined in _theme.css.
 */

#m-cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: 640px;
    margin: 0 auto;
    z-index: 1080; /* above bootstrap navbars (~1030) */
    background: var(--m-surface);
    color: var(--m-text);
    border: 1px solid var(--m-border);
    border-radius: var(--m-r-md, 10px);
    box-shadow: var(--m-shadow-lift, 0 12px 28px rgba(28, 28, 28, 0.08));
    padding: 16px 18px;
    font-family: var(--m-font-sans);
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

#m-cookie-banner.m-cookie-banner-hidden {
    display: none;
}

#m-cookie-banner .m-cookie-text {
    flex: 1 1 260px;
    min-width: 0;
    color: var(--m-text-soft, rgba(28, 28, 28, 0.82));
}

#m-cookie-banner .m-cookie-text strong {
    color: var(--m-text);
    font-weight: 600;
}

#m-cookie-banner .m-cookie-text a {
    color: var(--m-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

#m-cookie-banner .m-cookie-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 0 0 auto;
}

#m-cookie-banner .m-cookie-btn {
    appearance: none;
    border: 1px solid var(--m-border);
    background: var(--m-surface);
    color: var(--m-text);
    padding: 8px 14px;
    border-radius: var(--m-r-sm, 6px);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

#m-cookie-banner .m-cookie-btn:hover {
    border-color: var(--m-border-hover, rgba(28, 28, 28, 0.22));
    background: var(--m-surface-dim, #efece5);
}

#m-cookie-banner .m-cookie-btn-primary {
    background: var(--m-charcoal);
    color: var(--m-text-on-dark, #fcfbf8);
    border-color: var(--m-charcoal);
}

#m-cookie-banner .m-cookie-btn-primary:hover {
    background: var(--m-charcoal-soft, #2a2a2a);
    border-color: var(--m-charcoal-soft, #2a2a2a);
}

@media (max-width: 480px) {
    #m-cookie-banner {
        flex-direction: column;
        align-items: stretch;
    }
    #m-cookie-banner .m-cookie-actions {
        justify-content: flex-end;
    }
}
