/*
 * Theme Name:   SaplingHabit (Kadence Child)
 * Theme URI:    https://saplinghabit.com
 * Description:  Kadence child theme for SaplingHabit.
 * Author:       SaplingHabit
 * Template:     kadence
 * Version:      1.0.4
 * Text Domain:  saplinghabit-child
 */

/*
 * APPROACH:
 *   1. PHP (functions.php) removes Kadence header/footer actions at the hook level.
 *   2. CSS below is a NUCLEAR FALLBACK in case any markup still renders.
 *   We target both confirmed IDs (#masthead, #colophon) AND all known
 *   Kadence header/footer classes, on ALL our custom templates at once.
 */

/* ── SHARED SELECTOR LIST — applied to ALL our custom templates ── */
/* Using :is() to avoid repeating the body selectors for every property */

/* ── 1. HIDE KADENCE HEADER (all known selectors) ── */
:is(
  body.page-template-templates-page-home-en,
  body.page-template-templates-page-home-zh,
  body.page-template-templates-page-about,
  body.page-template-templates-page-contact,
  body.page-template-templates-page-privacy,
  body.page-template-templates-page-mobile-en,
  body.page-template-templates-page-pricing,
  body.page-template-templates-page-teachers,
  body.page-template-templates-page-affiliate-programme,
  body.page-template-templates-page-cookie,
  body.page-template-templates-page-blog,
  body.page-template-templates-page-download,
  body.post-type-archive-printable,
  body.tax-printable_category,
  body.single-printable
) :is(
  #masthead,
  .site-header,
  .kadence-header,
  header.header,
  .header-wrap,
  .site-top,
  #site-header,
  .kadence-sticky-header,
  .kadence-sticky-header-wrap,
  .kadence-scrolled-header,
  #kadence-sticky-placeholder
) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* ── 2. HIDE KADENCE FOOTER (all known selectors) ── */
:is(
  body.page-template-templates-page-home-en,
  body.page-template-templates-page-home-zh,
  body.page-template-templates-page-about,
  body.page-template-templates-page-contact,
  body.page-template-templates-page-privacy,
  body.page-template-templates-page-mobile-en,
  body.page-template-templates-page-pricing,
  body.page-template-templates-page-teachers,
  body.page-template-templates-page-affiliate-programme,
  body.page-template-templates-page-cookie,
  body.page-template-templates-page-blog,
  body.page-template-templates-page-download,
  body.post-type-archive-printable,
  body.tax-printable_category,
  body.single-printable
) :is(
  #colophon,
  .site-footer,
  .kadence-footer,
  footer.footer,
  .footer-wrap,
  #site-footer,
  .footer-html
) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* ── 3. REMOVE ALL WRAPPER PADDING/CONSTRAINTS ── */
:is(
  body.page-template-templates-page-home-en,
  body.page-template-templates-page-home-zh,
  body.page-template-templates-page-about,
  body.page-template-templates-page-contact,
  body.page-template-templates-page-privacy,
  body.page-template-templates-page-mobile-en,
  body.page-template-templates-page-pricing,
  body.page-template-templates-page-teachers,
  body.page-template-templates-page-affiliate-programme,
  body.page-template-templates-page-cookie,
  body.page-template-templates-page-blog,
  body.page-template-templates-page-download,
  body.post-type-archive-printable,
  body.tax-printable_category,
  body.single-printable
) :is(
  .entry-content,
  .hentry,
  .content-bg,
  #inner-wrap,
  .site-content,
  #content,
  .content-wrap
) {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* ── 4. HIDE PAGE TITLE ── */
:is(
  body.page-template-templates-page-home-en,
  body.page-template-templates-page-home-zh,
  body.page-template-templates-page-about,
  body.page-template-templates-page-contact,
  body.page-template-templates-page-privacy,
  body.page-template-templates-page-mobile-en,
  body.page-template-templates-page-pricing,
  body.page-template-templates-page-teachers,
  body.page-template-templates-page-affiliate-programme,
  body.page-template-templates-page-cookie,
  body.page-template-templates-page-blog,
  body.page-template-templates-page-download,
  body.post-type-archive-printable,
  body.tax-printable_category,
  body.single-printable
) :is(
  .entry-title,
  .entry-header,
  .kadence-page-header,
  .page-hero-section,
  .wp-block-post-title
) {
    display: none !important;
}

/* ── 5. FULL-WIDTH CONTENT ── */
:is(
  body.page-template-templates-page-home-en,
  body.page-template-templates-page-home-zh,
  body.page-template-templates-page-about,
  body.page-template-templates-page-contact,
  body.page-template-templates-page-privacy,
  body.page-template-templates-page-mobile-en,
  body.page-template-templates-page-pricing,
  body.page-template-templates-page-teachers,
  body.page-template-templates-page-affiliate-programme,
  body.page-template-templates-page-cookie,
  body.page-template-templates-page-blog,
  body.page-template-templates-page-download,
  body.post-type-archive-printable,
  body.tax-printable_category,
  body.single-printable
) :is(
  #primary,
  .content-area,
  .container,
  .page-container,
  #page,
  .site
) {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    float: none !important;
    margin: 0 !important;
}

/* ── 6. REMOVE BODY MARGIN (admin bar offset when logged in) ── */
:is(
  body.page-template-templates-page-home-en,
  body.page-template-templates-page-home-zh,
  body.page-template-templates-page-about,
  body.page-template-templates-page-contact,
  body.page-template-templates-page-privacy,
  body.page-template-templates-page-mobile-en,
  body.page-template-templates-page-pricing,
  body.page-template-templates-page-teachers,
  body.page-template-templates-page-affiliate-programme,
  body.page-template-templates-page-cookie,
  body.page-template-templates-page-blog,
  body.page-template-templates-page-download,
  body.post-type-archive-printable,
  body.tax-printable_category,
  body.single-printable
) {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
