/* Upcoming Events (hash d3a8f1). Server rendered list laid out with CSS grid. No script. */

.ue-d3a8f1 {
	--ue-c-day: 21%;
	--ue-c-weekday: 21%;
	--ue-c-time: 21%;
	--ue-c-venue: 17%;
	--ue-side: 7%;
	--ue-pad-y: 32px;
	--ue-ev-gap: 18px;
	--ue-border: #e2ded7;
	--ue-bw: 1px;
	--ue-stack-day: 64px;
	--ue-circle: 12px;
	--ue-cta-gap: 20px;
	--ue-circle-shift: 10px;
	--ue-circle-fill: #21304d;
	width: 100%;
	max-width: 100%;
	font-family: var(--e-global-typography-secondary-font-family, inherit);
}

.ue-d3a8f1,
.ue-d3a8f1 *,
.ue-d3a8f1 *::before,
.ue-d3a8f1 *::after {
	box-sizing: border-box;
}

.elementor-widget-upcoming_events_d3a8f1 {
	width: 100%;
}

/* Month heading: a centred band between two hairlines. */
.ue-d3a8f1__month-title {
	margin: 0;
	padding: 18px var(--ue-side);
	text-align: center;
	border-top: var(--ue-bw) solid var(--ue-border);
	border-bottom: var(--ue-bw) solid var(--ue-border);
}

/* The previous month already ends with a line, so the next heading does not add a second one. */
.ue-d3a8f1__month + .ue-d3a8f1__month > .ue-d3a8f1__month-title {
	border-top: 0;
}

.ue-d3a8f1__days,
.ue-d3a8f1__events {
	list-style: none;
	margin: 0;
	padding: 0;
}

/*
 * One day = one row of five tracks: day number, weekday, time, title, venue. The events of the
 * day share those tracks through subgrid, so every column lines up from row to row.
 */
.ue-d3a8f1__day {
	display: grid;
	grid-template-columns: var(--ue-c-day) var(--ue-c-weekday) var(--ue-c-time) minmax(0, 1fr) var(--ue-c-venue);
	align-items: start;
	margin: 0;
	padding: var(--ue-pad-y) var(--ue-side);
	border-bottom: var(--ue-bw) solid var(--ue-border);
}

.ue-d3a8f1__daynum {
	grid-column: 1;
	grid-row: 1;
	align-self: start;
	display: block;
	font-family: var(--e-global-typography-primary-font-family, inherit);
}

.ue-d3a8f1__events {
	grid-column: 2 / -1;
	grid-row: 1;
	align-self: center;
	display: grid;
	grid-template-columns: subgrid;
	row-gap: var(--ue-ev-gap);
}

.ue-d3a8f1__event {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: subgrid;
	align-items: center;
	margin: 0;
	padding: 0;
}

.ue-d3a8f1__weekday {
	grid-column: 1;
}

.ue-d3a8f1__time {
	grid-column: 2;
}

.ue-d3a8f1__title {
	grid-column: 3;
	margin: 0;
	padding-right: 12px;
}

.ue-d3a8f1__venue {
	grid-column: 4;
	text-align: right;
}

.ue-d3a8f1__title a {
	color: inherit;
	text-decoration: none;
}

.ue-d3a8f1__title a:hover {
	text-decoration: underline;
}

.ue-d3a8f1__title a:focus-visible,
.ue-d3a8f1__cta:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* Visually hidden text that carries the full date for screen readers. */
.ue-d3a8f1__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Overflow text and empty message. */
.ue-d3a8f1__note {
	margin: 0;
	padding: 18px var(--ue-side);
	text-align: center;
	border-bottom: var(--ue-bw) solid var(--ue-border);
}

.ue-d3a8f1__note--empty {
	border-top: var(--ue-bw) solid var(--ue-border);
}

/* View Full Calendar: a full width band with a hollow circle either side of the label. */
.ue-d3a8f1__foot {
	border-bottom: var(--ue-bw) solid var(--ue-border);
}

