/*
 * MPR - Stackable lightbox UI corrections
 *
 * Loaded as a real stylesheet rather than inline CSS on purpose: GLightbox
 * builds its markup in JavaScript at click time, so none of these selectors
 * exist in the server-rendered DOM. WP Rocket's Remove Unused CSS therefore
 * deletes them from any inline block (which is what happened to the same rule
 * in Customizer > Additional CSS). This file is excluded from RUCSS instead.
 */

/* ---------------------------------------------------------------------------
 * 1. Hide the caption strip below the popup.
 *
 * GLightbox writes the trigger image's alt/title into .gslide-title and prints
 * it on the overlay, outside the white content box. Hidden site-wide.
 * ------------------------------------------------------------------------- */
.glightbox-container .gslide-title,
.glightbox-clean .gslide-title,
.glightbox-clean.glightbox-stk .gslide-title {
	display: none !important;
}

/*
 * With the title gone the description wrapper is an empty band that still
 * reserves height, so collapse it — but only when it holds no real description.
 * Written as :not(:has(...)) so browsers without :has() drop the rule entirely
 * and keep any genuine description visible, rather than hiding it silently.
 */
.glightbox-container .gslide-description:not(:has(.gslide-desc:not(:empty))) {
	display: none !important;
}

/* ---------------------------------------------------------------------------
 * 2. Reclaim the wasted vertical space on mobile.
 *
 * Below 769px GLightbox caps .gslide-external at 75vh and the embedded iframe
 * falls back to its 165px min-height, because height:100% resolves against a
 * parent with no definite height. The result is a short content box centred in
 * a 100vh flex container, leaving thick black bands above and below.
 *
 * Setting an explicit height on both the media wrapper and the iframe takes the
 * content from roughly 62% to 92% of the viewport. Scrolling stays with the
 * iframe, which keeps its own overflow.
 * ------------------------------------------------------------------------- */
@media (max-width: 768px) {

	.glightbox-container .ginner-container {
		height: 100vh !important;
		justify-content: center !important;
	}

	.glightbox-container .gslide-media.gslide-external {
		max-height: 92vh !important;
		height: 92vh !important;
	}

	.glightbox-container .gslide-external iframe,
	.glightbox-container .gslide iframe {
		height: 92vh !important;
		min-height: 92vh !important;
		max-height: 92vh !important;
	}

	/* Keep the close control clear of the taller content box. */
	.glightbox-clean .gclose {
		top: 10px !important;
		right: 10px !important;
		z-index: 100000 !important;
	}
}

/* ---------------------------------------------------------------------------
 * 3. Typography consistency for list blocks.
 *
 * Spectra scopes its generated CSS to a per-instance hash class, e.g.
 * `.uagb-block-9f417ab1 .uagb-icon-list__label { ... }` - specificity (0,2,0).
 * The blocks carry no id attribute, so an attribute selector has to key off the
 * class wildcard `[class*="uagb-block-"]` rather than an id prefix. Matching the
 * hash class and the label together gives (0,3,0) plus !important, which
 * outranks anything Spectra can generate per block.
 *
 * Only text-bearing elements are listed. The icon lives in a sibling
 * `.uagb-icon-list__source-wrap > svg`, which is deliberately absent from every
 * selector below: forcing a font-family onto an icon wrapper is what breaks
 * glyph-based icon sets (FontAwesome, Dashicons) into empty boxes.
 *
 * Measured on /best-tree-and-plant-fertilization/: paragraph and label already
 * agreed on font-size (16px), line-height (26.4px) and font-weight (400). The
 * only real divergence was letter-spacing - Spectra set 1px on the label while
 * the theme runs 0.8px. inherit is safe here because the label's parent already
 * carries the theme values, so each property resolves to the paragraph setting
 * rather than to another Spectra value.
 * ------------------------------------------------------------------------- */
.entry-content li,
.stk-block-icon-list li,
.wp-block-stackable-icon-list li,
.stk-block-icon-list-item .stk-block-icon-label__text,
.uagb-icon-list__label,
.uagb-icon-list__wrap .uagb-icon-list__label,
[class*="uagb-block-"] .uagb-icon-list__label,
.wp-block-uagb-icon-list[class*="uagb-block-"] .uagb-icon-list__label,
.wp-block-uagb-icon-list-child[class*="uagb-block-"] .uagb-icon-list__label,
.wp-block-uagb-icon-list[class*="uagb-block-"] .uagb-icon-list__label * {
	font-family: inherit !important;
	font-size: inherit !important;
	line-height: inherit !important;
	letter-spacing: inherit !important;
	font-weight: inherit !important;
}

/* ---------------------------------------------------------------------------
 * 4. Snow Removal page (ID 7187) - PM visual feedback.
 *
 * Kept in this stylesheet rather than Customizer > Additional CSS for the same
 * reason as the rules above: this file is excluded from Remove Unused CSS, so
 * the rules cannot be stripped.
 * ------------------------------------------------------------------------- */

/* Hero disclaimer: framed so it reads as a notice rather than body copy. A
   translucent dark panel with an amber rule stays legible over the hero photo
   in both crops, without competing with the brand green. */
.mpr-hero-notice {
	display: block;
	max-width: 100%;
	margin-top: 18px;
	padding: 14px 20px;
	background: rgba(0, 0, 0, 0.55);
	border-left: 4px solid #e08a1e;
	border-radius: 4px;
}

/* Breathing room between each card title and its paragraph. Scoped to columns
   so the section heading above the grid is not affected. */
.page-id-7187 .stk-block-column h4.wp-block-heading {
	margin-bottom: 18px !important;
}

@media (max-width: 768px) {

	.mpr-hero-notice {
		padding: 12px 16px;
	}

	/* Section heading keeps equal vertical padding, just tighter. */
	.page-id-7187 h4.wp-block-heading[style*="padding-top"] {
		padding-top: 32px !important;
		padding-bottom: 32px !important;
	}

	.page-id-7187 .stk-block-column h4.wp-block-heading {
		margin-bottom: 14px !important;
	}
}
