/**
 * Events calendar month view and toolbar (see inc/events-calendar.php). Adds to the TEC styles
 * in Appearance → Customize → Additional CSS, which print after this file, so selectors here
 * carry one extra class. Layout follows the course calendar (acsa-course-import plugin).
 * Colours come from the Customizer's --acsa-ev-* tokens (Elementor global variables).
 */

/* ---------- Toolbar (#31): month title left; Today + Previous / Next month right ---------- */

.tribe-common.tribe-common--breakpoint-medium.tribe-events .tribe-events-c-top-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
}

.tribe-common.tribe-common--breakpoint-medium.tribe-events .tribe-events-c-top-bar__datepicker {
	order: -1;
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
}

.tribe-common.tribe-common--breakpoint-medium.tribe-events .tribe-events-c-top-bar__today-button {
	order: 1;
	margin: 0;
}

.tribe-common.tribe-common--breakpoint-medium.tribe-events .tribe-events-c-top-bar__nav {
	order: 2;
	margin: 0;
}

/* TEC's actions slot is empty here but still took a gap at the right end of the row. */
.tribe-common.tribe-events .tribe-events-c-top-bar__actions:not(:has(*)) {
	display: none;
}

/* Previous / Next: one outlined group, each with its visible label (TEC's own aria-label). */
.tribe-common.tribe-events .tribe-events-c-top-bar__nav-list {
	display: flex;
}

.tribe-common.tribe-events .tribe-events-c-top-bar__nav-list-item + .tribe-events-c-top-bar__nav-list-item {
	margin-left: -1px;
}

.tribe-common.tribe-events .tribe-events-c-top-bar__nav-link.tribe-common-c-btn-icon {
	position: relative;
	gap: 6px;
	width: auto;
	height: 44px;
	padding: 0 14px;
	background: #FFFFFF;
	font-family: var(--acsa-ev-font);
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	color: var(--acsa-ev-navy);
	text-decoration: none;
}

.tribe-common.tribe-events .tribe-events-c-top-bar__nav-link::after {
	content: attr(aria-label);
}

.tribe-common.tribe-events .tribe-events-c-top-bar__nav-link--next {
	flex-direction: row-reverse;
}

.tribe-common.tribe-events .tribe-events-c-top-bar__nav-link:hover:not(:disabled),
.tribe-common.tribe-events .tribe-events-c-top-bar__nav-link:focus-visible {
	z-index: 1;
}

.tribe-common.tribe-events .tribe-events-c-top-bar__nav-link .tribe-common-c-btn-icon__icon-svg {
	flex: none;
	width: 12px;
	height: 12px;
}

/* Today: the gold primary button, as on the course calendar, same height as the group. */
.tribe-common.tribe-common--breakpoint-medium.tribe-events .tribe-events-c-top-bar__today-button,
.tribe-common.tribe-events .tribe-events-c-top-bar__today-button.tribe-common-c-btn-border-small {
	height: 44px;
	min-height: 0;
	padding-block: 0;
	line-height: 42px;
	border-color: var(--acsa-ev-gold);
	background: var(--acsa-ev-gold);
	font-weight: 700;
	color: var(--acsa-ev-navy);
}

.tribe-common.tribe-common--breakpoint-medium.tribe-events .tribe-events-c-top-bar__today-button:hover,
.tribe-common.tribe-events .tribe-events-c-top-bar__today-button.tribe-common-c-btn-border-small:hover {
	border-color: var(--acsa-ev-gold-hover);
	background: var(--acsa-ev-gold-hover);
}

.tribe-common.tribe-events .tribe-events-c-top-bar__nav-link:focus-visible,
.tribe-common.tribe-events .tribe-events-c-top-bar__today-button:focus-visible {
	outline: 2px solid var(--acsa-ev-navy);
	outline-offset: 2px;
}

/* Filter Bar sets width: 100% on every child of the layout, including the visually hidden
   "Calendar of Events" heading, which then sticks out and scrolls the page sideways on tablets. */
.tribe-events--filter-bar-vertical.tribe-common--breakpoint-medium .tribe-events-l-container > .tribe-common-a11y-visual-hide {
	width: 1px;
}

/* ---------- Month grid (#30): compact cells, readable titles ---------- */

/* Day names on a grey band, like the course calendar. */
.tribe-common.tribe-events .tribe-events-calendar-month__header {
	background: var(--acsa-ev-grey);
	border: 1px solid var(--acsa-ev-border);
	border-bottom: 0;
}

