/* ============================================================================
   Widget: Trade Shows — "Meet Us at the Show"
   A distinct event-ticket card grammar (cyan top rail, hero date, white show
   logo, pill CTA) — deliberately unlike the Section-3 icon/video/gallery cards,
   the blog `bf-*` cards, and the Vendor Vault `vv-*` wall. All classes are `ts-*`.
   DARK cards (white official logos + cyan accents) on the dark section. The
   section background is provided by the section's own `default` skin, not here.
   ============================================================================ */

.ts-shows {
	position: relative;
}

/* --- Section head --- */
.ts-head {
	max-width: 720px;
	margin: 0 auto 2.5rem;
	text-align: center;
}

.ts-head > *:last-child {
	margin-bottom: 0;
}

/* --- Grid (five families) ---
   Phones: one card per row, so titles and the "See Schedule" pill stay inside the card.
   576–767: two per row, an odd last card centered. 768–1199: three per row, the short
   last row centered (3 + 2). 1200 and up: all five in one row. The half-column grids
   (4 and 6 tracks, each card spanning 2) are what let a short last row sit centered. */
.ts-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.625rem;
}

@media (min-width: 576px) and (max-width: 767.98px) {
	.ts-grid {
		grid-template-columns: repeat(4, 1fr);
	}

	.ts-grid > .ts-card {
		grid-column: span 2;
	}

	.ts-grid > .ts-card:nth-child(odd):last-child {
		grid-column: 2 / span 2;
	}
}

@media (min-width: 768px) and (max-width: 1199.98px) {
	.ts-grid {
		grid-template-columns: repeat(6, 1fr);
	}

	.ts-grid > .ts-card {
		grid-column: span 2;
	}

	.ts-grid > .ts-card:nth-child(3n + 1):nth-last-child(2) {
		grid-column: 2 / span 2;
	}
}

@media (min-width: 1200px) {
	.ts-grid {
		grid-template-columns: repeat(5, 1fr);
	}

	/* Five across: slightly narrower side padding keeps a cross-month date
	   ("Jan 31 – Feb 2, 2027") on one line at 1440 */
	.ts-grid > .ts-card {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}
}

/* --- Card (dark event ticket) --- */
.ts-card {
	display: flex;
	flex-direction: column;
	position: relative;
	overflow: hidden;
	padding: 1.75rem 1.5rem 1.5rem;
	background: rgba(255, 255, 255, 0.04);
	backdrop-filter: blur(4px) saturate(180%);
	-webkit-backdrop-filter: blur(4px) saturate(180%);
	border: 1px solid rgba(255, 255, 255, 0.05);
	border-radius: 1rem;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

/* Fallback when backdrop-filter is unsupported — lift the card body a touch so it
   still reads against the dark section (matches the header's @supports fallback). */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.ts-card {
		background: rgba(30, 33, 46, 0.92);
	}
}

/* Cyan ticket rail along the top edge */
.ts-card::before {
	/*
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: var(--bs-primary, #13b5ea);
	*/
}

/* The card itself is not clickable (only the buttons are) → no whole-card hover. */

/* --- Logo lockup (white official logos) --- */
.ts-card__logo-wrap {
	display: flex;
	align-items: center;
	height: 52px;
	margin-bottom: 1.25rem;
}

.ts-card__logo {
	display: block;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	object-position: left center;
}

/* Hand-tuned per-show sizing (trimmed logos have different aspect ratios; these are
   permanent widgets, so per-logo heights are fine). Tweak these five values by eye. */
.ts-card__logo--ijo       { height: 36px; }
.ts-card__logo--rjo       { height: 42px; }
.ts-card__logo--jck       { height: 30px; }
.ts-card__logo--centurion { height: 48px; }

/* AGS: the approved file is the mark in its brand greens, which disappear on the dark
   card. It renders white like the four sibling logos; the file stays as approved. */
.ts-card__logo--ags {
	height: 44px;
	filter: brightness(0) invert(1);
}

/* --- Shows (one block per upcoming show; a family can list two) --- */
.ts-card__shows {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}

.ts-card__show {
	display: flex;
	flex-direction: column;
	justify-content: space-between;   /* pin the button to the bottom of the block */
}

/* A single-show card fills the card height so its button aligns to the bottom
   regardless of how many lines the title wraps to. Multi-show cards keep their
   blocks at natural height (each block's button follows its own text). */
.ts-card__show:only-child {
	flex: 1;
}

/* Perforated ticket divider between a family's multiple upcoming shows */
.ts-card__show + .ts-card__show {
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px dashed rgba(255, 255, 255, 0.16);
}

/* Small eyebrow label — e.g. "Last visited" on a past-show card */
.ts-card__eyebrow {
	display: block;
	margin-bottom: 0.3rem;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.62);   /* 6:1 on the card; 0.45 measured 4.2:1, under 4.5 for its 11px */
}

.ts-card__date {
	display: block;
	font-weight: 800;
	font-size: 1.05rem;
	letter-spacing: 0.01em;
	color: var(--bs-primary, #13b5ea);
}

.ts-card__date--muted {
	color: rgba(255, 255, 255, 0.5);
	font-weight: 700;
	font-size: 0.95rem;
}

.ts-card__title {
	font-family: var(--bs-h3-family);
	display: block;
	margin-top: 0.5rem;
	font-weight: 600;
	font-size: 1.5rem;
	line-height: 1.625rem;
	color: rgba(255, 255, 255, 0.92);
}

/* --- CTA — LAYOUT ONLY. Button appearance is standard Bootstrap: .btn .btn-primary
   (upcoming) / .btn .btn-outline-light (past). Don't restyle the button here. --- */
.ts-card__cta {
	align-self: flex-start;
	margin-top: 2rem;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.ts-arrow {
	width: 14px;
	height: 14px;
	flex: none;
}

/* --- Greyed "awaiting data" state (all shows for the family have passed) --- */
.ts-card--soon {
	background: rgba(255, 255, 255, 0.02);
	box-shadow: none;
}

.ts-card--soon::before {
	background: rgba(255, 255, 255, 0.16);
}

.ts-card--soon .ts-card__logo {
	opacity: 0.5;
}

/* Still a clear step under a live card's 0.92, but readable: 0.4 measured 3.7:1 */
.ts-card--soon .ts-card__title {
	color: rgba(255, 255, 255, 0.55);
}

/* --- Loading / fallback message --- */
.ts-message {
	grid-column: 1 / -1;
	margin: 0;
	padding: 2rem;
	text-align: center;
	color: rgba(255, 255, 255, 0.55);
}

/* --- Skeletons (dark shimmer until hydrated) --- */
.ts-card--skeleton {
	pointer-events: none;
}

.ts-sk {
	display: block;
	border-radius: 6px;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.11) 37%, rgba(255, 255, 255, 0.05) 63%);
	background-size: 400% 100%;
	animation: ts-shimmer 1.4s ease infinite;
}

.ts-sk--logo {
	height: 40px;
	width: 90px;
	margin-bottom: 1.25rem;
}

.ts-sk--date {
	height: 16px;
	width: 70%;
	margin-bottom: 0.6rem;
}

.ts-sk--title {
	height: 18px;
	width: 88%;
	margin-bottom: 1.5rem;
}

.ts-sk--cta {
	height: 34px;
	width: 150px;
	border-radius: 50px;
}

@keyframes ts-shimmer {
	0% { background-position: 100% 0; }
	100% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
	.ts-sk { animation: none; }
	.ts-card { transition: none; }
}
