/**
 * Single event template
 * ---------------------------------------------------------------------
 * Colours match Events Map's own defaults (accent, ink, ink-soft, line,
 * tint) so navigating from the list/map to an individual event doesn't
 * feel like a different site. If those defaults are changed on the
 * Events Map element itself, this stylesheet is not aware of that —
 * it is a separate, static file rather than something the shortcode
 * generates, so update the two together by hand if the palette changes.
 */

.cl-event-single {
	/* Exactly the Events Map element's own defaults (events-map.php
	   $atts): a visitor coming from the list should not see the reds,
	   greys and hairlines change on the way in. */
	--cl-event-accent: #C91228;
	--cl-event-accent-text: #ffffff;
	--cl-event-ink: #061E21;
	--cl-event-ink-soft: rgba(6, 30, 33, 0.7);
	--cl-event-surface: #FEFDFD;
	--cl-event-line: rgba(6, 30, 33, 0.16);
	--cl-event-tint: #FAF9F7;

	/* Button shape and label size, copied from the live Events Map
	   element on /events/ rather than from the code defaults: its
	   btn_radius is 8px and its body_size is 14 / 15 / 14px at the
	   element's own 900 and 600 breakpoints (stepped down below). If
	   those settings are changed on that element, change them here too —
	   this file can't read them. */
	--cl-event-btn-radius: 8px;
	--cl-event-btn-size: 14px;

	max-width: 860px;
	margin: 0 auto;
	padding: 48px 24px 64px;
	color: var(--cl-event-ink);
}

/* This template reuses Events Map's own icon markup (cl_emap_icon) for
   visual consistency, but that element's own stylesheet — where these
   icons' sizing/stroke normally lives — isn't loaded on this page.
   Matches events-map's own .cl-emap__i base rule exactly. */
.cl-event-single .cl-emap__i {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	fill: none;
}

.cl-event-single__back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 24px;
	font-size: 14px;
	font-weight: 600;
	color: var(--cl-event-ink-soft);
	text-decoration: none;
}

.cl-event-single__back:hover {
	color: var(--cl-event-ink);
}

.cl-event-single__back-icon {
	width: 16px;
	height: 16px;
}

.cl-event-single__pills {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
}

.cl-event-single__pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--cl-event-tint);
	font-size: 13px;
	font-weight: 600;
	color: var(--cl-event-ink);
	white-space: nowrap;
}

.cl-event-single__pill--past {
	background: transparent;
	border: 1px solid var(--cl-event-line);
	color: var(--cl-event-ink-soft);
}
/* Profession tags: outlined like the Events Map cards' tags. */
.cl-event-single__pill--profession {
	background: transparent;
	border: 1px solid var(--cl-event-line);
	font-weight: 500;
}

.cl-event-single__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
}

.cl-event-single__title {
	margin: 0 0 20px;
	font-size: clamp(28px, 4vw, 42px);
	line-height: 1.15;
	font-weight: 700;
	color: var(--cl-event-ink);
}

.cl-event-single__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin-bottom: 24px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--cl-event-line);
}

.cl-event-single__meta-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	color: var(--cl-event-ink-soft);
}

.cl-event-single__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 32px;
	position: relative;
}

/**
 * The same button as the cards on the Events page
 * (.cl-emap__link:not(.--accent) in style.css): 8px corners, 11px/20px,
 * 1px hairline, weight 500, line-height 1, icons at 1.05em. Keep the two
 * in step — they are separate files but one button in the visitor's eyes.
 *
 * The radius is repeated further down at a higher specificity to beat
 * Salient's forced 4px on native <button>s — see the note there.
 */
.cl-event-single__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex: 0 0 auto;
	white-space: nowrap;
	padding: 11px 20px;
	border-radius: var(--cl-event-btn-radius, 8px);
	font-size: var(--cl-event-btn-size, 16px);
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	border: 1px solid var(--cl-event-line);
	color: var(--cl-event-ink);
	background: transparent;
	cursor: pointer;
	font-family: inherit;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	transition: background-color 0.16s ease, border-color 0.16s ease;
}

.cl-event-single__btn .cl-emap__i {
	width: 1.05em;
	height: 1.05em;
	stroke-width: 1.7;
}

.cl-event-single__btn:hover {
	text-decoration: none;
	background: var(--cl-event-tint);
}

.cl-event-single__btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 2px var(--cl-event-surface), 0 0 0 4px var(--cl-event-ink);
}

/* The filled version of the same shape, as "Get tickets" is on the cards:
   accent fill, and a hover that darkens whatever that accent is rather
   than fading to the page behind it. */
