/*
 * Brainflood app consent banner.
 * Mirrors marketing/css/cookie-consent.css so the two domains look like one
 * product, but is written against the app's own theme tokens.
 */

#bf-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;

    /* Starts hidden - JS adds .bf-consent-visible to animate in. */
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;

    background: var(--bg-elevated, rgba(20, 14, 10, 0.97));
    border-top: 1px solid rgba(var(--accent-rgb), 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    padding: 1rem 1.5rem;
    font-family: 'Rubik', system-ui, sans-serif;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

#bf-cookie-banner.bf-consent-visible { transform: translateY(0); opacity: 1; }
#bf-cookie-banner.bf-consent-hiding { transform: translateY(100%); opacity: 0; }

.bf-consent-inner {
    max-width: 72rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
}

@media (min-width: 640px) {
    .bf-consent-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1.5rem;
    }
}

.bf-consent-text { flex: 1; line-height: 1.5; }

.bf-consent-text a {
    color: var(--accent-light, var(--accent));
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bf-consent-actions {
    display: flex;
    gap: 0.625rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.bf-consent-btn {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
    /* WCAG 2.5.5 - comfortable tap target on phones. */
    min-height: 36px;
}

.bf-consent-btn-accept {
    background: var(--accent);
    /* Warm-redesign rule: gold backgrounds carry espresso ink, never white. */
    color: var(--btn-accent-text, #2a1a0d);
    border-color: var(--accent);
}

.bf-consent-btn-accept:hover,
.bf-consent-btn-accept:focus-visible {
    background: var(--accent-light, var(--accent));
    border-color: var(--accent-light, var(--accent));
    outline: none;
}

.bf-consent-btn-reject {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.bf-consent-btn-reject:hover,
.bf-consent-btn-reject:focus-visible {
    color: var(--text-primary);
    border-color: var(--accent);
    outline: none;
}

.bf-consent-btn:focus-visible { box-shadow: 0 0 0 2px var(--accent); }

@media (max-width: 700px), (hover: none) and (pointer: coarse) {
    .bf-consent-btn { min-height: 44px; padding: 0.6rem 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
    #bf-cookie-banner { transition: none; }
}