.ue-d3a8f1__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--ue-cta-gap);
	width: 100%;
	padding: 20px var(--ue-side);
	text-decoration: none;
	text-align: center;
}

.ue-d3a8f1__cta::before,
.ue-d3a8f1__cta::after {
	content: '';
	flex: none;
	width: var(--ue-circle);
	height: var(--ue-circle);
	border: 1px solid currentColor;
	border-radius: 50%;
	background-color: transparent;
	transition: transform 0.3s ease, background-color 0.3s ease;
}

/* Hover and keyboard focus: the circles slide outwards and fill. */
.ue-d3a8f1__cta:hover::before,
.ue-d3a8f1__cta:focus-visible::before {
	transform: translateX(calc(var(--ue-circle-shift) * -1));
	background-color: var(--ue-circle-fill);
}

.ue-d3a8f1__cta:hover::after,
.ue-d3a8f1__cta:focus-visible::after {
	transform: translateX(var(--ue-circle-shift));
	background-color: var(--ue-circle-fill);
}

/*
 * Stacked layout (Stack Layout control): the day number sits left, the details stack to the
 * right. Weekday and time share a line on the first event of a day.
 */
@media (max-width: 1024px) {
	.ue-d3a8f1--stack-tablet .ue-d3a8f1__day {
		grid-template-columns: var(--ue-stack-day) minmax(0, 1fr);
		column-gap: 16px;
	}

	.ue-d3a8f1--stack-tablet .ue-d3a8f1__events {
		grid-column: 2;
		grid-template-columns: minmax(0, 1fr);
		align-self: start;
	}

	.ue-d3a8f1--stack-tablet .ue-d3a8f1__event {
		grid-column: 1;
		grid-template-columns: auto minmax(0, 1fr);
		column-gap: 12px;
		row-gap: 2px;
		align-items: baseline;
	}

	.ue-d3a8f1--stack-tablet .ue-d3a8f1__weekday {
		grid-column: 1;
	}

	.ue-d3a8f1--stack-tablet .ue-d3a8f1__time,
	.ue-d3a8f1--stack-tablet .ue-d3a8f1__title,
	.ue-d3a8f1--stack-tablet .ue-d3a8f1__venue {
		grid-column: 1 / -1;
		text-align: left;
		padding-right: 0;
	}

	.ue-d3a8f1--stack-tablet .ue-d3a8f1__event--first .ue-d3a8f1__time {
		grid-column: 2;
	}
}

@media (max-width: 767px) {
	.ue-d3a8f1--stack-mobile .ue-d3a8f1__day {
		grid-template-columns: var(--ue-stack-day) minmax(0, 1fr);
		column-gap: 16px;
	}

	.ue-d3a8f1--stack-mobile .ue-d3a8f1__events {
		grid-column: 2;
		grid-template-columns: minmax(0, 1fr);
		align-self: start;
	}

	.ue-d3a8f1--stack-mobile .ue-d3a8f1__event {
		grid-column: 1;
		grid-template-columns: auto minmax(0, 1fr);
		column-gap: 12px;
		row-gap: 2px;
		align-items: baseline;
	}

	.ue-d3a8f1--stack-mobile .ue-d3a8f1__weekday {
		grid-column: 1;
	}

	.ue-d3a8f1--stack-mobile .ue-d3a8f1__time,
	.ue-d3a8f1--stack-mobile .ue-d3a8f1__title,
	.ue-d3a8f1--stack-mobile .ue-d3a8f1__venue {
		grid-column: 1 / -1;
		text-align: left;
		padding-right: 0;
	}

	.ue-d3a8f1--stack-mobile .ue-d3a8f1__event--first .ue-d3a8f1__time {
		grid-column: 2;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ue-d3a8f1__cta::before,
	.ue-d3a8f1__cta::after {
		transition: none;
	}
}