.tribe-common.tribe-events .tribe-events-calendar-month__header-column-title {
	padding: 10px;
}

.tribe-common.tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-month__day {
	min-height: 0;
}

.tribe-common.tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-month__day-cell--desktop {
	min-height: 104px;
	padding: 6px;
}

.tribe-common.tribe-events .tribe-events-calendar-month__calendar-event,
.tribe-common.tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-month__calendar-event {
	margin-top: 4px;
	padding: 4px 6px;
}

.tribe-common.tribe-events .tribe-events-calendar-month__calendar-event-details {
	padding: 0;
}

/* Start time only (the end time is in the hover card), bold like the course calendar. */
.tribe-common.tribe-events .tribe-events-calendar-month__calendar-event-datetime {
	margin-bottom: 1px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.3;
	white-space: nowrap;
	color: var(--acsa-ev-navy);
}

.tribe-common.tribe-events .tribe-events-calendar-month__calendar-event-datetime-separator,
.tribe-common.tribe-events .tribe-events-calendar-month__calendar-event-datetime-separator + time {
	display: none;
}

/* Titles: up to two lines, then an ellipsis; a word longer than the cell wraps instead of being clipped. */
.tribe-common.tribe-events .tribe-events-calendar-month__calendar-event-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	overflow-wrap: break-word;
}

.tribe-common.tribe-events .tribe-events-calendar-month__calendar-event-title-link {
	font-weight: 500;
	line-height: 1.3;
}

.tribe-common.tribe-events .tribe-events-calendar-month__more-events {
	margin-top: 4px;
}

.tribe-common.tribe-events .tribe-events-calendar-month__more-events-link {
	font-size: 12px;
}

/* ---------- Page layout: match the course calendar (acsa-course-import) ---------- */

/* TEC's own container adds 96px / 160px vertical and 42px side padding inside the Elementor
   section, which already has the site's section padding: the calendar sat ~100px lower and
   narrower than on the course calendar. Let the Elementor section set the width and spacing. */
.tribe-common.tribe-events .tribe-events-l-container {
	max-width: none;
	padding: 0;
}

/* Desktop: filters in a 300px column on the left, search + toolbar + calendar on the right,
   both starting at the same line (course calendar: Filters | Upcoming Sessions). */
@media (min-width: 1200px) {
	.tribe-common.tribe-events--filter-bar-vertical.tribe-common--breakpoint-medium .tribe-events-l-container {
		display: grid;
		grid-template-columns: 300px minmax(0, 1fr);
		align-items: start;
		gap: 0 40px;
	}

	.tribe-common.tribe-events--filter-bar-vertical.tribe-common--breakpoint-medium .tribe-events-l-container > * {
		grid-column: 2;
		width: auto;
	}

	.tribe-common.tribe-events--filter-bar-vertical.tribe-common--breakpoint-medium .tribe-events-l-container > .tribe-filter-bar,
	.tribe-common.tribe-common--breakpoint-medium .tribe-filter-bar--vertical.tribe-filter-bar {
		grid-column: 1;
		grid-row: 1 / span 20;
		width: auto;
		margin: 0;
	}

	.tribe-common.tribe-events--filter-bar-vertical.tribe-common--breakpoint-medium .tribe-events-l-container .tribe-filter-bar--open ~ .tribe-events-calendar-month,
	.tribe-common.tribe-events--filter-bar-vertical.tribe-common--breakpoint-medium .tribe-events-l-container .tribe-filter-bar--open ~ .tribe-events-calendar-list,
	.tribe-common.tribe-events--filter-bar-vertical.tribe-common--breakpoint-medium .tribe-events-l-container .tribe-filter-bar--open ~ .tribe-events-calendar-latest-past {
		width: auto;
	}
}

/* "Filters" title with the navy rule under it, as on the course calendar. */
.tribe-common .tribe-filter-bar .tribe-filter-bar__form-heading {
	margin: 0;
	padding-bottom: 14px;
	border-bottom: 2px solid var(--acsa-ev-navy);
}

/* Filter toggles: TEC draws a browser focus box on every click. No box; keyboard users still
   get a gold underline on the filter name. */
.tribe-common .tribe-filter-bar .tribe-filter-bar-c-filter__toggle:focus,
.tribe-common .tribe-filter-bar .tribe-filter-bar-c-filter--accordion .tribe-filter-bar-c-filter__toggle:focus {
	outline: none;
	box-shadow: none;
}

