/* ============================================================
   Cookie consent bottom bar
   Dark navy bar that sits above the page fold on all themes.
   Slides up from the bottom after a short delay.
   ============================================================ */

#cookie-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    /* Dark navy at ~97% opacity — readable on any page theme */
    background: rgba(6, 15, 35, 0.97);
    border-top: 3px solid #0059bb;
    box-shadow: 0 -2px 32px rgba(0, 0, 0, 0.35);
    padding: 0.875rem 1.5rem;
    /* Start off-screen below the viewport */
    transform: translateY(calc(100% + 3px));
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    will-change: transform, opacity;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#cookie-bar.cookie-bar--visible {
    transform: translateY(0);
    opacity: 1;
}

.cookie-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* ── Copy ───────────────────────────────────────────────── */

.cookie-bar-copy {
    flex: 1;
    min-width: 0;
}

.cookie-bar-heading {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #f1f5f9;
    margin: 0 0 0.2rem;
    line-height: 1.3;
}

.cookie-bar-text {
    font-size: 0.8125rem;
    color: rgba(241, 245, 249, 0.65);
    margin: 0;
    line-height: 1.55;
}

.cookie-bar-text a {
    color: #60a5fa;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(96, 165, 250, 0.5);
    transition: color 0.15s ease;
}

.cookie-bar-text a:hover {
    color: #93c5fd;
}

/* ── Actions ────────────────────────────────────────────── */

.cookie-bar-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
}

/* Primary CTA — matches Iron Forge button conventions */
.cookie-btn-accept {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #0059bb;
    color: #fff;
    border: none;
    border-radius: 0.125rem;
    padding: 0.625rem 1.375rem;
    font-family: 'Work Sans', sans-serif;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.1s ease;
    min-height: 40px;
}

.cookie-btn-accept:hover {
    background: #0070ea;
}

.cookie-btn-accept:active {
    transform: scale(0.97);
}

.cookie-btn-accept svg {
    flex-shrink: 0;
}

/* Decline — visually de-emphasised text link, users can still find it */
.cookie-btn-decline {
    background: none;
    border: none;
    color: rgba(241, 245, 249, 0.4);
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0.25rem 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(241, 245, 249, 0.2);
    white-space: nowrap;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
}

.cookie-btn-decline:hover {
    color: rgba(241, 245, 249, 0.65);
    text-decoration-color: rgba(241, 245, 249, 0.4);
}

/* ── Mobile ─────────────────────────────────────────────── */

@media (max-width: 600px) {
    #cookie-bar {
        padding: 1.125rem 1rem 1.375rem;
    }

    .cookie-bar-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.875rem;
    }

    .cookie-bar-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    /* Full-width accept — large tap target on mobile */
    .cookie-btn-accept {
        justify-content: center;
        padding: 0.875rem 1rem;
        font-size: 0.75rem;
        min-height: 48px;
    }

    .cookie-btn-decline {
        justify-content: center;
        padding: 0.5rem 1rem;
        min-height: 44px;
    }
}

/* ── Reduced motion ─────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    #cookie-bar {
        transition: opacity 0.15s ease;
        transform: translateY(0);
    }
}
