/*
 * Events — archive and single.
 *
 * Deliberately not the listing design. A place is found by where it is, so that
 * design leads with a photograph; an event is found by when it happens, so this
 * one leads with the date and reads down the page as an agenda rather than
 * across it as a grid of cards.
 *
 * Loaded only on Events. Colour, type and spacing still come from
 * gcn-tokens.css, so Events look like part of the same site even though the
 * page is laid out differently.
 */

/* ==========================================================================
   The date tile

   One component, used at three sizes: on the archive row, in the single hero,
   and beside the "when" line. Tabular figures keep the day numbers aligned
   down a column of rows.
   ========================================================================== */

.gcn-event__date {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 72px;
	padding: 10px 12px 12px;
	background: var(--gcn-surface);
	border: 1px solid var(--gcn-rule);
	border-radius: var(--gcn-radius-md);
	box-shadow: var(--gcn-shadow-md);
	font-variant-numeric: tabular-nums;
	line-height: 1;
	text-align: center;
}

.gcn-event__date-day {
	font-size: 30px;
	font-weight: var(--gcn-weight-bold);
	letter-spacing: -0.03em;
	color: var(--gcn-text);
}

.gcn-event__date-month {
	margin-top: 4px;
	font-size: var(--gcn-text-2xs);
	font-weight: var(--gcn-weight-bold);
	letter-spacing: var(--gcn-tracking-wide);
	text-transform: uppercase;
	color: var(--gcn-brand);
}

.gcn-event__date-year,
.gcn-event__date-span {
	margin-top: 3px;
	font-size: var(--gcn-text-2xs);
	color: var(--gcn-text-faint);
}

/* ==========================================================================
   Archive — the agenda
   ========================================================================== */

/* GeoDirectory's list view is still a stacked card, one per row. Turned on its
   side it becomes an agenda row: image, then the event, reading left to right. */
.geodir-page-cpt-gd_event .geodir-post > .card {
	flex-direction: row;
	align-items: stretch;
}

.geodir-page-cpt-gd_event .geodir-post .card-img-top {
	flex: 0 0 300px;
	width: 300px;
	align-self: stretch;
}

.geodir-page-cpt-gd_event .geodir-post .card-img-top .geodir-post-slider,
.geodir-page-cpt-gd_event .geodir-post .card-img-top .geodir-image-container,
.geodir-page-cpt-gd_event .geodir-post .card-img-top .carousel-inner,
.geodir-page-cpt-gd_event .geodir-post .card-img-top .carousel-item,
.geodir-page-cpt-gd_event .geodir-post .card-img-top .ratio {
	height: 100%;
}

.geodir-page-cpt-gd_event .geodir-post .card-img-top .ratio::before {
	display: none;
}

.geodir-page-cpt-gd_event .geodir-post .card-img-top img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.geodir-page-cpt-gd_event .geodir-post .card-body {
	flex: 1 1 auto;
	padding: var(--gcn-space-6) var(--gcn-space-6) var(--gcn-space-6) var(--gcn-space-8) !important;
}

/* The date lifts out of the body and sits over the image, which is what makes
   the row scannable: eight dates in a column, each against its own picture. */
.geodir-page-cpt-gd_event .geodir-post .gcn-event__date {
	position: absolute;
	top: var(--gcn-space-4);
	left: var(--gcn-space-4);
	z-index: 3;
}

.geodir-page-cpt-gd_event .geodir-post .geodir-entry-title,
.geodir-page-cpt-gd_event .geodir-post .geodir-entry-title.h5 {
	font-size: var(--gcn-text-xl);
}

.gcn-event__when {
	display: inline-block;
	font-size: var(--gcn-text-base);
	font-weight: var(--gcn-weight-medium);
	color: var(--gcn-brand-strong);
}

.geodir-page-cpt-gd_event .geodir-post .geodir-field-venue {
	display: block;
	font-size: var(--gcn-text-sm);
	color: var(--gcn-text-muted);
}

/* A past event says so rather than looking current. */
.gcn-chip--past {
	color: var(--gcn-text-muted);
	background: var(--gcn-surface-sunken);
	border-color: var(--gcn-rule);
}

