/**
 * HD CLC — Global cleanup of stray theme decorations on plugin pages.
 * Enqueued only on pages containing HD CLC components.
 */

/* Scope: any page that contains our shortcode roots */
body:has(.hdclc-catalog) .entry-content > .row > .col:empty,
body:has(.hdclc-home) .entry-content > .row > .col:empty,
body:has(.hdclc-about) .entry-content > .row > .col:empty,
body:has(.hdclc-contact-page) .entry-content > .row > .col:empty,
body:has(.hdclc-catalog) .page-content > .row > .col:empty,
body:has(.hdclc-home) .page-content > .row > .col:empty {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

/* Empty buttons / icon boxes that appear as gray squares */
body:has(.hdclc-catalog) .entry-content > button:empty,
body:has(.hdclc-catalog) .entry-content > a.button:empty,
body:has(.hdclc-catalog) .entry-content > .button:empty,
body:has(.hdclc-home) .entry-content > button:empty,
body:has(.hdclc-about) .entry-content > button:empty,
body:has(.hdclc-contact-page) .entry-content > button:empty {
  display: none !important;
}

/* Flatsome checkbox / toggle ghosts sometimes render as 18–28px gray squares */
body:has(.hdclc-catalog) .entry-content > span[class=""]:empty,
body:has(.hdclc-catalog) .entry-content > div[class=""]:empty,
body:has(.hdclc-catalog) .entry-content > i:empty,
body:has(.hdclc-home) .entry-content > i:empty {
  display: none !important;
}

/* Kill leftover WP block empty button wrappers */
.wp-block-button:empty,
.wp-block-buttons:empty,
.wp-block-button__link:empty {
  display: none !important;
}

/* Tiny fixed-size squares without text (18–40px) sitting above catalog */
body:has(.hdclc-catalog) .entry-content > span:not([class*="hdclc"]):not(:has(*)),
body:has(.hdclc-catalog) .entry-content > div:not([class*="hdclc"]):not([id]):not(:has(*)) {
  /* only hide if they look like decorative chips — handled by JS for safety */
}

/* Ensure plugin roots don't inherit list-style square bullets as boxes */
.hdclc-catalog,
.hdclc-home,
.hdclc-about,
.hdclc-contact-page {
  list-style: none !important;
}

.hdclc-catalog li::marker,
.hdclc-home li::marker,
.hdclc-about li::marker {
  color: inherit;
}
