/**
 * Auto-generated class poster banner (fills .tm-class-card__media / profile photo).
 */

.tm-class-banner {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.85rem 0.75rem;
	box-sizing: border-box;
	text-align: center;
	background: var(--tm-banner-bg, #0f766e);
	color: var(--tm-banner-fg, #ecfdf5);
	overflow: hidden;
	width: 100%;
	height: 100%;
	min-height: inherit;
}

.tm-class-banner__line {
	margin: 0;
	max-width: 100%;
	line-height: 1.25;
	word-break: break-word;
}

.tm-class-banner__category {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.92;
}

.tm-class-banner__subject {
	font-size: clamp(1.15rem, 2.4vw, 1.65rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.tm-class-banner__teacher {
	font-size: clamp(0.88rem, 1.6vw, 1.05rem);
	font-weight: 700;
	opacity: 0.95;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.tm-class-banner__type {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	opacity: 0.88;
}

/* Profile photo slot uses relative container without absolute media */
.tm-class-profile-view__photo .tm-class-banner,
.tm-teacher-profile-view__photo .tm-class-banner {
	position: relative;
	min-height: 180px;
	border-radius: inherit;
}

.tm-class-card__media {
	position: relative;
}

.tm-class-card__media .tm-class-banner {
	position: absolute;
	inset: 0;
}

@media (max-width: 720px) {
	/*
	 * Mobile cards set .tm-class-card__media { min-height: 0 } and size via .tm-class-card__img.
	 * Auto-banners have no img, so the media box would collapse — force a banner height.
	 */
	.tm-class-card__media--banner,
	.tm-class-card__media:has(.tm-class-banner) {
		min-height: 170px !important;
		height: 170px;
	}

	.tm-class-card__media .tm-class-banner {
		position: absolute;
		inset: 0;
		height: 100%;
		min-height: 170px;
	}
}
