/* =========================================
   FluentCommunity shell page fixes
   Scoped only to pages with:
   body.fc-community-shell-active
   ========================================= */

/* Base page background (white so no blue strip shows through) */
body.fc-community-shell-active,
body.fc-community-shell-active .site,
body.fc-community-shell-active .site-content,
body.fc-community-shell-active .ast-container,
body.fc-community-shell-active #primary,
body.fc-community-shell-active .content-area,
body.fc-community-shell-active .content-area.primary,
body.fc-community-shell-active #main,
body.fc-community-shell-active .site-main,
body.fc-community-shell-active article,
body.fc-community-shell-active .entry-content,
body.fc-community-shell-active .entry-content.clear {
  background: #fff !important;
}

/* Remove Astra width constraints and spacing */
body.fc-community-shell-active .ast-container {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.fc-community-shell-active #primary,
body.fc-community-shell-active .content-area,
body.fc-community-shell-active .content-area.primary,
body.fc-community-shell-active #main,
body.fc-community-shell-active .site-main,
body.fc-community-shell-active article,
body.fc-community-shell-active .entry-content,
body.fc-community-shell-active .entry-content.clear {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Remove empty WP title/header spacing */
body.fc-community-shell-active .entry-header,
body.fc-community-shell-active .entry-header.ast-header-without-markup {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

/* =========================================
   HIDE ASTRA HEADER + FOOTER ON SINGLE BADGES POSTS
   ========================================= */
body.single-badges .ast-above-header-wrap,
body.single-badges .ast-primary-header-bar,
body.single-badges .ast-mobile-header-wrap,
body.single-badges .site-header {
  display: none !important;
}

body.single-badges .ast-builder-footer,
body.single-badges footer.site-footer {
  display: none !important;
}

/* Remove leftover spacing after hiding header/footer */
body.single-badges .site-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* If any Astra header row still renders, force it white */
body.fc-community-shell-active .site-header,
body.fc-community-shell-active .ast-above-header-wrap,
body.fc-community-shell-active .ast-above-header-bar,
body.fc-community-shell-active .ast-primary-header-bar,
body.fc-community-shell-active .main-header-bar,
body.fc-community-shell-active .ast-builder-grid-row-container,
body.fc-community-shell-active .site-header-section,
body.fc-community-shell-active .ast-builder-grid-row,
body.fc-community-shell-active .ast-builder-menu-1,
body.fc-community-shell-active .ast-builder-menu-2 {
  background: #fff !important;
  background-image: none !important;
}

/* Safety for header borders/shadows */
body.fc-community-shell-active .site-header {
  border-top: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

/* Hide WP admin bar too (only if you want it hidden while logged in)
   Remove this block if you want to keep the admin bar visible */
body.single-badges #wpadminbar {
  display: none !important;
}
/* Fallback style if Elementor Single template is not found */
body.fc-community-shell-active .fc-single-fallback {
  max-width: 960px;
  margin: 24px auto;
  background: #fff;
  padding: 24px;
  border-radius: 12px;
}
/* Hide Astra header on FC shell templates (including FluentCommunity Frame pages) */
body.fc-community-shell-active .ast-above-header-wrap,
body.fc-community-shell-active .ast-primary-header-bar,
body.fc-community-shell-active .ast-mobile-header-wrap,
body.fc-community-shell-active .site-header {
  display: none !important;
}

/* Remove top spacing left by hidden Astra header */
body.fc-community-shell-active .site-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}


/* Respect WP admin bar offset only on sticky/fixed FluentCommunity bars */
body.admin-bar.fc-community-shell-active {
  --fc-adminbar-offset: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar.fc-community-shell-active {
    --fc-adminbar-offset: 46px;
  }
}

body.admin-bar.fc-community-shell-active [class*="fluent-community"] [class*="header"][class*="sticky"],
body.admin-bar.fc-community-shell-active [class*="fluent-community"] [class*="topbar"][class*="sticky"],
body.admin-bar.fc-community-shell-active [class*="fluent-community"] [class*="navbar"][class*="sticky"],
body.admin-bar.fc-community-shell-active [class*="fluent-community"] [class*="header"][class*="fixed"],
body.admin-bar.fc-community-shell-active [class*="fluent-community"] [class*="topbar"][class*="fixed"],
body.admin-bar.fc-community-shell-active [class*="fluent-community"] [class*="navbar"][class*="fixed"],
body.admin-bar.fc-community-shell-active [class*="fluent-community"] .is-sticky,
body.admin-bar.fc-community-shell-active [class*="fluent-community"] .sticky,
body.admin-bar.fc-community-shell-active [class*="fluent-community"] .is-fixed,
body.admin-bar.fc-community-shell-active [class*="fluent-community"] .fixed {
  top: var(--fc-adminbar-offset) !important;
}