/*
 * The top of a public class page (class-top.php, partials/classes/child-template.php): charcoal title,
 * a row of key facts with small icons, the price just above the buttons, and "Next class" under them,
 * then a divider before the description. "Most popular" sits on the main photo.
 */
.class-header {
	/* The one gap between each group of the text column: label, title, rating, facts, price, buttons,
	   next class. */
	--class-gap: 24px;
}

.class_details .class-title {
	color: var(--dark);
}

/* Each group starts one gap below the last, with nothing else adding to it. */
.class-header .class_details > .subtitle {
	display: block;
	margin: 0;
	line-height: 1;
}

.class-header .class_details > h1.class-title,
.class-header .class_details > .class-rating,
.class-header .class-facts,
.class-header .class-price,
.class-header .class-buttons,
.class-header .class-next {
	margin-top: var(--class-gap) !important;
	margin-bottom: 0 !important;
}

/* "Most popular" on the main photo, top left: the class cards' pill. */
.class-photo-badge {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	line-height: 1.5;
}

/* A quarter smaller than the theme's page title (42.5px → 32px; 40px → 30px on a phone). */
.class_details h1.class-title.font-extralarge {
	font-size: 1.875rem !important;
	line-height: 1.2;
}

/* Room above the section: about 85px below the menu's wavy edge (which ends at 123px); on a 1440×900
   laptop the price and buttons still show without scrolling. (The theme's .section gives 12.5rem.) */
.class-header > .section {
	margin-top: 208px;
}

.class-facts {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem 1rem;
	padding: 0;
	list-style: none;
	font-size: .875rem;
	color: var(--dark);
}

.class-facts li {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	white-space: nowrap;
}

.class-facts .bi,
.class-next .bi {
	color: var(--red);
	font-size: 1rem;
	line-height: 1;
}

.class-price {
	font-size: 1.35rem;
	font-weight: 800;
	color: var(--dark);
	line-height: 1.2;
}

.class-price span {
	font-size: .95rem;
	font-weight: 600;
}

/* During a sale: "$64 with code BLACKFRIDAY" under the price. */
.class-price-sale {
	margin: .25rem 0 0;
}

.class-price-sale .sale-price-offer {
	font-size: .95rem;
}

/* "Next class: Sat 21 Nov, 7:00pm · 18 spots left" under the buttons, with its tags. */
.class-next {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem;
	font-size: .85rem;
	color: var(--dark);
}

/* More room, and a quiet line, before the description. */
.class_details .class-description {
	margin-top: 2.5rem;
	padding-top: 2.5rem;
	border-top: 1px solid rgba(35, 31, 32, .15);
}

@media (max-width: 767.98px) {
	.class_details h1.class-title.font-extralarge {
		font-size: 1.75rem !important;
	}

	.class-header {
		--class-gap: 18px;
	}

	/* About 60px below the menu's edge (108px on a phone). */
	.class-header > .section {
		margin-top: 168px;
	}

	.class-facts {
		gap: .4rem 1rem;
		font-size: .85rem;
	}

	.class_details .class-description {
		margin-top: 2rem;
		padding-top: 2rem;
	}
}

/* 4 or fewer seats left in the next session: "Only 3 spots left". */
.class-spots-low {
	color: var(--red);
	font-weight: 700;
}

/* "Selling fast", drawn like the class cards' "Most popular" pill. */
.class-tag {
	display: inline-block;
	padding: .15rem .55rem;
	border: 1px solid var(--dark);
	border-radius: 2rem;
	background: var(--white);
	font-size: .75rem;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
}

.class-tag-hot {
	border-color: var(--red);
	background: var(--red);
	color: var(--white);
}
