/** Advertising geometry and device eligibility. */

.hna-ad {
	--hna-ad-height: 250px;
	box-sizing: border-box;
	min-height: calc(var(--hna-ad-height) + 24px);
	margin: 24px 0;
	max-width: 100%;
	text-align: center;
}

.hna-ad--header,
.hna-ad--footer {
	--hna-ad-height: 100px;
}

.hna-ad--before-content,
.hna-ad--in-content,
.hna-ad--after-content,
.hna-ad--sidebar {
	--hna-ad-height: 250px;
}

.hna-ad--mobile-anchor {
	--hna-ad-height: 50px;
	position: fixed;
	inset-block-end: 0;
	inset-inline: 24px;
	z-index: 99;
	margin: 24px 0;
	background: var(--wp--preset--color--background);
	border: 1px solid var(--wp--preset--color--border);
}

.hna-ad__label {
	min-height: 24px;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 24px;
}

.hna-ad__content {
	min-height: var(--hna-ad-height);
	width: 100%;
}

.hna-ad__content > .adsbygoogle {
	display: block;
	width: 100%;
	height: var(--hna-ad-height);
}

.hna-ad[hidden],
.hna-product-card .hna-ad,
.hna-affiliate-disclosure .hna-ad,
.wp-block-buttons .hna-ad,
.hna-product-card + .hna-ad,
.wp-block-buttons + .hna-ad,
.hna-ad:has(+ .hna-product-card),
.hna-ad:has(+ .wp-block-buttons) {
	display: none !important;
}

.hna-ad-editor {
	border: 1px dashed var(--wp--preset--color--primary);
	border-radius: 0.375rem;
	padding: var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--text);
	background: var(--wp--preset--color--background);
	text-align: center;
}

@media (max-width: 781px) {
	.hna-ad[data-hna-device="desktop"] {
		display: none !important;
	}

	body:has(.hna-ad--mobile-anchor:not([hidden])) {
		padding-block-end: 122px;
	}
}

@media (min-width: 782px) {
	.hna-ad[data-hna-device="mobile"],
	.hna-ad--mobile-anchor {
		display: none !important;
	}
}