.tribe-common .tribe-filter-bar .tribe-filter-bar-c-filter__toggle:focus-visible .tribe-filter-bar-c-filter__toggle-label {
	text-decoration: underline;
	text-decoration-color: var(--acsa-ev-gold);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

/* ---------- Tablet: filters above the calendar so the grid gets the full width ---------- */

@media (max-width: 1199px) {
	.tribe-common.tribe-common--breakpoint-medium .tribe-filter-bar--vertical.tribe-filter-bar {
		width: 100%;
		margin: 0 0 24px;
	}

	.tribe-common.tribe-events--filter-bar-vertical.tribe-common--breakpoint-medium .tribe-events-l-container .tribe-filter-bar--open ~ .tribe-events-calendar-month,
	.tribe-common.tribe-events--filter-bar-vertical.tribe-common--breakpoint-medium .tribe-events-l-container .tribe-filter-bar--open ~ .tribe-events-calendar-list,
	.tribe-common.tribe-events--filter-bar-vertical.tribe-common--breakpoint-medium .tribe-events-l-container .tribe-filter-bar--open ~ .tribe-events-calendar-latest-past {
		width: 100%;
	}

	.tribe-common.tribe-common--breakpoint-medium .tribe-filter-bar--vertical .tribe-filter-bar__filters {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		align-items: start;
		column-gap: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tribe-common.tribe-events .tribe-events-calendar-month__calendar-event {
		transition: none;
	}

	.tribe-common.tribe-events .tribe-events-calendar-month__calendar-event:hover {
		transform: none;
	}
}

/* ---------- Month grid: day names "MON TUE …" like the course calendar ---------- */

/* TEC prints one letter ("M") on screen; each column carries the short name ("Mon") in its
   abbr attribute. From tablet up, show that instead (screen readers keep "Monday"). */
.tribe-common.tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-month__header-column-title > [aria-hidden="true"] {
	display: none;
}

.tribe-common.tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-month__header-column::before {
	content: attr(abbr);
	display: block;
	padding: 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-align: center;
	text-transform: uppercase;
	color: var(--acsa-ev-muted);
}

.tribe-common.tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-month__header-column-title {
	padding: 0;
}

/* ---------- List view: cards like the course calendar's list ---------- */

/* Month heading with the navy rule (course list: date heading). */
.tribe-common.tribe-events .tribe-events-calendar-list__month-separator {
	display: block;
	margin: 28px 0 14px;
	padding: 0 0 8px;
	border-bottom: 2px solid var(--acsa-ev-navy);
}

.tribe-common.tribe-events .tribe-events-calendar-list__month-separator:first-child {
	margin-top: 0;
}

.tribe-common.tribe-events .tribe-events-calendar-list__month-separator::after {
	display: none;
}

.tribe-common.tribe-events .tribe-events-calendar-list__month-separator-text {
	font-size: 13px;
	letter-spacing: .08em;
}

/* Row: date tile + card. TEC's grid gutters (negative margins) pushed rows past the edge. */
.tribe-common.tribe-events .tribe-events-calendar-list__event-row {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 16px;
	margin: 0 0 14px;
	padding: 0;
}

.tribe-common.tribe-events .tribe-events-calendar-list__event-date-tag {
	width: auto;
	margin: 0;
	padding: 0;
}

.tribe-common.tribe-events .tribe-events-calendar-list__event-date-tag-datetime {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 10px 0;
	border: 1px solid var(--acsa-ev-border);
	background: var(--acsa-ev-grey);
}

.tribe-common.tribe-events .tribe-events-calendar-list__event-date-tag-weekday {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--acsa-ev-muted);
}

.tribe-common.tribe-events .tribe-events-calendar-list__event-date-tag-daynum {
	font-size: 26px;
	font-weight: 500;
	line-height: 1.1;
}

.tribe-common.tribe-events .tribe-events-calendar-list__event-wrapper {
	width: auto;
	margin: 0;
	padding: 0;
}

/* TEC's grid gutters, row border and spacing (more specific rules than the ones above). */
.tribe-common.tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-list .tribe-events-calendar-list__event-row {
	margin: 0 0 14px;
	padding: 0;
	border: 0;
}

.tribe-common.tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-list .tribe-events-calendar-list__event-wrapper,
.tribe-common.tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-list .tribe-events-calendar-list__event-featured-image-wrapper,
.tribe-common.tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-list .tribe-events-calendar-list__event-details,
.tribe-common.tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-list .tribe-events-calendar-list__event-date-tag {
	margin: 0;
	padding-right: 0;
	padding-left: 0;
}

.tribe-common.tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-list .tribe-events-calendar-list__event-details {
	padding: 18px 20px;
}

.tribe-common.tribe-events .tribe-events-calendar-list .tribe-events-calendar-list__event-row {
	border: 0;
}

/* The card: details on the left, image on the right (30%), gold rule like the course chips. */
.tribe-common.tribe-events .tribe-events-calendar-list__event {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 30%;
	margin: 0;
	padding: 0;
	border: 1px solid var(--acsa-ev-border);
	border-left: 3px solid var(--tec-color-category-primary, var(--acsa-ev-gold));
	background: #FFFFFF;
	transition: box-shadow .2s, border-color .2s;
}

.tribe-common.tribe-events .tribe-events-calendar-list__event:hover {
	box-shadow: 0 6px 16px rgba(23, 40, 73, .1);
}

.tribe-common.tribe-events .tribe-events-calendar-list__event-featured-image-wrapper {
	grid-column: 2;
	grid-row: 1;
	width: auto;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: var(--acsa-ev-navy);
}

.tribe-common.tribe-events .tribe-events-calendar-list__event-featured-image-link,
.tribe-common.tribe-events .tribe-events-calendar-list__event-featured-image {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 170px;
	object-fit: cover;
}

.tribe-common.tribe-events .tribe-events-calendar-list__event-details {
	grid-column: 1;
	grid-row: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas: "header header" "desc desc" "rule rule" "cost action";
	align-content: start;
	align-items: end;
	gap: 0 16px;
	width: auto;
	margin: 0;
	padding: 18px 20px;
}

.tribe-common.tribe-events .tribe-events-calendar-list__event-header {
	grid-area: header;
	display: flex;
	flex-direction: column;
}

/* Category chip first, as on the course cards. */
.tribe-common.tribe-events .tribe-events-calendar-list__event-header .tec-events-calendar-list__event-categories {
	order: -1;
	margin: 0 0 8px;
}

.tribe-common.tribe-events .tribe-events-calendar-list__event-title {
	margin: 0 0 6px;
}

.tribe-common.tribe-events .tribe-events-calendar-list__event-title-link {
	font-size: 18px;
	line-height: 1.3;
}

.tribe-common.tribe-events .tribe-events-calendar-list__event-datetime-wrapper,
.tribe-common.tribe-events .tribe-events-calendar-list__event-venue {
	margin: 0 0 4px;
	font-size: 14px;
	color: var(--acsa-ev-muted);
}

.tribe-common.tribe-events .tribe-events-calendar-list__event-description {
	grid-area: desc;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 6px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--acsa-ev-muted);
}

