/**
 * MSNBC Ads Styling
 */

/* Hide Topbanner when MVPD login popup is present */
body:has(.v2-login-popup-overlay) .msnow-ad-topbanner {
	display: none;
}

@media screen and (max-width: 1023px) {
	.msnow-ad-topbanner,
	.msnow-ad-boxflex {
		display: none;
	}

	.msnow-ad-boxinline {
		display: flex;
	}
}

@media screen and (min-width: 1024px) {
	.msnow-ad-boxinline {
		display: none;
	}

	.msnow-ad-topbanner {
		display: flex;
	}

	.msnow-ad-boxflex {
		display: block;
	}
}

.mps-wrapper {
	position: relative;
	background-color: var(--wp--preset--color--grey-20);
	overflow: hidden;
	z-index: 9999;
}

/* Topbanner Ad */
.msnow-ad-topbanner {
	justify-content: center;
	align-items: center;
	height: 100%;
	width: auto;
	min-height: 90px;
}

/* Boxinline Ad */
.msnow-ad-boxinline {
	justify-content: center;
	margin: 20px -24px !important;
	min-height: 250px;
}

/* Boxflex Ad - Right Rail */
.msnow-ad-boxflex {
	margin: 20px 0;
	min-height: 250px;
}

/* Collapse when empty */
.mps-wrapper:has(> .mps-slot[style*="display: none"]),
.mps-wrapper:has(> .mps-slot[style*="display:none"]),
.mps-wrapper:not(:has(iframe)) {
	min-height: 0;
	margin: 0;
	padding: 0;
}