.cl-event-single__btn--primary {
	background: var(--cl-event-accent);
	border-color: var(--cl-event-accent);
	color: var(--cl-event-accent-text, #fff);
	transition: filter 0.16s ease;
}

.cl-event-single__btn--primary:hover {
	background: var(--cl-event-accent);
	filter: brightness(0.9);
}

.cl-event-single__ended {
	display: inline-flex;
	align-items: center;
	padding: 11px 4px;
	font-size: var(--cl-event-btn-size, 16px);
	font-weight: 500;
	line-height: 1;
	color: var(--cl-event-ink-soft);
}

.cl-event-single__cal {
	position: relative;
}

.cl-event-single__cal-menu {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 5;
	min-width: 190px;
	padding: 6px;
	background: var(--cl-event-surface);
	border: 1px solid var(--cl-event-line);
	border-radius: var(--cl-event-btn-radius, 8px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.cl-event-single__cal-menu a {
	display: block;
	padding: 9px 10px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	color: var(--cl-event-ink);
	text-decoration: none;
}

.cl-event-single__cal-menu a:hover {
	background: var(--cl-event-tint);
}

.cl-event-single__banner {
	width: 100%;
	max-height: 460px;
	object-fit: cover;
	border-radius: 16px;
	margin-bottom: 32px;
	display: block;
}

.cl-event-single__content {
	font-size: 16px;
	line-height: 1.7;
	margin-bottom: 8px;
}

.cl-event-single__content p {
	margin: 0 0 1.2em;
}

.cl-event-single__content img {
	max-width: 100%;
	border-radius: 12px;
}

.cl-event-single__section {
	margin-top: 40px;
	padding-top: 32px;
	border-top: 1px solid var(--cl-event-line);
}

.cl-event-single__section h2 {
	margin: 0 0 16px;
	font-size: 18px;
	font-weight: 700;
	color: var(--cl-event-ink);
}

.cl-event-single__section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.cl-event-single__section-head h2 {
	margin: 0;
}

.cl-event-single__directions {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--cl-event-ink-soft);
	text-decoration: none;
}

.cl-event-single__directions:hover {
	color: var(--cl-event-ink);
}

.cl-event-single__map {
	width: 100%;
	height: 320px;
	border-radius: 12px;
	background: var(--cl-event-tint);
}

.cl-event-single__more-item {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 0;
	text-decoration: none;
	color: var(--cl-event-ink);
	border-bottom: 1px solid var(--cl-event-line);
}

.cl-event-single__more-item:last-child {
	border-bottom: none;
}

.cl-event-single__more-date {
	flex: 0 0 auto;
	width: 44px;
	text-align: center;
}

.cl-event-single__more-month {
	display: block;
	font-size: 11px;
	font-weight: 700;
	color: var(--cl-event-accent);
	text-transform: uppercase;
}

.cl-event-single__more-day {
	display: block;
	font-size: 18px;
	font-weight: 700;
}

.cl-event-single__more-body {
	flex: 1;
	min-width: 0;
}

.cl-event-single__more-title {
	display: block;
	font-size: 15px;
	font-weight: 600;
}

.cl-event-single__more-where {
	display: block;
	font-size: 13px;
	color: var(--cl-event-ink-soft);
}

.cl-event-single__more-chevron {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	color: var(--cl-event-ink-soft);
}

.cl-event-single__footer {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--cl-event-line);
	text-align: center;
}

/* Events Map steps its label size at 900px and 600px; the buttons here
   follow the same steps, so a button never changes size between the card
   that was tapped and the page it opens. */
@media (max-width: 900px) {
	.cl-event-single {
		--cl-event-btn-size: 15px;
	}
}

@media (max-width: 600px) {
	.cl-event-single {
		--cl-event-btn-size: 14px;
		padding: 32px 18px 64px;
	}

	.cl-event-single__banner {
		max-height: 260px;
		border-radius: 12px;
	}

	/* Full-width stacked actions, as the cards' own buttons are on a
	   phone — a wrapped row of part-width buttons leaves ragged gaps. */
	.cl-event-single__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.cl-event-single__cal,
	.cl-event-single__btn {
		width: 100%;
	}

	.cl-event-single__ended {
		justify-content: center;
	}
}

/* Salient forces `border-radius: 4px !important` on every native <button>
   (Theme Options → button style). "Add to calendar" is a <button>, so it
   came out square next to the two rounded links beside it. Matching
   Events Map's own fix (style.css): same declaration, written with the
   element name so it outweighs the theme's !important rule. */
.cl-event-single button.cl-event-single__btn,
.cl-event-single a.cl-event-single__btn {
	border-radius: var(--cl-event-btn-radius, 8px) !important;
}

/* Clear Salient's fixed header below 1000px (Dylan's Conference 3
   screenshot, 21 Sep 2026). Salient only reserves room for the header on
   desktop (#header-space is 0 below 1000px), so the "All events" link sat
   84px behind it on a phone. These leave the same 28px gap desktop has.
   The header is 82px on phones and 91px on tablets for logged-out visitors;
   logged-in visitors also get the HCP bar (features/hcp-bar-logged-in),
   making it 116px / 135px, and 132px on phones at 361px and below where
   the bar wraps. */
@media (max-width: 690px) {
	.cl-event-single { padding-top: 110px; }
	body.logged-in .cl-event-single { padding-top: 144px; }
}
@media (max-width: 361px) {
	body.logged-in .cl-event-single { padding-top: 160px; }
}
@media (min-width: 691px) and (max-width: 999px) {
	.cl-event-single { padding-top: 119px; }
	body.logged-in .cl-event-single { padding-top: 163px; }
}
