/**
 * Styles for the plugin's default single event template.
 *
 * Kept as a plain stylesheet rather than folded into the block's style.scss because
 * the block stylesheet only loads on pages that actually contain the block, and a
 * single event page does not.
 *
 * Colour comes from Astra's global palette custom properties so each CPEG brand
 * inherits its own; the fallbacks cover non-Astra themes.
 */

.cpeg-event-single {
	--cpeg-accent: var( --ast-global-color-0, #d32128 );
	--cpeg-text: var( --ast-global-color-3, #2b2b2b );
	--cpeg-muted: var( --ast-global-color-2, #6b7280 );
}

.cpeg-event-single__header {
	margin-bottom: 2rem;
}

.cpeg-event-single__flag {
	display: inline-block;
	margin: 0 0 1rem;
	padding: 0.35rem 0.75rem;
	border-radius: 3px;
	background: rgba( 0, 0, 0, 0.06 );
	color: var( --cpeg-muted );
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.cpeg-event-single__title {
	margin: 0 0 0.75rem;
}

.cpeg-event-single__dates {
	margin: 0 0 0.5rem;
	color: var( --cpeg-accent );
	font-size: 1.125rem;
	font-weight: 700;
}

.cpeg-event-single__location,
.cpeg-event-single__booth,
.cpeg-event-single__organizer {
	margin: 0 0 0.35rem;
	color: var( --cpeg-muted );
}

.cpeg-event-single__booth {
	font-weight: 600;
}

.cpeg-event-single__media {
	margin: 0 0 2rem;
}

.cpeg-event-single__media img {
	display: block;
	width: 100%;
	height: auto;
}

.cpeg-event-single__cta {
	margin-top: 2rem;
}

.cpeg-event-single__link {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	border-radius: 4px;
	background: var( --cpeg-accent );
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.cpeg-event-single__link:hover,
.cpeg-event-single__link:focus-visible {
	filter: brightness( 0.9 );
	color: #fff;
}

.cpeg-event-single__link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Past events read as archival rather than current. */
.cpeg-event-single.is-past .cpeg-event-single__dates {
	color: var( --cpeg-muted );
}
