/* Affiliate / comparison UI (shortcodes: hemp_compare_*, hemp_sticky_affiliate_cta, hemp_affiliate_disclosure, hemp_directory_cta_strip) */

.hemp-affiliate-disclosure {
	font-size: 0.875rem;
	color: #555;
	margin: 1rem 0;
	padding: 0.75rem 1rem;
	background: #f6f7f7;
	border-left: 4px solid #2271b1;
}

/* Wraps [hemp_compare_table] output — tightens gap under “Feature matrix” headings in block patterns */
.hemp-compare-matrix-wrap {
	display: flow-root;
	margin-block: 0 1.25rem;
}

.hemp-compare-matrix-wrap .hemp-compare-table {
	margin: 0 0 1rem;
}

/*
 * Themes + block themes add block-gap as margin-block-start on * + * (often 1.5–2rem).
 * That sits between “Feature matrix” (heading) and the shortcode block — collapse it here.
 */
.hemp-pattern-comparison > .wp-block-heading + .wp-block-shortcode,
.hemp-pattern-comparison .wp-block-group__inner-container > .wp-block-heading + .wp-block-shortcode {
	margin-block-start: 0 !important;
}

.hemp-pattern-comparison > .wp-block-heading:has(+ .wp-block-shortcode),
.hemp-pattern-comparison .wp-block-group__inner-container > .wp-block-heading:has(+ .wp-block-shortcode) {
	margin-block-end: 0.35rem !important;
}

/* Inner wrapper some themes add between group and blocks */
.hemp-pattern-comparison .wp-block-group__inner-container > .wp-block-heading + .wp-block-shortcode .hemp-compare-matrix-wrap {
	margin-block-start: 0;
}

/* Kill stray &lt;br&gt; inside tbody (wpautop / editor) — they read as huge vertical gaps */
.hemp-compare-table tbody br {
	display: none !important;
}

/* Matrix wrapper is often a direct child of .wp-block-group__inner-container (no shortcode block wrapper) */
.hemp-pattern-comparison-matrix .wp-block-group__inner-container > .hemp-compare-matrix-wrap {
	margin-block: 0 !important;
	margin-inline: 0 !important;
}

/* Whitespace text nodes between h2 and matrix div become anonymous flex items — collapse via font-size trick */
.hemp-pattern-comparison-matrix > .wp-block-group__inner-container {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.35rem;
	row-gap: 0.35rem;
	font-size: 0;
	line-height: 0;
}

.hemp-pattern-comparison-matrix > .wp-block-group__inner-container > .wp-block-heading,
.hemp-pattern-comparison-matrix > .wp-block-group__inner-container > h2.wp-block-heading {
	margin: 0 !important;
	padding: 0;
	font-size: clamp(1.15rem, 2.5vw, 1.35rem);
	line-height: 1.25;
}

.hemp-pattern-comparison-matrix > .wp-block-group__inner-container > .hemp-compare-matrix-wrap {
	font-size: 1rem;
	line-height: normal;
}

.hemp-pattern-comparison-matrix > .wp-block-group__inner-container > .wp-block-shortcode {
	font-size: 1rem;
	line-height: normal;
}

/* Outer matrix group: no extra vertical rhythm from theme */
.hemp-pattern-comparison-matrix.wp-block-group {
	margin-block: 0 !important;
}

.hemp-pattern-comparison-matrix .wp-block-group__inner-container > * + * {
	margin-block-start: 0 !important;
}

.hemp-pattern-comparison-matrix .wp-block-shortcode {
	margin-block: 0 !important;
	min-height: 0;
	padding-block: 0;
}

.hemp-compare-table {
	width: 100%;
	border-collapse: collapse;
	margin: 1rem 0;
	font-size: 0.95rem;
}

.hemp-compare-table th,
.hemp-compare-table td {
	border: 1px solid #c3c4c7;
	padding: 0.5rem 0.75rem;
	text-align: left;
	vertical-align: top;
}

.hemp-compare-table thead th {
	background: #f0f0f1;
	font-weight: 600;
}

.hemp-sticky-affiliate-cta {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99998;
	padding: 0.5rem env(safe-area-inset-right) calc(0.5rem + env(safe-area-inset-bottom)) env(safe-area-inset-left);
	background: rgba(20, 20, 20, 0.92);
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
}

