/*
 * [up_class_catalog]: the returning students' class catalog (inc/catalog.php).
 * The levels sit on a path (a numbered badge per level joined by a line), then specialty classes
 * and "more ways to play" as card grids.
 */

.up-catalog {
	max-width: var(--up-content);
	margin: 0 auto;
	padding: 40px 0;
	display: flex;
	flex-direction: column;
	gap: 48px;
}

.up-catalog [id] {
	scroll-margin-top: 120px; /* clear Salient's sticky header when jumped to */
}

.up-catalog__head {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.up-ds .up-catalog__intro,
.up-ds .up-catalog__part-intro {
	margin: 0;
	padding: 0;
	max-width: var(--up-content-narrow);
	font-size: 19px;
	line-height: 1.5;
	color: var(--up-gray);
}

.up-catalog__jump ul {
	list-style: none;
	margin: 6px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* Salient gives content list items bullets; none of the catalog's lists want them. */
.up-ds.up-catalog ul > li,
.up-ds.up-catalog ol > li {
	list-style: none;
}

.up-ds.up-catalog ul > li::marker,
.up-ds.up-catalog ol > li::marker {
	content: none;
}

.up-catalog__jump li {
	margin: 0;
	padding: 0;
}

.up-ds .up-chip--level {
	font-family: var(--up-font-display);
	min-width: 64px;
	justify-content: center;
}

.up-catalog__part {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

html body .up-ds .up-catalog__part-title {
	font-family: var(--up-font-display);
	font-weight: 400;
	font-size: clamp(24px, 2.6vw, 28px);
	line-height: 1.15;
	letter-spacing: 0;
	text-transform: none;
	margin: 0;
	color: var(--up-black);
}

.up-ds .up-catalog__faq {
	margin: 0;
	padding: 0;
	font-size: 19px;
	font-weight: 600;
}

.up-ds a.up-catalog__new-link {
	color: var(--up-red);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.up-ds a.up-catalog__faq-link {
	color: var(--up-red);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.up-ds a.up-catalog__faq-link::after {
	content: " →";
}

/* ---- The levels: a path of badges ---------------------------------------- */

.up-ds .up-levels {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.up-ds .up-level {
	position: relative;
	margin: 0;
	padding: 0 0 0 96px;
}

/* The line joining one badge to the next. */
.up-ds .up-level:not(:last-child)::before {
	content: "";
	position: absolute;
	left: 35px;
	top: 72px;
	bottom: -18px;
	width: 6px;
	border-radius: 3px;
	background: var(--up-yellow);
}

.up-level__badge {
	position: absolute;
	left: 0;
	top: 0;
	width: 76px;
	height: 76px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--up-red);
	color: var(--up-white);
	font-family: var(--up-font-display);
	font-size: 24px;
	box-shadow: var(--up-shadow-card);
}

.up-ds .up-level:last-child .up-level__badge {
	background: var(--up-black);
	color: var(--up-yellow);
}

.up-level__card {
	background: var(--up-white);
	border: 2px solid var(--up-black);
	border-radius: var(--up-radius-card);
	overflow: hidden;
}

.up-level__course {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 24px 28px;
}

.up-level__course + .up-level__course {
	border-top: 2px dashed rgba(20, 20, 20, 0.2);
}

.up-level__about {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-width: var(--up-content-narrow);
}

.up-ds .up-level__about .up-eyebrow {
	margin: 0;
	color: var(--up-red);
}

.up-ds .up-level__summary,
.up-ds .up-cat-card__summary {
	margin: 0;
	padding: 0;
	font-size: 17px;
	line-height: 1.45;
	color: var(--up-gray);
}

.up-ds .up-cat-length {
	margin: 2px 0 0;
	padding: 0;
	font-size: 15px;
	color: var(--up-gray);
}

.up-ds .up-cat-prereq {
	margin: 4px 0 0;
	padding: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--up-black);
}

.up-ds .up-cat-prereq::before {
	content: "↳ ";
	color: var(--up-red);
}

/* ---- Sections (one row per class you can register for) ------------------- */

.up-cat-sections {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.up-ds .up-cat-sections__term {
	margin: 0;
	padding: 0;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--up-gray);
}

.up-ds .up-cat-sections__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 10px;
}

/* In the narrower specialty and "more" cards, one section per row. */
.up-ds .up-cat-card .up-cat-sections__list {
	grid-template-columns: 1fr;
}

.up-ds .up-cat-section {
	margin: 0;
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	background: var(--up-butter);
	border-radius: var(--up-radius-tile);
}

.up-cat-section__text {
	min-width: 0;
}

.up-ds .up-cat-section__when {
	margin: 0;
	padding: 0;
	font-weight: 600;
	font-size: 17px;
	color: var(--up-black);
}

.up-ds .up-cat-section__line,
.up-ds .up-cat-sections__none {
	margin: 0;
	padding: 0;
	font-size: 15px;
	line-height: 1.4;
	color: var(--up-gray);
}

.up-ds .up-cat-btn {
	flex: none;
	min-height: 48px;
	padding: 10px 20px;
	font-size: 16px;
}

.up-cat-sections--empty {
	align-items: flex-start;
	padding: 12px 14px;
	background: var(--up-butter);
	border-radius: var(--up-radius-tile);
}

/* ---- Specialty and "more" cards ------------------------------------------ */

.up-cat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 18px;
}

.up-ds .up-cat-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 16px;
	padding: 22px;
	background: var(--up-white);
	border: 2px solid var(--up-black);
	border-radius: var(--up-radius-card);
}

.up-cat-card__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

html body .up-ds .up-cat-card__title {
	font-family: var(--up-font-display);
	font-weight: 400;
	font-size: 21px;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	margin: 0;
	color: var(--up-black);
}

/* ---- Picker layout: the shared day picker, one section shown ------------- */

/* Course name and description on the left, its days and the chosen section on the right. */
.up-catalog--picker .up-level__course {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: start;
	gap: 28px;
}

.up-ds .up-cat-sections--picker .up-day-picker {
	grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
	gap: 8px;
}

.up-ds .up-cat-sections--picker .up-day-picker__day {
	min-height: 64px;
}

.up-cat-picked {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* ---- Phones -------------------------------------------------------------- */

@media (max-width: 760px) {
	.up-level__course {
		padding: 20px;
	}

	.up-catalog--picker .up-level__course {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}

@media (max-width: 560px) {
	.up-ds .up-level {
		padding-left: 0;
		padding-top: 30px;
	}

	.up-ds .up-level:not(:last-child)::before {
		display: none;
	}

	.up-level__badge {
		left: 20px;
		width: 60px;
		height: 60px;
		font-size: 19px;
		z-index: 1;
	}

	.up-level__card {
		padding-top: 22px;
	}

	.up-ds .up-cat-section {
		align-items: stretch;
	}

	.up-cat-grid {
		grid-template-columns: 1fr;
	}
}

/* ---- Level buttons ("I've finished: 100 200 …"; salient_up_level_picker()) ------------------ */

.up-ds.up-level-picker {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	margin: 20px 0 8px;
}

.up-ds.up-level-picker .up-level-picker__label {
	margin: 0;
	padding: 0;
	font-weight: 600;
}

html body .up-ds.up-level-picker ul {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

html body .up-ds.up-level-picker ul > li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.up-ds.up-level-picker li::marker {
	content: none;
}

.up-ds.up-level-picker .up-chip.is-current {
	background: var(--up-black);
	color: var(--up-white);
}

.up-ds .up-catalog__empty {
	font-style: italic;
}

.up-ds .up-catalog__all {
	margin-top: 40px;
}

/* Compact level buttons, sized to fit a landing tile. */
.up-ds.up-level-picker--compact {
	margin: 10px 0 0;
}

html body .up-ds.up-level-picker--compact ul {
	gap: 6px;
}

.up-ds.up-level-picker--compact .up-chip {
	min-width: 0;
	min-height: 48px; /* the design's tap size, as the other buttons */
	padding: 6px 12px;
	font-size: 15px;
}
