/* KASIS AdStack — slot containers. Reserved heights avoid layout shift. */
.kasis-ad-wrap { display: flex; flex-direction: column; align-items: center; width: 100%; }
.kasis-ad-wrap.is-empty { display: none; }
.kasis-ad-label {
	font: 500 11px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
	letter-spacing: .02em;
	color: #6b7280;
	margin-bottom: 4px;
}
.kasis-ad {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	min-height: var(--kasis-h-m, 0);
}
@media (min-width: 1024px) {
	.kasis-ad { min-height: var(--kasis-h-d, 0); }
}
.kasis-ad-wrap--mpu_1 .kasis-ad,
.kasis-ad-wrap--mpu_2 .kasis-ad,
.kasis-ad-wrap--inarticle .kasis-ad { max-width: 336px; }
.kasis-ad-wrap--leaderboard .kasis-ad,
.kasis-ad-wrap--footer .kasis-ad { max-width: 970px; }
.kasis-ad-wrap--infeed .kasis-ad { max-width: 728px; }
.kasis-ad-wrap--prose { margin: 2em 0; }

/* Debug frames: placement outline with ad unit, key-values, sizes and result until a creative fills it. */
.kasis-ad--debug:not(.is-filled) {
	background:
		repeating-linear-gradient(135deg, rgba(100, 116, 139, .08) 0 10px, transparent 10px 20px),
		#f8fafc;
	outline: 1px dashed #94a3b8;
	outline-offset: -1px;
}
.kasis-ad--debug:not(.is-filled)::after {
	content: attr(data-debug);
	/* Absolute: GPT inserts its own (empty) container in the slot, which would push the text aside. */
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	white-space: pre-wrap;
	text-align: center;
	padding: 8px 12px;
	font: 11.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
	color: #475569;
	max-width: 100%;
	max-height: 100%;
	overflow: hidden;
	overflow-wrap: anywhere;
}
/* Same information under a filled slot. */
.kasis-ad-info { display: none; }
.kasis-ad-info.is-visible,
.kasis-ad-pagebar {
	display: block;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	font: 11.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
	color: #334155;
	background: #f1f5f9;
	border: 1px dashed #94a3b8;
	border-radius: 3px;
	padding: 6px 10px;
}
.kasis-ad-info.is-visible { margin-top: 6px; max-width: 100%; text-align: left; }
.kasis-ad-pagebar { max-width: 1168px; margin: 24px auto 0; }

/* Google test network badge. */
.kasis-testnet-badge {
	position: fixed;
	left: 12px;
	bottom: 12px;
	z-index: 2147483000;
	font: 600 12px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
	color: #fff;
	background: #b3261e;
	padding: 7px 12px;
	border-radius: 999px;
	text-decoration: none;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.kasis-testnet-badge:hover { color: #fff; background: #8c1d18; }