.tribe-common.tribe-events .tribe-events-calendar-list__event-description p {
	margin: 0;
}

/* Bottom row: cost on the left, button on the right, under one thin rule. */
.tribe-common.tribe-events .tribe-events-calendar-list__event-details::after {
	content: "";
	grid-area: rule;
	margin-top: 14px;
	border-top: 1px solid var(--acsa-ev-border);
}

.tribe-common.tribe-events .tribe-events-calendar-list__event-cost {
	grid-area: cost;
	margin: 0;
	padding-top: 12px;
}

.tribe-common.tribe-events .tribe-events-calendar-list__event-cost::before {
	content: "Cost";
	display: block;
	margin-bottom: 2px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--acsa-ev-blue);
}

.tribe-common.tribe-events .tribe-events-calendar-list__event-cost .tribe-events-c-small-cta__price {
	font-size: 18px;
	font-weight: 700;
}

.acsa-ev-list__action {
	grid-area: action;
	padding-top: 12px;
}

/* TEC's link styles (.tribe-common a) beat the base button rules inside the calendar. */
.tribe-common .acsa-ev-list__action .acsa-event-cta {
	display: inline-flex;
	background: var(--acsa-ev-gold);
	font-weight: 700;
	color: var(--acsa-ev-navy);
	text-decoration: none;
}

.tribe-common .acsa-ev-list__action .acsa-event-cta:hover,
.tribe-common .acsa-ev-list__action .acsa-event-cta:focus {
	background: var(--acsa-ev-gold-hover);
	color: var(--acsa-ev-navy);
}

