/**
 * Front-end advertisement styles.
 *
 * Scoped entirely under .aarush-ad, so nothing here can reach the theme's own
 * layout. No element, class or ID outside this namespace is targeted, and no
 * rule uses !important — theme styles always win on anything shared.
 *
 * @package Aarush_Creation_Ads
 */

.aarush-ad {
	display: block;
	margin: 1.2em auto;
	max-width: 100%;
	line-height: 0; /* Removes the descender gap under a bare <img>. */
	text-align: center;
}

.aarush-ad__label {
	display: block;
	line-height: normal;
	font-size: 0.7em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.6;
	margin-bottom: 0.35em;
	text-align: center;
}

.aarush-ad__link {
	display: inline-block;
	max-width: 100%;
	text-decoration: none;
	border: 0;
}

.aarush-ad__image,
.aarush-ad__video {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	border: 0;
}

/* Text advertisements need the line-height reset above undone. */
.aarush-ad--text {
	line-height: normal;
	text-align: left;
}

.aarush-ad__title {
	display: block;
	font-weight: 700;
	margin-bottom: 0.25em;
}

.aarush-ad__body {
	display: block;
	font-size: 0.95em;
	opacity: 0.9;
}

/* Keep an HTML creative from bleeding out of its container. */
.aarush-ad--html {
	line-height: normal;
	overflow: hidden;
}

.aarush-ad--html img,
.aarush-ad--html video,
.aarush-ad--html table {
	max-width: 100%;
	height: auto;
}

/* 16:9 responsive frame for an embedded player. Padding-top rather than
   aspect-ratio, because the iframe has to keep working in the older browsers
   that a news site's traffic still includes. */
.aarush-ad__embed {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	overflow: hidden;
}

.aarush-ad__embed iframe {
	position: absolute;
	inset: 0;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.aarush-ad__video {
		/* Respect the reader's motion preference: an autoplaying banner is
		   exactly the kind of movement this setting exists to stop. */
		display: none;
	}
}
