/*
 * ExamNeed ad units (Google AdSense). Loaded only when ads are on.
 * Each unit sits in a labelled box that never goes wider than the screen,
 * and disappears if AdSense has no ad to show.
 */
.ad-slot {
	clear: both;
	box-sizing: border-box;
	max-width: 100%;
	min-height: 100px;
	margin: 18px 0;
	padding: 8px 8px 10px;
	overflow: hidden;
	border: 1px solid var(--c-border);
	border-radius: 0;
	background: rgba(127, 127, 127, 0.05);
	text-align: center;
}

.ad-slot.has-label::before {
	content: "Advertisement";
	display: block;
	margin-bottom: 6px;
	color: var(--c-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ad-slot ins.adsbygoogle {
	display: block;
	max-width: 100%;
	min-height: 50px;
}

/* In-article units keep a taller space so the text does not jump */
.ad-slot-top,
.ad-slot-middle,
.ad-slot-bottom {
	min-height: 250px;
}

/* No ad returned: remove the empty box */
.ad-slot:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
	display: none;
}

/* Below the header: same width as the page */
.ad-slot-header {
	width: min(100% - 24px, var(--container));
	margin: 12px auto 0;
}

/* Homepage: full row of the two-column dashboard */
.home-dashboard > .ad-slot {
	grid-column: 1 / -1;
	margin-top: 0;
}

@media (max-width: 600px) {
	body.single .single-article .ad-slot {
		margin-right: 0;
		margin-left: 0;
	}

	.ad-slot-header {
		width: calc(100% - 20px);
	}
}

@media print {
	.ad-slot {
		display: none;
	}
}
