/*
 * A BLOCK WITH NOTHING TO SAY TAKES ITS SECTION WITH IT.
 *
 * The News Block and the Events Block each leave a hidden `ota-block-is-empty`
 * marker when their query returns nothing on the front end. This removes the
 * section around it, so the "News" or "Upcoming events" heading widget sitting
 * above the block disappears too rather than titling a hole. An unconfigured
 * interest group is the case that needs it: it has no category, so by design
 * both blocks match nothing.
 *
 * ONE FILE, TWO BLOCKS. This rule lived in ota-news-block.css and again,
 * byte for byte, in ota-events-block.css. Two copies of one rule drift, and
 * this one is load-bearing enough that a drift means a section hidden on one
 * block and not the other. Raised in review on PR #8. Both widgets now declare
 * `ota-block-empty` in `get_style_depends()`, so the rule loads exactly when
 * one of them is on the page and no more often than it did as a duplicate.
 *
 * ONLY THE INNERMOST SECTION. `:has()` matches any ancestor, so the plain
 * selector took out every `.elementor-section` containing the marker, not the
 * one wrapping the empty block. Nest the widget in an Inner Section, which is
 * an ordinary thing to do, and the outer section went with it, taking whatever
 * else it held. `:not(:has(.elementor-section))` keeps the match to the
 * innermost section in the chain, which is the one that actually wraps the
 * block.
 *
 * STILL SCOPED TO GROUP SINGLES. Not because of the nesting, which is handled
 * above, but because elsewhere on the site a section is expected to hold more
 * than one block and hiding it on one block's emptiness would be wrong even
 * when the section is innermost.
 *
 * BOTH ELEMENTOR MARKUPS. `.elementor-section` is the legacy markup the SIG
 * template is built in today; `.e-con` is what flex containers produce, which
 * is what a rebuild or a run through Elementor's section-to-container converter
 * would leave behind. The template lives in the database, so nothing in this
 * repo pins it to one or the other, and a rule that silently matched nothing
 * would bring back the "heading over a hole" this whole scheme exists to stop.
 * Raised in review on PR #8, second round. Each selector excludes its own kind
 * of nesting so the innermost wrapper is still the only match.
 */
.single-interest_group .elementor-section:has(.ota-block-is-empty):not(:has(.elementor-section)) {
	display: none;
}

.single-interest_group .e-con:has(.ota-block-is-empty):not(:has(.e-con)) {
	display: none;
}