.acsa-ev-list__action .acsa-event-cta {
	width: auto;
	min-height: 38px;
	padding: 8px 16px;
	font-size: 14px;
	white-space: nowrap;
}

.acsa-ev-list__action .acsa-event-cta[target="_blank"]::after {
	width: 12px;
	height: 12px;
}

/* Phones: image on top, full width; date tile stays beside the card. */
.tribe-common.tribe-events:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-list__event-row {
	grid-template-columns: 52px minmax(0, 1fr);
	gap: 10px;
}

.tribe-common.tribe-events:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-list__event {
	grid-template-columns: minmax(0, 1fr);
}

.tribe-common.tribe-events:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-list__event-featured-image-wrapper {
	grid-column: 1;
	grid-row: 1;
	aspect-ratio: 16 / 9;
}

.tribe-common.tribe-events:not(.tribe-common--breakpoint-medium) .acsa-ev-list__placeholder {
	aspect-ratio: 3 / 1;
}

.tribe-common.tribe-events:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-list__event-featured-image-link,
.tribe-common.tribe-events:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-list__event-featured-image {
	min-height: 0;
}

.tribe-common.tribe-events:not(.tribe-common--breakpoint-medium) .tribe-events-calendar-list__event-details {
	grid-row: 2;
	padding: 14px 16px;
}

/* Previous / Next events (list pagination): outlined buttons like the toolbar. */
.tribe-common.tribe-events .tribe-events-c-nav {
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--acsa-ev-border);
}

.tribe-common.tribe-events .tribe-events-c-nav__prev,
.tribe-common.tribe-events .tribe-events-c-nav__next {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 44px;
	padding: 0 14px;
	border: 1px solid var(--acsa-ev-border);
	background: #FFFFFF;
	text-decoration: none;
}

.tribe-common.tribe-events a.tribe-events-c-nav__prev:hover,
.tribe-common.tribe-events a.tribe-events-c-nav__next:hover {
	border-color: var(--acsa-ev-navy);
	background: var(--acsa-ev-grey);
}

.tribe-common.tribe-events .tribe-events-c-nav__prev:disabled,
.tribe-common.tribe-events .tribe-events-c-nav__next:disabled {
	opacity: .45;
}

/* ---------- Subscribe to calendar ---------- */

.tribe-common.tribe-events .tribe-events-c-subscribe-dropdown__container {
	justify-content: flex-end;
	margin-top: 24px;
}

.tribe-common.tribe-events .tribe-events-c-subscribe-dropdown__button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 16px;
	border: 1px solid var(--acsa-ev-border);
	border-radius: 0;
	background: #FFFFFF;
}

.tribe-common.tribe-events .tribe-events-c-subscribe-dropdown__button:hover,
.tribe-common.tribe-events .tribe-events-c-subscribe-dropdown__button:focus-within {
	border-color: var(--acsa-ev-navy);
	background: var(--acsa-ev-grey);
}

/* The inner button drew its own focus box around the text; the outer box shows focus instead. */
.tribe-common.tribe-events .tribe-events-c-subscribe-dropdown__button-text,
.tribe-common.tribe-events .tribe-events-c-subscribe-dropdown__button-text:focus {
	padding: 0;
	outline: none;
	box-shadow: none;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	color: var(--acsa-ev-navy);
}

.tribe-common.tribe-events .tribe-events-c-subscribe-dropdown__button:has(:focus-visible) {
	outline: 2px solid var(--acsa-ev-navy);
	outline-offset: 2px;
}

.tribe-common.tribe-events .tribe-events-c-subscribe-dropdown__content {
	padding: 6px 0;
	border: 1px solid var(--acsa-ev-border);
	border-radius: 0;
	box-shadow: 0 10px 24px rgba(23, 40, 73, .12);
}

.tribe-common.tribe-events .tribe-events-c-subscribe-dropdown__list-item {
	margin: 0;
	padding: 0;
}

.tribe-common.tribe-events .tribe-events-c-subscribe-dropdown__list-item-link {
	display: block;
	padding: 8px 18px;
	font-size: 14px;
	font-weight: 500;
	color: var(--acsa-ev-navy);
}

.tribe-common.tribe-events .tribe-events-c-subscribe-dropdown__list-item-link:hover,
.tribe-common.tribe-events .tribe-events-c-subscribe-dropdown__list-item-link:focus {
	background: var(--acsa-ev-grey);
	color: var(--acsa-ev-navy);
}

