/* =========================================================
   AS ACADEMICS — FINAL ADDITIONAL CSS
   ========================================================= */


/* =========================================================
   1. HIDE KADENCE DEFAULT FOOTER
   ========================================================= */

#colophon,
.site-footer,
.site-footer-wrap,
.site-footer-row-container,
.site-footer-bottom-section,
.site-footer-bottom-section-1,
.footer-html,
.footer-html-inner {
    display:none!important;
}


/* =========================================================
   2. CONTACT PAGE — HIDE DEFAULT WORDPRESS HEADER
   ========================================================= */

body:has(.as-contact-page) > header,
body:has(.as-contact-page) .site-header,
body:has(.as-contact-page) #masthead,
body:has(.as-contact-page) .wp-block-template-part:has(> header) {
    display:none!important;
}


/* Remove space left by default header */

body:has(.as-contact-page) .site-content,
body:has(.as-contact-page) #content,
body:has(.as-contact-page) .content-area,
body:has(.as-contact-page) .content-wrap,
body:has(.as-contact-page) .content-container {
    margin-top:0!important;
    padding-top:0!important;
}


/* =========================================================
   3. BOOKS PAGES — REMOVE DEFAULT WORDPRESS/KADENCE
      HEADER + FOOTER + OUTER SPACING
   ========================================================= */

body.aa-books-page,
body.aa-books-page #page,
body.aa-books-page .site,
body.aa-books-page .site-container,
body.aa-books-page .content-container,
body.aa-books-page .content-wrap,
body.aa-books-page .entry-content-wrap,
body.aa-books-page .site-content,
body.aa-books-page #content,
body.aa-books-page #primary,
body.aa-books-page .content-area,
body.aa-books-page .site-main,
body.aa-books-page article,
body.aa-books-page .entry,
body.aa-books-page .entry-content {
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
}


/* =========================================================
   4. BOOKS — HIDE DEFAULT HEADER
   ========================================================= */

body.aa-books-page .site-header,
body.aa-books-page #masthead,
body.aa-books-page header.site-header,
body.aa-books-page .wp-block-template-part:has(> header),
body.aa-books-page .wp-site-blocks > header {
    display:none!important;
}


/* =========================================================
   5. BOOKS — HIDE DEFAULT FOOTER / KADENCE CREDIT
   ========================================================= */

body.aa-books-page #colophon,
body.aa-books-page .site-footer,
body.aa-books-page .site-footer-wrap,
body.aa-books-page .site-footer-row-container,
body.aa-books-page .site-footer-bottom-section,
body.aa-books-page .site-footer-bottom-section-1,
body.aa-books-page .footer-html,
body.aa-books-page .footer-html-inner,
body.aa-books-page .wp-block-template-part:has(> footer),
body.aa-books-page .wp-site-blocks > footer {
    display:none!important;
}


/* =========================================================
   6. BOOKS — REMOVE THEME CONTENT SPACING
   ========================================================= */

body.aa-books-page .site-content,
body.aa-books-page #content,
body.aa-books-page #primary,
body.aa-books-page .content-area,
body.aa-books-page .site-main {
    margin-top:0!important;
    margin-bottom:0!important;
    padding-top:0!important;
    padding-bottom:0!important;
}


/* =========================================================
   7. BOOKS — CUSTOM HEADER FULL WIDTH
   ========================================================= */

body.aa-books-page .aa-global-header {
    width:100%!important;
    max-width:none!important;
    margin:0!important;
}


/* =========================================================
   8. BOOKS — CUSTOM BOOKS SECTION FULL WIDTH
   ========================================================= */

body.aa-books-page .aa-dynamic-books {
    width:100%!important;
    max-width:none!important;
    margin:0!important;
}


/* =========================================================
   9. BOOKS — CUSTOM FOOTER FULL WIDTH
   ========================================================= */

body.aa-books-page .aa-global-footer {
    width:100%!important;
    max-width:none!important;
    margin:0!important;
}


/* =========================================================
   10. REMOVE JETPACK SHARE / LIKE / RELATED CONTENT
   ========================================================= */

body.aa-books-page .sharedaddy,
body.aa-books-page .sd-sharing-enabled,
body.aa-books-page .jp-relatedposts,
body.aa-books-page .entry-footer,
body.aa-books-page .wp-block-jetpack-sharing-buttons,
body.aa-books-page .wp-block-jetpack-like-buttons {
    display:none!important;
}


/* =========================================================
   11. REMOVE EXTRA BLOCK SPACING
   ========================================================= */

body.aa-books-page .wp-block-group,
body.aa-books-page .wp-block-columns,
body.aa-books-page .wp-block-column {
    margin-top:0!important;
    margin-bottom:0!important;
}


/* =========================================================
   12. TRUE EDGE-TO-EDGE
   ========================================================= */

body.aa-books-page {
    margin:0!important;
    padding:0!important;
    overflow-x:hidden!important;
}

body.aa-books-page #page {
    margin:0!important;
    padding:0!important;
}


/* =========================================================
   13. MOBILE — TRUE EDGE-TO-EDGE
   ========================================================= */

@media(max-width:700px){

    body.aa-books-page,
    body.aa-books-page #page,
    body.aa-books-page .site,
    body.aa-books-page .site-container,
    body.aa-books-page .content-container,
    body.aa-books-page .content-wrap,
    body.aa-books-page .entry-content-wrap,
    body.aa-books-page .site-content,
    body.aa-books-page #content,
    body.aa-books-page #primary,
    body.aa-books-page .content-area,
    body.aa-books-page .site-main,
    body.aa-books-page article,
    body.aa-books-page .entry,
    body.aa-books-page .entry-content {
        width:100%!important;
        max-width:100%!important;
        margin:0!important;
        padding:0!important;
    }


    body.aa-books-page .aa-global-header,
    body.aa-books-page .aa-dynamic-books,
    body.aa-books-page .aa-global-footer {
        width:100vw!important;
        max-width:100vw!important;
        margin-left:0!important;
        margin-right:0!important;
    }


    body.aa-books-page .aa-global-header {
        min-height:82px;
    }
}


/* =========================================================
   14. FINAL BODY SAFETY
   ========================================================= */

body.aa-books-page {
    overflow-x:hidden!important;
}