.hemp-sticky-affiliate-cta__inner {
	max-width: 720px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.hemp-sticky-affiliate-cta__label {
	color: #fff;
	font-size: 0.85rem;
	opacity: 0.95;
}

.hemp-sticky-affiliate-cta__btn {
	display: inline-block;
	padding: 0.65rem 1.25rem;
	background: #2271b1;
	color: #fff !important;
	text-decoration: none !important;
	border-radius: 4px;
	font-weight: 600;
	font-size: 0.95rem;
}

.hemp-sticky-affiliate-cta__btn:hover,
.hemp-sticky-affiliate-cta__btn:focus {
	background: #135e96;
	color: #fff !important;
}

/* Reserve space so sticky bar doesn't hide footer CTAs */
body.hemp-has-sticky-cta {
	padding-bottom: 4.5rem;
}

.hemp-directory-cta-strip--shortcode {
	margin: 2rem 0;
	padding: 1.25rem 1.5rem;
	background: #f0f6fc;
	border: 1px solid #c5d9ed;
	border-radius: 6px;
}

.hemp-directory-cta-strip__title {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
}

.hemp-directory-cta-strip__body {
	margin: 0 0 1rem;
	font-size: 0.95rem;
	line-height: 1.5;
}

.hemp-directory-cta-strip__action {
	margin: 0;
}

.hemp-directory-cta-strip__btn {
	display: inline-block;
	padding: 0.55rem 1.1rem;
	background: #2271b1;
	color: #fff !important;
	text-decoration: none !important;
	border-radius: 4px;
	font-weight: 600;
	font-size: 0.95rem;
}

.hemp-directory-cta-strip__btn:hover,
.hemp-directory-cta-strip__btn:focus {
	background: #135e96;
	color: #fff !important;
}

/* [hemp_media_sales_lead_form] — partnerships intake */
.hemp-lead-form--media-sales {
	margin: 2rem 0;
	padding: 1.5rem 1.75rem;
	background: #fafafa;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	max-width: 44rem;
}

.hemp-lead-form--media-sales .hemp-lead-form__title {
	margin-top: 0;
	margin-bottom: 1rem;
	font-size: 1.35rem;
	line-height: 1.25;
}

.hemp-lead-form--media-sales .hemp-lead-form__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.85rem 1.25rem;
	margin-bottom: 0.5rem;
}

.hemp-lead-form--media-sales .hemp-lead-form__row--full {
	grid-column: 1 / -1;
}

.hemp-lead-form--media-sales .hemp-lead-form__row label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
}

.hemp-lead-form--media-sales input,
.hemp-lead-form--media-sales select,
.hemp-lead-form--media-sales textarea {
	width: 100%;
	max-width: 100%;
	margin-top: 0.35rem;
	padding: 0.45rem 0.5rem;
	font-size: 1rem;
	font-weight: 400;
	box-sizing: border-box;
}

.hemp-lead-form--media-sales .hemp-lead-form__row button[type='submit'] {
	margin-top: 0.5rem;
	padding: 0.6rem 1.25rem;
	font-size: 1rem;
	font-weight: 600;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

.hemp-lead-form--media-sales .hemp-lead-form__row button[type='submit']:hover,
.hemp-lead-form--media-sales .hemp-lead-form__row button[type='submit']:focus {
	background: #135e96;
}

@media (max-width: 600px) {
	.hemp-lead-form--media-sales .hemp-lead-form__grid {
		grid-template-columns: 1fr;
	}
}

/* [hemp_ad_unit] — first-party sponsored placements */
.hemp-ad-unit {
	margin: 1rem 0;
	line-height: 0;
}

.hemp-ad-unit__link {
	display: inline-block;
	max-width: 100%;
	line-height: normal;
}

.hemp-ad-unit__img {
	max-width: 100%;
	height: auto;
	display: block;
	border-radius: 4px;
}

.hemp-ad-unit__link--text {
	font-weight: 600;
	text-decoration: none;
	color: #0a4a38;
	border-bottom: 1px solid rgba(10, 74, 56, 0.35);
}

.hemp-ad-unit__link--text:hover,
.hemp-ad-unit__link--text:focus {
	color: #052e22;
	border-bottom-color: #052e22;
}