/* ---------- Event page: previous / next event (Elementor "Event Navigation" widget) ---------- */
/* The widget's own styles use the #tribe-events-pg-template ID, so these do too. */

.single-tribe_events #tribe-events-pg-template ul.tec-events-elementor-event-widget__navigation--subnav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.single-tribe_events #tribe-events-pg-template ul.tec-events-elementor-event-widget__navigation--subnav > li {
	margin: 0;
}

.single-tribe_events #tribe-events-pg-template li.tec-events-elementor-event-widget__navigation--next {
	grid-column: 2;
	text-align: right;
}

.single-tribe_events #tribe-events-pg-template .tec-events-elementor-event-widget__navigation--subnav li a {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	column-gap: 10px;
	height: 100%;
	padding: 12px 16px;
	border: 1px solid var(--border, #D7DBE3);
	background: #FFFFFF;
	font-family: var(--Primary, "Ubuntu"), sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.35;
	color: var(--Dark-blue, #172849);
	text-decoration: none;
	transition: border-color .2s, background-color .2s;
}

.single-tribe_events #tribe-events-pg-template li.tec-events-elementor-event-widget__navigation--next > a {
	grid-template-columns: minmax(0, 1fr) auto;
}

/* Small label above the title; it is part of the link text for screen readers too. */
.single-tribe_events #tribe-events-pg-template .tec-events-elementor-event-widget__navigation--subnav li a::before {
	grid-column: 1 / -1;
	margin-bottom: 2px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--Grey-text, #5B6472);
}

.single-tribe_events #tribe-events-pg-template li.tec-events-elementor-event-widget__navigation--previous > a::before {
	content: "Previous event";
}

.single-tribe_events #tribe-events-pg-template li.tec-events-elementor-event-widget__navigation--next > a::before {
	content: "Next event";
}

.single-tribe_events #tribe-events-pg-template .tec-events-elementor-event-widget__navigation--subnav li a svg {
	width: 8px;
	height: 14px;
	color: var(--Gold, #F4C447);
	fill: currentColor;
}

.single-tribe_events #tribe-events-pg-template .tec-events-elementor-event-widget__navigation--subnav li a svg path {
	fill: currentColor;
}

.single-tribe_events #tribe-events-pg-template .tec-events-elementor-event-widget__navigation--subnav li a:hover {
	border-color: var(--Dark-blue, #172849);
	background: var(--grey-bg, #F5F6F8);
}

.single-tribe_events #tribe-events-pg-template .tec-events-elementor-event-widget__navigation--subnav li a:focus-visible {
	outline: 2px solid var(--Dark-blue, #172849);
	outline-offset: 2px;
}

@media (max-width: 767px) {
	.single-tribe_events #tribe-events-pg-template ul.tec-events-elementor-event-widget__navigation--subnav {
		grid-template-columns: minmax(0, 1fr);
	}

	.single-tribe_events #tribe-events-pg-template li.tec-events-elementor-event-widget__navigation--next {
		grid-column: 1;
	}
}

/* ---------- Event page (#32): the participation button (inc/event-cta.php) ---------- */

.acsa-event-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 48px;
	padding: 12px 20px;
	background: var(--Gold, #F4C447);
	font-family: var(--Primary, "Ubuntu"), sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	color: var(--Dark-blue, #172849);
	text-decoration: none;
	transition: background-color .2s;
}

.acsa-event-cta[target="_blank"]::after {
	content: "";
	flex: none;
	width: 14px;
	height: 14px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v6H4V6h6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v6H4V6h6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.acsa-event-cta:hover,
.acsa-event-cta:focus {
	background: #E8B52E;
	color: var(--Dark-blue, #172849);
}

.acsa-event-cta:focus-visible {
	outline: 2px solid var(--Dark-blue, #172849);
	outline-offset: 2px;
}

/* No button for this event → no empty gap where the shortcode sits. */
.single-tribe_events .elementor-widget-shortcode:has(.elementor-shortcode:empty) {
	display: none;
}

/* Event Details rows: TEC's widgets print nothing when the event has no value (e.g. no
   organizer), which left a label on its own. Hide those rows. */
.single-tribe_events .attribute:not(:has(.elementor-widget)) {
	display: none;
}

/* "Related Events" heading with no related events under it (section 12a7070 in the event
   templates, Elementor 1427 / 2083). */
.single-tribe_events .elementor-element-12a7070:not(:has(.elementor-widget-tec_events_elementor_widget_event_related)) {
	display: none;
}
