/*
 * The shows landing page: [up_show_lineup] ("What's on") and [up_show_grid] (inc/shows.php).
 * Same parts as the school pages: the class card's border and radius, butter tiles, the day
 * picker (school.css), pill buttons and tags. Colors go through the role tokens (--up-surface,
 * --up-ink…), so assets/css/dark.css can turn the page dark.
 */

/* ---- Shared -------------------------------------------------------------- */

.up-ds.up-lineup,
.up-ds.up-show-grid {
	max-width: var(--up-content);
	margin: 0 auto;
	padding: 40px 0;
	display: flex;
	flex-direction: column;
	gap: 22px;
	color: var(--up-ink);
	scroll-margin-top: 120px; /* clear Salient's sticky header when jumped to */
}

.up-ds .up-shows-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 8px 24px;
}

.up-ds .up-shows-head__words {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-width: 680px;
}

.up-ds .up-shows-head__text {
	margin: 0;
	padding: 0;
	color: var(--up-muted);
}

.up-ds a.up-shows-head__link {
	color: var(--up-accent-text);
	font-size: 17px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.up-ds ul.up-lineup__list,
.up-ds ul.up-show-grid__list,
.up-ds ul.up-show-card__dates {
	list-style: none;
	margin: 0;
	padding: 0;
}

.up-ds .up-lineup__list > li,
.up-ds .up-show-grid__list > li,
.up-ds .up-show-card__dates > li {
	list-style: none;
	margin: 0;
}

/* Hidden text for screen readers (Salient has its own, but not on every page). */
.up-ds .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* A show without an image: its title on a block of color. */
.up-ds .up-poster {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 10px 14px;
	font-family: var(--up-font-display);
	font-size: clamp(16px, 2vw, 24px);
	line-height: 1.1;
	text-align: center;
	text-transform: uppercase;
	overflow: hidden;
}

.up-ds .up-poster--red { background: var(--up-red); color: var(--up-white); }
.up-ds .up-poster--yellow { background: var(--up-yellow); color: var(--up-black); }
.up-ds .up-poster--black { background: var(--up-black); color: var(--up-yellow); }
.up-ds .up-poster--blush { background: var(--up-blush); color: var(--up-red); }

.up-ds .up-ticket-closed {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 10px 18px;
	border: 2px dashed var(--up-muted);
	border-radius: var(--up-radius-pill);
	color: var(--up-muted);
	font-size: 16px;
	font-weight: 600;
}

.up-ds .up-lineup__empty {
	margin: 0;
	padding: 18px;
	background: var(--up-surface-soft);
	border-radius: var(--up-radius-tile);
	font-size: 18px;
	color: var(--up-ink);
}

/* ---- What's on ----------------------------------------------------------- */

.up-ds .up-lineup__card {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 28px;
	background: var(--up-surface);
	border: 2px solid var(--up-line);
	border-radius: var(--up-radius-card);
}

.up-ds .up-lineup__days {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.up-ds .up-lineup__day {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

html body .up-ds .up-lineup__date {
	margin: 0;
	padding: 0;
	font-family: var(--up-font-body);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	color: var(--up-ink);
}

.up-ds .up-lineup__rel {
	color: var(--up-accent-text);
}

.up-ds .up-lineup__rel:not(:empty)::after {
	content: " · ";
	color: var(--up-muted);
}

.up-ds .up-lineup__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* One performance: time | image | title and details | ticket button. */
.up-ds .up-perf {
	display: grid;
	grid-template-columns: 92px 150px minmax(0, 1fr) auto;
	align-items: center;
	gap: 18px;
	padding: 14px 18px 14px 20px;
	background: var(--up-surface-soft);
	border-radius: var(--up-radius-tile);
}

.up-ds .up-perf__time {
	margin: 0;
	padding: 0;
	font-family: var(--up-font-display);
	font-size: 26px;
	line-height: 1;
	color: var(--up-ink);
	white-space: nowrap;
}

.up-ds .up-perf__time span {
	font-family: var(--up-font-body);
	font-size: 16px;
	font-weight: 700;
	text-transform: uppercase;
}

/* The image's shape (image_shape): banners are cropped evenly from both sides. */
.up-ds.up-lineup {
	--up-perf-ratio: 4 / 3;
}

.up-ds.up-lineup--img-square {
	--up-perf-ratio: 1 / 1;
}

.up-ds.up-lineup--img-wide {
	--up-perf-ratio: 2 / 1;
}

.up-ds .up-perf__media {
	aspect-ratio: var(--up-perf-ratio);
	border-radius: 10px;
	overflow: hidden;
	background: var(--up-surface);
}

.up-ds .up-perf__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 50%;
}

.up-ds .up-perf__media .up-poster {
	font-size: 13px;
	padding: 6px 8px;
}

.up-ds .up-perf__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

html body .up-ds .up-perf__title {
	margin: 0;
	padding: 0;
	font-family: var(--up-font-body);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0;
	text-transform: none;
	color: var(--up-ink);
}

.up-ds .up-perf__title a {
	color: inherit;
	text-decoration: none;
}

.up-ds .up-perf__title a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.up-ds .up-perf__sub {
	margin: 0;
	padding: 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--up-accent-text);
}

.up-ds .up-perf__summary {
	margin: 4px 0 2px;
	padding: 0;
	font-size: 16px;
	line-height: 1.45;
	color: var(--up-ink);
	max-width: 62ch;
}

.up-ds .up-perf__meta {
	margin: 0;
	padding: 0;
	font-size: 15px;
	line-height: 1.4;
	color: var(--up-muted);
}

.up-ds .up-perf__action {
	justify-self: end;
}

/* ---- All shows ----------------------------------------------------------- */

.up-ds .up-show-grid__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 22px;
}

