/**
 * OnlyPedia — Custom Footer + Cookie Bar
 * Replaces the parent (wikilogy) footer & cookie bar.
 * Uses the --op-* design tokens defined in header-styles.css (theme-aware).
 */

/* ============================================================
   FOOTER
   ============================================================ */
.op-footer{
    background: var(--op-bg-secondary);
    color: var(--op-text-secondary);
    border-top: 1px solid var(--op-border);
    font-family: var(--op-font-body);
    /* No external gap: the footer's own top padding gives the breathing room,
       and its border-top is the divider — the band of page background that
       used to sit above it (the "stacco") is gone. */
    margin-top: 0;
    padding: 56px 20px 30px;
    -webkit-font-smoothing: antialiased;
}
.op-footer__inner{ max-width: 1180px; margin: 0 auto; }

.op-footer__grid{
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 1fr;
    gap: 44px;
}
@media (max-width: 900px){ .op-footer__grid{ grid-template-columns: 1fr 1fr; gap: 34px 28px; } }
@media (max-width: 520px){ .op-footer__grid{ grid-template-columns: 1fr; gap: 30px; } }

/* Brand column */
.op-footer__brand-name{
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--op-text-primary);
    margin: 0 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
}
.op-footer__brand-name .dot{ width: 9px; height: 9px; border-radius: 50%; background: var(--op-accent); }
.op-footer__tagline{
    font-size: 14px;
    line-height: 1.7;
    color: var(--op-text-secondary);
    margin: 0;
    max-width: 42ch;
}

/* Link columns */
.op-footer__col h4{
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--op-text-muted);
    margin: 0 0 14px;
}
.op-footer__col a{
    display: block;
    color: var(--op-text-secondary);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 0;
    transition: color var(--op-transition);
    width: fit-content;
}
.op-footer__col a:hover,
.op-footer__col a:focus-visible{ color: var(--op-accent); }

/* Bottom bar */
.op-footer__bottom{
    margin-top: 46px;
    padding-top: 24px;
    border-top: 1px solid var(--op-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
}
.op-footer__disclaimer{
    margin: 0;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--op-text-muted);
    max-width: 640px;
}
.op-footer__copy{
    margin: 0;
    font-size: 12.5px;
    color: var(--op-text-muted);
    white-space: nowrap;
}

/* ============================================================
   COOKIE BAR
   ============================================================ */
.op-cookiebar{
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 9300;
    max-width: 320px;
    /* Distinct, elevated surface with a blue accent edge so it clearly reads as a
       separate element (not tone-on-tone with the page in either theme). */
    background: #ffffff;
    color: #14102d;
    border: 1px solid rgba(0,0,0,0.10);
    border-left: 3px solid #03aff0;
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(20,16,45,0.22);
    padding: 14px 16px;
    font-family: var(--op-font-body, system-ui, -apple-system, sans-serif);
    animation: opCookieIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-op-theme="dark"] .op-cookiebar{
    background: #211f30;                        /* clearly lifted off the #0d0d14 page */
    color: #f3f3f8;
    border-color: rgba(255,255,255,0.14);
    border-left-color: #03aff0;
    box-shadow: 0 16px 46px rgba(0,0,0,0.6);
}
.op-cookiebar[hidden]{ display: none; }
.op-cookiebar__text{
    font-size: 12.5px;
    line-height: 1.55;
    color: inherit;
    opacity: 0.9;
}
.op-cookiebar__text a{ color: #03aff0; text-decoration: none; font-weight: 600; }
.op-cookiebar__text a:hover{ text-decoration: underline; }
.op-cookiebar__actions{ display: flex; gap: 10px; margin-top: 12px; }
.op-cookiebar__accept{
    background: linear-gradient(135deg, #03aff0, #0362f0);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 8px 22px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.3px;
    font-family: 'Special Gothic Expanded One', var(--op-font-body, sans-serif);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(3,140,240,0.40);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.op-cookiebar__accept:hover{ transform: translateY(-1px); box-shadow: 0 6px 18px rgba(3,140,240,0.5); filter: brightness(1.04); }

/* Keep the cookie bar clear of the mobile bottom tab-bar */
@media (max-width: 768px){
    .op-cookiebar{
        left: 12px;
        right: 12px;
        max-width: none;
        bottom: calc(var(--op-tabbar-h, 68px) + 12px + env(safe-area-inset-bottom, 0px));
    }
}

@keyframes opCookieIn{ from{ opacity: 0; transform: translateY(12px); } to{ opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce){
    .op-cookiebar{ animation: none; }
}
