/*
 * Ad spots around the garden planner (includes/ads.php): their sizes, and the placeholder boxes
 * shown on staging. Each spot keeps its space from the start, so the page doesn't jump when the
 * ad loads.
 */

/* The ads above and below the planner: a label with a thin line either side, then the ad. */
.fp-ad-wrap {
	box-sizing: border-box;
	width: 100%;
	margin: 0 auto 16px;
}

.fp-ad-wrap-below {
	margin-top: 16px;
}

.fp-ad-label {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 4px;
	padding: 0;
	color: #7d8579;
	font: 600 10px/1.2 'Open Sans', Arial, sans-serif;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.fp-ad-label::before,
.fp-ad-label::after {
	content: '';
	flex: 1;
	border-top: 1px solid #d9ded5;
}

.fp-ad {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	overflow: hidden;
}

/* Computers: a 728 × 90 banner above the planner, up to 970 × 250 below it. */
.fp-ad-wrap-above {
	max-width: 728px;
}

.fp-ad-above {
	height: 90px;
}

.fp-ad-wrap-below {
	max-width: 970px;
}

.fp-ad-below {
	height: 250px;
}

/* Phones: a 320 × 50 strip above, a 300 × 250 rectangle below. */
@media (max-width: 767px) {
	.fp-ad-wrap-above {
		max-width: 320px;
		margin-bottom: 8px;
	}

	.fp-ad-above {
		height: 50px;
	}

	.fp-ad-wrap-below {
		max-width: 300px;
	}
}

/* Beside the planner, on its left (computers only): 300 or 160 wide, 600 tall. The planner sets
   its width and place in the window's left margin, or hides it (src/pageLayout.ts). */
.fp-planner-row {
	position: relative;
}

.fp-ad-wrap-side {
	position: absolute;
	top: 0;
	margin: 0;
}

.fp-ad-wrap-side[hidden] {
	display: none;
}

.fp-ad-side {
	height: 600px;
}

/* The ad fills its spot (the plugin takes out the settings that would let AdSense pick another
   shape). */
.fp-ad .fp-ad-widget,
.fp-ad ins.adsbygoogle {
	display: block;
	width: 100%;
	height: 100%;
}

/* In the planner's Details panel (computers only; the planner puts it in place). */
.fp-ad-details-slot,
.fp-ad-details-slot .fp-ad-widget,
.fp-ad-details-slot ins.adsbygoogle,
.fp-ad-details-slot .fp-ad-placeholder {
	display: block;
	width: 300px;
	height: 250px;
}

.fp-ad-details-slot .fp-ad-placeholder {
	display: flex;
}

/* A widget's title isn't shown (an ad needs none). */
.fp-ad-widget-title {
	display: none;
}

/* An ad AdSense couldn't fill takes no room (its label goes too). */
.fp-ad-wrap:has(ins.adsbygoogle[data-ad-status='unfilled']) {
	display: none;
}

/* Staging only: where an ad will go. */
.fp-ad-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	padding: 4px 8px;
	border: 2px dashed #b9c3b4;
	border-radius: 6px;
	background: repeating-linear-gradient(45deg, #f4f6f2, #f4f6f2 10px, #eceee9 10px, #eceee9 20px);
	color: #5d6658;
	font: 600 13px/1.3 'Open Sans', Arial, sans-serif;
	text-align: center;
}

.fp-ad-placeholder-note {
	font-size: 11px;
	font-weight: 400;
}

/* Too short for three lines (the 50px phone strip): just the spot's name. */
.fp-ad-above .fp-ad-placeholder span + span {
	display: none;
}

@media (min-width: 768px) {
	.fp-ad-above .fp-ad-placeholder span + span {
		display: inline;
	}
}

/* The help pages' right column. */
.fp-help-aside .fp-ad-placeholder {
	width: 300px;
	height: 600px;
}
