/*
 * Course card (template-parts/course-card.php): the category and badge row
 * under the photo, and the fee line above the
 * Details / Apply Now buttons. Plain CSS kept out of the frozen Tailwind
 * build, like the files around it. Site-wide, because the card shows on the
 * courses page, course pages and in the Popular Courses rail
 * (template-parts/home-courses.php) on the home page and most other pages.
 *
 * --c is the course's category hue, set on the card by
 * theitaid_course_color_vars().
 */
.course-card__fee {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 1.25rem;
	padding-top: 1rem;
	border-top: 1px dashed #CBD5E1;
}

.course-card__fee-label {
	color: #64748B;
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.course-card__fee-amount {
	color: var(--c, #4F46E5);
	font-size: 1.375rem;
	font-weight: 800;
	line-height: 1.1;
	white-space: nowrap;
}

/* Category and badge row above the title. The min-height is the badge's, so a
   card without a badge keeps its title level with its neighbours'. */
.course-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	min-height: 1.625rem;
	margin-bottom: 0.75rem;
}

/* A long category wraps rather than squeezing the badge. */
.course-card__cat {
	min-width: 0;
	line-height: 1.4;
}

.course-card__badge {
	flex-shrink: 0;
	padding: 0.3125rem 0.75rem;
	border-radius: 5px;
	background-color: var(--c, #4F46E5);
	box-shadow: 0 6px 14px -8px var(--c-glow, rgb(79 70 229 / 0.6));
	color: #FFFFFF;
	font-size: 0.625rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
}

/* The whole card opens the course: the title link's click area is stretched
   over the card (the card is position: relative). The two buttons sit above
   it, so Apply Now still goes to the apply form. */
.course-card__link::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}

.course-card__btn {
	position: relative;
	z-index: 2;
}

.course-card:has(.course-card__link) {
	cursor: pointer;
}