@media (max-width: 767px) {

	.geodir-page-cpt-gd_event .geodir-post > .card {
		flex-direction: column;
	}

	.geodir-page-cpt-gd_event .geodir-post .card-img-top {
		flex-basis: auto;
		width: 100%;
		height: 200px;
	}

	.geodir-page-cpt-gd_event .geodir-post .card-body {
		padding: var(--gcn-space-5) !important;
	}
}

/* ==========================================================================
   Single — the date leads
   ========================================================================== */

.gcn-event__hero {
	position: relative;
	min-height: 300px;
	background-color: #10161c;
	background-image: var(--gcn-hero-image, none);
	background-position: center;
	background-size: cover;
	isolation: isolate;
}

.gcn-event__hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(9, 13, 17, 0.35) 0%, rgba(9, 13, 17, 0.72) 100%);
}

/*
 * The card straddles the boundary between the photograph and the page, so the
 * event's details sit on white while still belonging to the image above them.
 * That overlap is what separates this page from every other listing type.
 */
.gcn-event__panel {
	position: relative;
	z-index: 2;
	margin-top: -96px;
	padding: var(--gcn-space-8);
	background: var(--gcn-surface);
	border: 1px solid var(--gcn-rule);
	border-radius: var(--gcn-radius-lg);
	box-shadow: var(--gcn-shadow-lg);
}

.gcn-event__panel-head {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: var(--gcn-space-6);
}

/* Bricks wraps each shortcode in its own div. As a flex child that wrapper is a
   block, so flex-basis:auto resolves to the full container width and pushes the
   text off the panel. display:contents drops the wrapper out of the layout and
   lets the tile itself be the flex item. */
.gcn-event__panel-head > .brxe-shortcode {
	display: contents;
}

.gcn-event__panel-head > .gcn-event__date,
.gcn-event__panel-head .gcn-event__date {
	flex: 0 0 auto;
}

.gcn-event__panel-head > .brxe-block {
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
}

.gcn-event__panel .gcn-event__date {
	flex: 0 0 auto;
	min-width: 88px;
	box-shadow: none;
	background: var(--gcn-brand-soft);
	border-color: var(--gcn-brand-border);
}

.gcn-event__panel .gcn-event__date-day {
	font-size: 38px;
	color: var(--gcn-brand-strong);
}

.gcn-event__eyebrow {
	margin-bottom: 6px;
	font-size: var(--gcn-text-xs);
	font-weight: var(--gcn-weight-semibold);
	letter-spacing: var(--gcn-tracking-wide);
	text-transform: uppercase;
	color: var(--gcn-brand-strong);
}

.gcn-event__eyebrow a {
	color: inherit;
	text-decoration: none;
}

.gcn-event__title {
	margin: 0;
	font-size: var(--gcn-text-2xl);
	font-weight: var(--gcn-weight-semibold);
	line-height: var(--gcn-leading-tight);
	letter-spacing: var(--gcn-tracking-tight);
	color: var(--gcn-text);
	text-wrap: balance;
}

.gcn-event__meta {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: var(--gcn-space-3);
}

.gcn-event__crumbs {
	font-size: var(--gcn-text-sm);
	color: rgba(255, 255, 255, 0.72);
}

.gcn-event__crumbs a {
	color: rgba(255, 255, 255, 0.72);
	text-decoration: none;
}

.gcn-event__crumbs a:hover {
	color: var(--gcn-text-inverse);
}

/* The one action on the page. */
.gcn-event__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 13px var(--gcn-space-8);
	font-size: var(--gcn-text-base);
	font-weight: var(--gcn-weight-semibold);
	color: var(--gcn-brand-contrast);
	background: var(--gcn-brand);
	border-radius: var(--gcn-radius-pill);
	text-decoration: none;
	transition: background-color var(--gcn-duration) var(--gcn-ease);
}

.gcn-event__cta:hover {
	background: var(--gcn-brand-strong);
	color: var(--gcn-brand-contrast);
}

.gcn-event__panel-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--gcn-space-4);
	margin-top: var(--gcn-space-6);
	padding-top: var(--gcn-space-6);
	border-top: 1px solid var(--gcn-rule);
}

@media (max-width: 767px) {

	.gcn-event__panel {
		margin-top: -56px;
		padding: var(--gcn-space-6);
	}

	.gcn-event__panel-head {
		flex-direction: column;
		gap: var(--gcn-space-4);
	}
}

