/*
 * Dr. Bess Global Footer
 * Scope is limited to pages where the Author Engine is not already rendering its own footer.
 */

/* Hide the active theme's footer on standard pages so visitors see one consistent footer. */
body.dbgf-global-footer-page footer:not(.dbae-footer) {
    display: none !important;
}

/* Defensive handling for common block-theme footer wrappers containing the placeholder footer. */
body.dbgf-global-footer-page .wp-block-template-part:has(footer):not(:has(.dbae-footer)) {
    display: none !important;
}

/* Ensure our footer remains visible even if a theme has broad footer rules. */
body.dbgf-global-footer-page footer.dbae-footer.dbgf-global-footer {
    display: block !important;
    width: 100%;
    margin: 0;
}

/* Keep the footer visually attached to the bottom of short-content pages. */
body.dbgf-global-footer-page {
    min-height: 100vh;
}

/* The Author Engine stylesheet supplies the principal footer design.
   These are fallbacks for standard theme pages if a theme tries to override it. */
.dbgf-global-footer {
    position: relative;
    z-index: 2;
}

.dbgf-global-footer a {
    text-underline-offset: 3px;
}

.dbgf-global-footer a:focus-visible {
    outline: 3px solid var(--dbae-accent, #c9a45d);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .dbgf-global-footer * {
        transition: none !important;
    }
}