.up-ds .up-show-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--up-surface);
	border: 2px solid var(--up-line);
	border-radius: var(--up-radius-card);
	overflow: hidden;
}

.up-ds .up-show-card__media {
	display: block;
	aspect-ratio: 2 / 1;
	border-bottom: 2px solid var(--up-line);
	overflow: hidden;
}

.up-ds .up-show-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.up-ds a.up-show-card__media:hover img {
	transform: scale(1.03);
}

.up-ds .up-show-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 22px 24px 24px;
}

html body .up-ds .up-show-card__title {
	font-size: clamp(21px, 2.2vw, 25px);
	color: var(--up-ink);
}

.up-ds .up-show-card__title a {
	color: inherit;
	text-decoration: none;
}

.up-ds .up-show-card__title a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 2px;
}

.up-ds .up-show-card__summary {
	margin: 0;
	padding: 0;
	font-size: 17px;
	line-height: 1.45;
	color: var(--up-muted);
}

.up-ds .up-show-card__meta {
	margin: 0;
	padding: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--up-muted);
}

/* Date buttons: a small version of the day picker, each opening the checkout. */
.up-ds .up-show-card__dates {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
	gap: 8px;
	margin-top: auto;
	padding-top: 6px;
}

.up-ds .up-date-chip {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1px;
	min-height: 56px;
	height: 100%;
	padding: 8px 6px;
	background: var(--up-surface);
	border: 2px solid var(--up-line);
	border-radius: var(--up-radius-tile);
	color: var(--up-ink);
	text-align: center;
	text-decoration: none;
	line-height: 1.2;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.up-ds a.up-date-chip:hover {
	background: var(--up-red);
	border-color: var(--up-red);
	color: var(--up-white);
}

.up-ds .up-date-chip__day {
	font-size: 15px;
	font-weight: 700;
}

.up-ds .up-date-chip__time {
	font-size: 14px;
	font-weight: 500;
}

.up-ds .up-date-chip--closed {
	border-style: dashed;
	color: var(--up-muted);
	border-color: var(--up-muted);
}

.up-ds .up-date-chip__note {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.up-ds a.up-show-card__more {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: 32px;
	color: var(--up-accent-text);
	font-size: 16px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---- Tablets and phones -------------------------------------------------- */

@media (max-width: 860px) {
	.up-ds .up-perf {
		grid-template-columns: 80px 120px minmax(0, 1fr);
	}

	.up-ds .up-perf__action {
		grid-column: 1 / -1;
		justify-self: stretch;
	}

	.up-ds .up-perf__action .up-btn,
	.up-ds .up-perf__action .up-ticket-closed {
		width: 100%;
		justify-content: center;
	}
}

@media (max-width: 600px) {
	.up-ds .up-lineup__card {
		padding: 20px 14px;
		border-radius: var(--up-radius-panel);
	}

	.up-ds .up-perf {
		grid-template-columns: auto minmax(0, 1fr);
		gap: 12px 14px;
		padding: 14px;
	}

	/* Phones: a 4:3 or square image sits beside the time and title. A wide banner would be
	   too thin to read at this size, so it's left out. */
	.up-ds.up-lineup:not(.up-lineup--img-wide) .up-perf {
		grid-template-columns: 88px minmax(0, 1fr);
		grid-template-areas: "media time" "media body" "action action";
		row-gap: 6px;
	}

	.up-ds.up-lineup:not(.up-lineup--img-wide) .up-perf__media {
		grid-area: media;
		align-self: start;
	}

	.up-ds.up-lineup:not(.up-lineup--img-wide) .up-perf__time {
		grid-area: time;
	}

	.up-ds.up-lineup:not(.up-lineup--img-wide) .up-perf__body {
		grid-area: body;
		align-self: start;
	}

	.up-ds.up-lineup:not(.up-lineup--img-wide) .up-perf__action {
		grid-area: action;
	}

	.up-ds.up-lineup--img-wide .up-perf__media {
		display: none;
	}

	.up-ds .up-perf__time {
		font-size: 22px;
	}

	html body .up-ds .up-perf__title {
		font-size: 18px;
	}

	.up-ds .up-show-grid__list {
		grid-template-columns: 1fr;
	}

	.up-ds .up-show-card__body {
		padding: 18px 18px 20px;
	}

	.up-ds .up-show-card__dates {
		grid-template-columns: repeat(2, 1fr);
	}
}
