/*
 * A small drawing of a page with an ad in its place, for the partner portal and the
 * partner program page (bud_partner_placement_mock() in inc/partner-portal.php).
 * Self-contained colours, so it reads the same on light and dark pages.
 */

.bud-mock {
	overflow: hidden;
	border: 1px solid #2a302c;
	border-radius: 12px;
	background: #0d0f0e;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.bud-mock-bar {
	display: flex;
	gap: 0.3rem;
	padding: 0.5rem 0.65rem;
	border-bottom: 1px solid #2a302c;
	background: #141815;
}

.bud-mock-bar i {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: #39413b;
}

.bud-mock-page {
	display: grid;
	gap: 1rem;
	padding: 1rem;
}

.bud-mock.is-rectangle .bud-mock-page {
	grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
}

.bud-mock-main,
.bud-mock-rail {
	display: grid;
	align-content: start;
	gap: 0.45rem;
	min-width: 0;
}

.bud-mock b {
	display: block;
	height: 0.45rem;
	border-radius: 3px;
	background: #262c28;
}

.bud-mock b.is-title {
	width: 65%;
	height: 0.9rem;
	margin-bottom: 0.3rem;
	background: #3a423c;
}

.bud-mock b.is-short {
	width: 60%;
}

.bud-mock-ad {
	display: grid;
	justify-items: center;
	gap: 0.25rem;
	margin-block: 0.4rem;
	padding: 0.4rem;
	border: 1.5px dashed #3ef06e;
	border-radius: 6px;
}

.bud-mock-ad small {
	font-size: 0.55rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #8f998f;
}

.bud-mock-ad img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	border-radius: 3px;
}

.bud-mock-empty {
	display: grid;
	place-items: center;
	width: 100%;
	border-radius: 3px;
	background: rgba(62, 240, 110, 0.12);
	font-size: 0.75rem;
	font-weight: 700;
	color: #3ef06e;
}

.bud-mock.is-rectangle .bud-mock-empty {
	aspect-ratio: 300 / 250;
}

.bud-mock.is-banner .bud-mock-empty {
	aspect-ratio: 728 / 90;
}

/* On a phone the sidebar sits under the article, as it does on the site, so the ad keeps a readable size. */
@media (max-width: 560px) {
	.bud-mock.is-rectangle .bud-mock-page {
		grid-template-columns: minmax(0, 1fr);
	}

	.bud-mock.is-rectangle .bud-mock-ad {
		width: min(100%, 300px);
		justify-self: center;
	}
}

/* Every size beside content draws like the rectangle, every size between sections like the banner. */
.bud-mock.is-rail .bud-mock-page {
	grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
}

.bud-mock.is-small .bud-mock-empty { aspect-ratio: 300 / 200; }
.bud-mock.is-halfpage .bud-mock-empty { aspect-ratio: 300 / 600; }
.bud-mock.is-skyscraper .bud-mock-empty { aspect-ratio: 160 / 600; width: 54%; margin-inline: auto; }
.bud-mock.is-square .bud-mock-empty { aspect-ratio: 1 / 1; }
.bud-mock.is-billboard .bud-mock-empty { aspect-ratio: 970 / 250; }

.bud-mock.is-skyscraper .bud-mock-ad img { width: 54%; margin-inline: auto; }

@media (max-width: 560px) {
	.bud-mock.is-rail .bud-mock-page {
		grid-template-columns: minmax(0, 1fr);
	}

	.bud-mock.is-rail .bud-mock-ad {
		width: min(100%, 300px);
		justify-self: center;
	}
}
