/**
 * Managed Google Ad slots (Team / League rotation).
 */

.gthl-ad-band {
	width: 100%;
	background: linear-gradient(to bottom, #f4f4f4, #ffffff);
}

.gthl-ad-band__inner {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 12px 16px;
	box-sizing: border-box;
	width: 100%;
	margin: 0 auto;
}

.gthl-ad-band--after-header .gthl-ad-band__inner {
	flex-direction: column;
	gap: 0;
}

.gthl-ad-slot {
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0 auto;
	max-width: 100%;
}

.gthl-ad-slot__unit {
	max-width: 100%;
	overflow: hidden;
	line-height: 0;
}

.gthl-ad-slot__unit--image {
	width: 100%;
	background: #f4f4f4;
}

.gthl-ad-slot__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: cover;
	object-position: center;
}

/* Leaderboard / banner */
.gthl-ad-slot--leaderboard,
.gthl-ad-slot--banner {
	width: 728px;
	max-width: 100%;
}

.gthl-ad-slot--leaderboard .gthl-ad-slot__unit,
.gthl-ad-slot--banner .gthl-ad-slot__unit {
	width: 728px;
	max-width: 100%;
	height: 90px;
	min-height: 0;
}

.gthl-ad-slot--leaderboard .gthl-ad-slot__img,
.gthl-ad-slot--banner .gthl-ad-slot__img {
	height: 90px;
	object-fit: fill;
}

.gthl-ad-slot--medium_rectangle .gthl-ad-slot__unit {
	width: var(--gthl-ad-width, 300px);
	height: var(--gthl-ad-medium-height, 250px);
}

.gthl-ad-slot--portrait .gthl-ad-slot__unit {
	width: 300px;
	max-width: 100%;
	height: 600px;
	min-height: 600px;
}

/* Mockup-style framed sidebar ads (border + inset padding) */
.gthl-ad-frame {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 10px;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid #d0d5dd;
	border-radius: 6px;
	overflow: hidden;
	line-height: 0;
	align-self: stretch;
}

.gthl-ad-frame .gthl-ad-slot,
.gthl-ad-frame .gthl-ad-slot__unit {
	width: var(--gthl-ad-width, 300px);
	max-width: 100%;
	margin: 0 auto;
}

.gthl-ad-frame--medium .gthl-ad-slot__unit,
.gthl-ad-frame--medium .gthl-ad-slot--medium_rectangle .gthl-ad-slot__unit {
	width: var(--gthl-ad-width, 300px);
	max-width: 100%;
	height: 250px;
	min-height: 250px;
}

.gthl-ad-frame--portrait .gthl-ad-slot__unit {
	height: 600px;
	min-height: 600px;
}

.gthl-ad-frame .gthl-ad-slot__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	margin: 0 auto;
}

.gthl-single__ads .gthl-ad-frame,
.gthl-program-single__ad.gthl-ad-frame,
.gthl-about-us__ad.gthl-ad-frame,
.gthl-team-page__ad.gthl-ad-frame {
	width: 100%;
	max-width: 100%;
}

/* Medium + portrait slots without .gthl-ad-frame still get the same chrome */
.gthl-ad-slot--medium_rectangle,
.gthl-ad-slot--portrait {
	box-sizing: border-box;
}

.gthl-program-updates__ad,
.gthl-single__ads > .gthl-ad-slot--medium_rectangle,
.gthl-single__ads > .gthl-ad-slot--portrait {
	/* Same inset padding as .gthl-ad-frame / post page sidebar ads. */
	padding: 10px;
	background: #fff;
	border: 1px solid #d0d5dd;
	border-radius: 6px;
	box-sizing: border-box;
}

.gthl-program-updates__ad.gthl-ad-frame {
	width: 100%;
	max-width: 100%;
}

.gthl-ad-band--above-footer,
.gthl-ad-band--above-news {
	margin: 0;
	padding: 2vw 0;
	background: #ffffff;
	border-top: 1px solid #d4d4d4;
}

.gthl-ad-band--above-footer .gthl-ad-band__inner,
.gthl-ad-band--above-news .gthl-ad-band__inner {
	padding: 0 16px;
	justify-content: center;
	align-items: center;
}

.gthl-single__sidebar .gthl-ad-slot {
	margin-bottom: 16px;
}

.gthl-team-page__ad .gthl-ad-slot,
.gthl-about-us__ad .gthl-ad-slot,
.gthl-program-updates__ad .gthl-ad-slot,
.gthl-program-single__ad .gthl-ad-slot {
	margin: 0;
}

/* Ads block card */
.tm-ads-block {
	background: var(--gen-white, #fff);
	border: 1px solid var(--gthl-color-border-soft, #ddd);
	padding: 15px;
	margin-bottom: 30px;
	border-radius: 5px;
	text-align: center;
}

.tm-ads-block-wrap:empty {
	display: none !important;
}

@media (max-width: 767px) {
	.gthl-ad-slot--portrait .gthl-ad-slot__unit {
		height: auto;
		min-height: 0;
	}

	.gthl-ad-band__inner,
	.gthl-ad-band--after-header .gthl-ad-band__inner,
	.gthl-ad-band--above-footer .gthl-ad-band__inner,
	.gthl-ad-band--above-news .gthl-ad-band__inner {
		display: flex;
		justify-content: center;
		align-items: center;
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
		padding: 12px 16px;
		text-align: center;
	}

	.gthl-ad-slot--leaderboard,
	.gthl-ad-slot--banner,
	.gthl-ad-band .gthl-ad-slot,
	.gthl-ad-band .gthl-ad-frame {
		width: 100%;
		max-width: 100%;
		margin-left: auto;
		margin-right: auto;
	}

	/* Image creatives: full width, no crop */
	.gthl-ad-slot--leaderboard .gthl-ad-slot__unit--image,
	.gthl-ad-slot--banner .gthl-ad-slot__unit--image {
		width: 100%;
		max-width: 100%;
		min-width: 0;
		height: auto;
		min-height: 0;
		overflow: visible;
		margin-left: auto;
		margin-right: auto;
	}

	.gthl-ad-slot--leaderboard .gthl-ad-slot__img,
	.gthl-ad-slot--banner .gthl-ad-slot__img {
		display: block;
		width: 100%;
		max-width: 100%;
		height: auto;
		object-fit: contain;
		object-position: center;
	}

	/* GPT / empty unit: keep a real box so the slot stays visible */
	.gthl-ad-slot--leaderboard .gthl-ad-slot__unit:not(.gthl-ad-slot__unit--image),
	.gthl-ad-slot--banner .gthl-ad-slot__unit:not(.gthl-ad-slot__unit--image) {
		display: flex;
		justify-content: center;
		align-items: center;
		width: 100%;
		max-width: 100%;
		min-width: 0 !important;
		height: 90px;
		min-height: 50px !important;
		margin-left: auto;
		margin-right: auto;
		overflow: hidden;
	}

	.gthl-ad-slot--leaderboard .gthl-ad-slot__unit:not(.gthl-ad-slot__unit--image) iframe,
	.gthl-ad-slot--banner .gthl-ad-slot__unit:not(.gthl-ad-slot__unit--image) iframe {
		max-width: 100%;
		margin-left: auto;
		margin-right: auto;
	}
}
