/**
 * CPM Shows frontend styles.
 *
 * BEM under cpm-shows__. Design system ported from the React app:
 * navy #1A2A44, burgundy #8B1E3F, gold #D4A017, beige #F8E9D9.
 * Headings ride the theme's Playfair Display with a serif fallback.
 * No bare element selectors (Divi's reset bleeds); no generic data-*
 * attributes (Divi bundles salvattore.js, which claims bare data-columns).
 */

.cpm-shows {
	--cpm-navy: #1a2a44;
	--cpm-burgundy: #8b1e3f;
	--cpm-gold: #d4a017;
	--cpm-beige: #f8e9d9;
	margin: 0;
}

/* Buttons */

.cpm-shows__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 9999px;
	padding: 12px 24px;
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.56; /* 28px: matches the live site's 52px button height */
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.cpm-shows__btn--tickets {
	background-color: var(--cpm-gold, #d4a017);
	color: var(--cpm-navy, #1a2a44);
}

.cpm-shows__btn--tickets:hover {
	background-color: #c7920f;
	color: var(--cpm-navy, #1a2a44);
}

.cpm-shows__btn--more {
	background-color: var(--cpm-burgundy, #8b1e3f);
	color: var(--cpm-beige, #f8e9d9);
}

.cpm-shows__btn--more:hover {
	background-color: #701732;
	color: var(--cpm-beige, #f8e9d9);
}

.cpm-shows__btn--disabled {
	background-color: rgba(26, 42, 68, 0.2);
	color: rgba(26, 42, 68, 0.5);
	cursor: not-allowed;
}

.cpm-shows__btn--block {
	display: flex;
	width: 100%;
}

/* Shared bits */

.cpm-shows__label {
	display: block;
	font-size: 12px;
	letter-spacing: 0.5em;
	text-transform: uppercase;
	color: var(--cpm-burgundy, #8b1e3f);
}

/*
 * Desktop only: reserve a two-line label slot. "Featured Concert" wraps to
 * two lines at the 1fr text-column width (it does on the live site too:
 * measured 41px vs 17px there, equalized by its shared grid), so the
 * Coming Soon card reserves the same space to keep both homepage cards
 * identical in height with CTAs aligned. Below Divi's 980px column-stack
 * point the cards are full width and live renders natural heights.
 */
@media (min-width: 981px) {
	.cpm-shows--featured .cpm-shows__label,
	.cpm-shows--next .cpm-shows__label {
		min-height: 48px;
	}
}

.cpm-shows__empty {
	border-radius: 24px;
	background-color: var(--cpm-beige, #f8e9d9);
	padding: 48px;
	text-align: center;
}

.cpm-shows__empty p {
	margin: 0;
	color: rgba(26, 42, 68, 0.7);
}

/* Hero card (homepage featured / next slots) */

.cpm-shows__hero {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	overflow: hidden;
	border-radius: 12px; /* live home cards are rounded-xl, not the 24px the /hear cards use */
	border: 1px solid rgb(239, 205, 169);
	background-color: #fff;
	box-shadow: 0 10px 30px rgba(26, 42, 68, 0.12);
	height: 100%;
}

.cpm-shows__hero--no-image {
	grid-template-columns: 1fr;
}

/*
 * min-width: 0 on both grid children is load-bearing: the meta line is
 * nowrap+ellipsis, and without it the text column's min-content width
 * (the full untruncated meta string) forces the 1.2fr/1fr tracks apart by
 * a different amount per card, making the two homepage card images
 * different widths (measured 256 vs 296 on 2026-08-05).
 */
.cpm-shows__hero-media {
	display: block;
	line-height: 0;
	min-width: 0;
}

.cpm-shows__hero-media .cpm-shows__img {
	width: 100%;
	height: 100%;
	min-height: 240px;
	object-fit: cover;
	transition: opacity 0.2s ease;
}

.cpm-shows__hero-media:hover .cpm-shows__img {
	opacity: 0.9;
}

.cpm-shows__hero-body {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 16px;
	padding: 32px;
	min-width: 0;
}

.cpm-shows__hero-text {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/*
 * The three text slots below have FIXED heights (title 2 lines, meta 1
 * line, desc 3 lines) so the two side-by-side homepage cards are always
 * exactly the same height with their CTAs bottom-aligned, regardless of
 * how long each show's title/venue/description is.
 */
.cpm-shows__hero-title {
	margin: 0;
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 24px;
	line-height: 1.34; /* 32px, matches the React text-2xl default */
	min-height: 64px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cpm-shows__hero-title a {
	color: var(--cpm-navy, #1a2a44);
	text-decoration: none;
	transition: color 0.2s ease;
}

.cpm-shows__hero-title a:hover {
	color: var(--cpm-burgundy, #8b1e3f);
}

/*
 * The meta wraps to a second line like the live site (no ellipsis: "Nov
 * 14, 2026 · Cutler Majestic Theatre" does not fit the text column on one
 * line there either). The desktop min-height reserves the two-line slot so
 * both homepage cards stay equal.
 */
.cpm-shows__hero-meta {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.43;
	color: rgba(26, 42, 68, 0.8);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

@media (min-width: 981px) {
	.cpm-shows__hero-meta {
		min-height: 40px;
	}
}

.cpm-shows__hero-desc {
	margin: 0;
	font-size: 14px;
	line-height: 1.43;
	color: rgba(26, 42, 68, 0.7);
	min-height: 60px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

@media (max-width: 900px) {
	.cpm-shows__hero {
		grid-template-columns: 1fr;
	}

	.cpm-shows__hero-media .cpm-shows__img {
		height: 240px;
		min-height: 0;
	}
}

/* Grid cards (Hear page) */

.cpm-shows__grid {
	display: grid;
	gap: 24px;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.cpm-shows__card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	border: 1px solid rgba(26, 42, 68, 0.15);
	border-radius: 24px;
	background-color: #fff;
	padding: 24px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cpm-shows__card:hover {
	border-color: rgba(139, 30, 63, 0.3);
	box-shadow: 0 10px 30px rgba(26, 42, 68, 0.12);
}

.cpm-shows__card-head {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.cpm-shows__badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 80px;
	height: 80px;
	border-radius: 8px;
	background-color: rgba(139, 30, 63, 0.1);
	text-align: center;
}

.cpm-shows__badge-day {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 30px;
	line-height: 1.2; /* 36px, live-site parity */
	color: var(--cpm-burgundy, #8b1e3f);
}

.cpm-shows__badge-month {
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	color: rgba(139, 30, 63, 0.7);
}

.cpm-shows__card-heading {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cpm-shows__card-title {
	margin: 0;
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 20px;
	line-height: 1.25; /* 25px, live-site parity */
}

.cpm-shows__card-title a {
	color: var(--cpm-navy, #1a2a44);
	text-decoration: none;
	transition: color 0.2s ease;
}

.cpm-shows__card-title a:hover {
	color: var(--cpm-burgundy, #8b1e3f);
}

.cpm-shows__card-venue {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	color: rgba(26, 42, 68, 0.7);
}

.cpm-shows__pin {
	flex-shrink: 0;
}

/*
 * 0.6 alpha matches the live site pixel-for-pixel (Tim, 2026-08-05); it is
 * ~3.6:1 contrast at 14px, below AA. The live site has the identical value
 * today. A joint contrast pass on both is a post-launch item.
 */
.cpm-shows__card-desc {
	margin: 0;
	font-size: 14px;
	line-height: 1.43; /* 20px, live-site parity */
	color: rgba(26, 42, 68, 0.6);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cpm-shows__card-cta {
	margin-top: auto;
	display: flex;
}

.cpm-shows__card-cta .cpm-shows__btn {
	width: 100%;
}

/* [cpm_event_map] */

.cpm-shows__map {
	overflow: hidden;
	border-radius: 24px;
	background-color: #fff;
	box-shadow: 0 10px 30px rgba(26, 42, 68, 0.12);
}

.cpm-shows__map-frame {
	display: block;
	width: 100%;
	border: 0;
}

.cpm-shows__map--preview {
	padding: 48px;
	text-align: center;
	border: 1px dashed rgba(26, 42, 68, 0.3);
	color: rgba(26, 42, 68, 0.6);
	box-shadow: none;
}

.cpm-shows__map-directions {
	margin: 8px 0 0;
	font-size: 14px;
}

.cpm-shows__map-directions a {
	color: var(--cpm-burgundy, #8b1e3f);
}

/* [cpm_acf] */

.cpm-shows__acf-label {
	display: block;
	font-size: 12px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: rgba(26, 42, 68, 0.6);
	margin-bottom: 4px;
}

.cpm-shows__acf-img {
	max-width: 100%;
	height: auto;
}

.cpm-shows__acf--preview {
	padding: 8px 12px;
	border: 1px dashed rgba(26, 42, 68, 0.3);
	border-radius: 8px;
	color: rgba(26, 42, 68, 0.6);
	font-size: 13px;
}