/* A compact registration link on the agenda row: the list is where someone
   decides whether an event is for them, so the action belongs there too. */
.geodir-page-cpt-gd_event .geodir-post .gcn-event__cta {
	padding: 7px var(--gcn-space-4);
	margin-top: var(--gcn-space-3);
	font-size: var(--gcn-text-sm);
}

.gcn-detail__suffix {
	color: var(--gcn-text-muted);
}

/* ==========================================================================
   RSVP — the Events add-on's "Are You Interested?"

   Going / Interested against the signed-in user, with a count and the people
   who have responded. It ships as Bootstrap buttons, restyled here to sit
   beside the Register link as one row of actions.
   ========================================================================== */

.gcn-event__rsvp {
	flex: 1 1 auto;
}

.gcn-event__rsvp .ayi-html-wrap {
	margin-bottom: 0 !important;
}

.gcn-event__rsvp .geodir-ayi-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gcn-space-3);
}

.gcn-event__rsvp .geodir-ayi-btn-rsvp {
	display: inline-flex;
	align-items: center;
	padding: 12px var(--gcn-space-6);
	margin-bottom: 0 !important;
	font-size: var(--gcn-text-base);
	font-weight: var(--gcn-weight-semibold);
	border-radius: var(--gcn-radius-pill);
	text-decoration: none;
	transition:
		background-color var(--gcn-duration) var(--gcn-ease),
		border-color var(--gcn-duration) var(--gcn-ease),
		color var(--gcn-duration) var(--gcn-ease);
}

/* "Going" is the commitment, so it carries the brand; "Interested" is the
   lighter option and stays outlined. */
.gcn-event__rsvp .geodir-ayi-btn-rsvp-yes {
	color: var(--gcn-brand-contrast);
	background: var(--gcn-brand);
	border: 1px solid var(--gcn-brand);
}

.gcn-event__rsvp .geodir-ayi-btn-rsvp-yes:hover {
	background: var(--gcn-brand-strong);
	border-color: var(--gcn-brand-strong);
	color: var(--gcn-brand-contrast);
}

.gcn-event__rsvp .geodir-ayi-btn-rsvp-maybe {
	color: var(--gcn-brand-strong);
	background: var(--gcn-surface);
	border: 1px solid var(--gcn-brand-border);
}

.gcn-event__rsvp .geodir-ayi-btn-rsvp-maybe:hover {
	background: var(--gcn-brand-soft);
	border-color: var(--gcn-brand);
	color: var(--gcn-brand-strong);
}

/* Who has responded. */
.gcn-event__rsvp .geodir-ayi-whois-in {
	margin-top: var(--gcn-space-5);
	padding-top: var(--gcn-space-5);
	border-top: 1px solid var(--gcn-rule);
}

.gcn-event__rsvp .geodir-ayi-whois-in h5 {
	font-size: var(--gcn-text-xs);
	font-weight: var(--gcn-weight-bold);
	letter-spacing: var(--gcn-tracking-wide);
	text-transform: uppercase;
	color: var(--gcn-text-muted);
}

.gcn-event__rsvp .geodir-ayi-whois-in img {
	border-radius: var(--gcn-radius-pill);
}

/* The Register link and the RSVP share one row, wrapping on a narrow screen.
   The Register shortcode's wrapper is dropped out of the layout so its pill is
   the flex item; the RSVP wrapper stays, because it carries the block. */
/* Stacked, not side by side: the RSVP block carries its own button row and the
   list of who has responded, so it cannot share a line with the Register pill
   without one of them being squeezed. Register leads because it is the real
   commitment; the RSVP sits under it as the lighter response. */
.gcn-event__panel-actions {
	flex-direction: column;
	align-items: flex-start;
	gap: var(--gcn-space-5);
}

.gcn-event__panel-actions > .brxe-shortcode:not(.gcn-event__rsvp) {
	display: contents;
}

.gcn-event__rsvp {
	width: 100%;
}

/* Access / price. The workbook asks for this as a card badge, so it is toned
   apart from the format and recurrence chips beside it. */
.gcn-chip--accent {
	color: var(--gcn-accent);
	background: var(--gcn-accent-soft);
	border-color: var(--gcn-accent-border);
}

.geodir-page-cpt-gd_event .geodir-post .gcn-chip {
	margin-right: var(--gcn-space-2);
}
