/*
 * NEMRA Blocks — Events List widget (V2, Figma 8EpY00T4Y4D6PW3YVc652t 571:23206).
 * Section sits on the #f6f6f6 page ground. Divider + dot eyebrow, then a
 * two-column layout: white event cards with rounded-square date badges on the
 * left; filter sidebar (grid/calendar toggle, two filter panels, member
 * CTA panel) on the right.
 */

/* The V2 comp puts this section on the #f6f6f6 page ground. The Elementor
 * container currently carries a white background, so override it here. */
.e-con.e-parent:has(.nemra-events-list) {
	background-color: #f6f6f6 !important;
}

.nemra-events-list {
	width: 100%;
	max-width: 1312px;
	margin: 0 auto;
	font-family: var(--nemra-font-body, 'Poppins', system-ui, sans-serif);
	color: var(--nemra-dark, #17171a);
	box-sizing: border-box;
}

.nemra-events-list *,
.nemra-events-list *::before,
.nemra-events-list *::after {
	box-sizing: border-box;
}

/* Divider + eyebrow: 1px top rule, 24px below it an 8px blue dot and a
 * 10px/500 uppercase label at 64% dark. 32px to the content below. */
.nemra-events-list__eyebrow {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 32px;
	padding-top: 24px;
	border-top: 1px solid rgba(23, 23, 26, 0.16);
	text-align: left;
	font-size: 10px;
	font-weight: 500;
	line-height: normal;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: rgba(23, 23, 26, 0.64);
}

.nemra-events-list__eyebrow::before {
	content: "";
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: var(--nemra-blue, #2173b3);
}

.nemra-events-list__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	gap: 24px;
	align-items: start;
}

/* Mobile "Filter by" dropdown (mobile comp 797:23302) — the shared
 * nemra-dropdown component carries the pill + panel styling; this wrapper
 * only orders it and gates it to mobile (desktop filters via the sidebar's
 * checkbox panels, so it only shows below 992px). */
.nemra-events-list__dropdown {
	display: none;
}

/* ---------- Rows ------------------------------------------------------ */

.nemra-events-list__rows {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.nemra-events-list__row {
	display: flex;
	align-items: center;
	gap: 32px;
	padding: 20px 32px;
	background-color: var(--nemra-light, #fcfdfd);
	border-radius: 5px;
}

.nemra-events-list__row[hidden] {
	display: none;
}

/* Date badge — 77x77 rounded square. Was a 77x94 pennant (point at bottom
 * centre); the client asked for the rounded-square shape the rest of the
 * widget set uses, so the clip-path is gone and the badge takes the same
 * 10px radius as the calendar header below. Height drops with the point:
 * the two lines measure ~55px, centred rather than top-padded.
 * Alternating blue/green fills, white type: Poppins month on top,
 * Libre Baskerville day number below. */

.nemra-events-list__date {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 77px;
	height: 77px;
	padding: 0;
	gap: 0;
	background-color: var(--nemra-blue-vibrant, #0074cf);
	border-radius: 10px;
}

.nemra-events-list__row:nth-child(even) .nemra-events-list__date {
	background-color: var(--nemra-green, #4c7f39);
}

.nemra-events-list__date-label {
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	line-height: 1.1;
	color: var(--nemra-light, #fcfdfd);
	text-align: center;
}

.nemra-events-list__date-day {
	font-family: var(--nemra-font-heading, 'Libre Baskerville', Georgia, serif);
	font-size: 32px;
	font-weight: 400;
	line-height: 1.25;
	letter-spacing: -1px;
	color: var(--nemra-light, #fcfdfd);
	text-align: center;
}

.nemra-events-list__content {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	flex: 1 1 auto;
}

.nemra-events-list__row-eyebrow {
	margin: 0;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: var(--nemra-blue, #2173b3);
	line-height: 1.5;
}

/* Comp 571:23206: event card titles are serif regular. */
.nemra-events-list__title {
	margin: 0;
	font-family: var(--nemra-font-heading, 'Libre Baskerville', Georgia, serif);
	font-size: 26px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 0;
	color: var(--nemra-dark, #17171a);
}

.nemra-events-list__title a {
	color: inherit;
	text-decoration: none;
	transition: color 150ms ease;
}

.nemra-events-list__title a:hover,
.nemra-events-list__title a:focus-visible {
	color: var(--nemra-blue, #2173B3);
	text-decoration: none;
}

.nemra-events-list__meta {
	margin: 0;
	font-size: 14px;
	color: var(--nemra-muted, #6b6b6b);
	line-height: 1.6;
}

/* ---------- Sidebar --------------------------------------------------- */

.nemra-events-list__sidebar {
	display: flex;
	flex-direction: column;
	gap: 14px;
	position: sticky;
	top: 100px;
}

/* Grid / Calendar toggle — white shell (4px padding, radius 5); active
 * segment is solid blue with white icon + label. */
.nemra-events-list__tabs {
	display: inline-flex;
	align-self: flex-start;
	gap: 2px;
	background-color: var(--nemra-light, #fcfdfd);
	border: 0;
	padding: 4px;
	border-radius: 5px;
}

.nemra-events-list__tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 7px 16px;
	background: transparent;
	border: 0;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.5;
	font-family: inherit;
	color: var(--nemra-muted, #6b6b6b);
	cursor: pointer;
	transition: background-color 150ms ease, color 150ms ease;
}

.nemra-events-list__tab.is-active {
	background-color: var(--nemra-blue, #2173b3);
	color: #ffffff;
}

.nemra-events-list__tab-icon {
	display: inline-flex;
	width: 14px;
	height: 14px;
	color: currentColor;
}

.nemra-events-list__tab-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

/* Filter panels — white cards, radius 6, 20px padding. */
.nemra-events-list__filter {
	background-color: var(--nemra-light, #fcfdfd);
	border: 0;
	border-radius: 6px;
	padding: 20px;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nemra-events-list__filter legend {
	float: left;
	width: 100%;
	padding: 0;
	margin: 0 0 8px;
	font-size: 10px;
	font-weight: 500;
	line-height: normal;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: rgba(23, 23, 26, 0.64);
}

/* Filter rows: active = solid blue pill with white label + count chip;
 * inactive = light gray bordered row at 60% opacity. The checkbox itself
 * is visually hidden — the label row is the click target. */
.nemra-events-list__filter-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 13px;
	background-color: #f4f4f4;
	border: 1px solid #eaeaea;
	border-radius: 5px;
	font-size: 12px;
	font-weight: 400;
	line-height: 16px;
	color: var(--nemra-dark, #17171a);
	opacity: 0.6;
	cursor: pointer;
	transition: opacity 150ms ease, background-color 150ms ease, color 150ms ease;
}

.nemra-events-list__filter-row:hover {
	opacity: 1;
}

.nemra-events-list__filter-row input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.nemra-events-list__filter-row:has(input:checked) {
	background-color: var(--nemra-blue, #2173b3);
	border-color: rgba(252, 253, 253, 0.08);
	color: var(--nemra-light, #fcfdfd);
	opacity: 1;
}

.nemra-events-list__filter-label {
	flex: 1 1 auto;
	min-width: 0;
}

.nemra-events-list__filter-count {
	flex: 0 0 auto;
	font-size: 12px;
	line-height: 16px;
	color: rgba(23, 23, 26, 0.48);
	font-weight: 400;
}

.nemra-events-list__filter-row:has(input:checked) .nemra-events-list__filter-count {
	color: var(--nemra-light, #fcfdfd);
}

/* ---------- Sidebar CTA card ----------------------------------------- */

.nemra-events-list__cta-card {
	background-color: var(--nemra-light, #fcfdfd);
	border: 0;
	border-radius: 6px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nemra-events-list__cta-heading {
	margin: 0;
	font-size: 10px;
	font-weight: 500;
	line-height: normal;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: rgba(23, 23, 26, 0.64);
}

.nemra-events-list__cta-body {
	margin: 0;
	font-size: 12px;
	line-height: 16px;
	color: rgba(23, 23, 26, 0.64);
}

.nemra-events-list__cta-btn {
	display: flex;
	align-self: stretch;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 8px 12px;
	background-color: var(--nemra-green, #4c7f39);
	border: 1px solid rgba(252, 253, 253, 0.08);
	color: #ffffff;
	border-radius: 5px;
	font-size: 12px;
	font-weight: 400;
	line-height: 16px;
	text-decoration: none;
	transition: background-color 150ms ease, color 150ms ease;
}

.nemra-events-list__cta-btn:hover,
.nemra-events-list__cta-btn:focus-visible {
	background-color: var(--neutral-dark-88, rgba(23, 23, 26, 0.88));
	color: #ffffff;
	text-decoration: none;
	outline: 0;
}

/* V2 comp has no arrow on the CTA button. */
.nemra-events-list__cta-arrow {
	display: none;
}

/* ---------- Responsive ----------------------------------------------- */

@media (max-width: 991px) {
	/* Mobile comp 797:23302 reorders the block: filter dropdown, then the
	 * Grid/Calendar toggle, then the cards, then the member CTA — and drops
	 * the checkbox panels in favor of the dropdown. display:contents
	 * promotes the sidebar's children to body flex items so they can
	 * interleave with the views via order. */
	.nemra-events-list__eyebrow {
		margin-bottom: 24px;
	}
	.nemra-events-list__body {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}
	.nemra-events-list__sidebar {
		display: contents;
	}
	.nemra-events-list__dropdown {
		display: block;
		order: 1;
	}
	/* Comp toggle is 46px tall (4px shell + 38px tabs), 5px icon-label gap,
	 * 2px radius on the active fill, #6b6b6b inactive labels. */
	.nemra-events-list__tabs {
		order: 2;
		display: flex;
		align-self: stretch;
	}
	.nemra-events-list__tab {
		flex: 1 1 0;
		gap: 5px;
		padding: 10px 16px;
		color: #6b6b6b;
	}
	.nemra-events-list__tab.is-active {
		border-radius: 2px;
		color: #ffffff;
	}
	.nemra-events-list__views {
		order: 3;
		margin-top: 12px; /* 24px below the toggle */
	}
	.nemra-events-list__filter {
		display: none;
	}
	.nemra-events-list__cta-card {
		order: 4;
		margin-top: 4px; /* 16px below the cards */
		padding: 16px;
	}
}

@media (max-width: 599px) {
	/* Mobile comp card: 12px padding, 16px gap. Badge follows the desktop
	 * rounded square at the comp's 61px width. */
	.nemra-events-list__row {
		gap: 16px;
		padding: 12px;
	}
	.nemra-events-list__date {
		width: 61px;
		height: 61px;
		border-radius: 8px;
	}
	.nemra-events-list__date-label {
		font-size: 11px;
	}
	.nemra-events-list__date-day {
		font-size: 25px;
	}
	.nemra-events-list__title {
		font-size: 20px;
		line-height: 24px;
	}
}

/* ==========================================================================
   View toggle — Grid vs Calendar.
   The widget renders BOTH views; only the active one is visible. Driven
   by `is-active` set on tab + view (default state set in PHP from the
   `default_view` widget setting; JS swaps on tab click).
   ========================================================================== */

.nemra-events-list__views {
	min-width: 0;
}

.nemra-events-list__view {
	display: none;
}

.nemra-events-list__view.is-active {
	display: block;
}

/* ==========================================================================
   Calendar view — 7-column month grid with day numbers + event pills.
   V2: blue header band (radius 10 top), white cells, #eaeaea hairlines,
   green-light / blue-vibrant event pills.
   ========================================================================== */

.nemra-events-list__cal {
	width: 100%;
	border: 0;
	border-radius: 10px;
	overflow: hidden;
	background-color: var(--nemra-light, #fcfdfd);
	box-sizing: border-box;
}

.nemra-events-list__cal-header {
	display: grid;
	grid-template-columns: repeat( 7, minmax( 0, 1fr ) );
	background-color: var(--nemra-blue, #2173b3);
	border-bottom: 1px solid rgba(252, 253, 253, 0.04);
}

.nemra-events-list__cal-weekday {
	padding: 8px;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0;
	text-transform: uppercase;
	color: #ffffff;
	text-align: center;
	border-right: 0;
}

.nemra-events-list__cal-row {
	display: grid;
	grid-template-columns: repeat( 7, minmax( 0, 1fr ) );
}

.nemra-events-list__cal-cell {
	min-height: 123px;
	padding: 8px;
	border-right: 1px solid #eaeaea;
	border-bottom: 1px solid #eaeaea;
	display: flex;
	flex-direction: column;
	gap: 6px;
	background-color: var(--nemra-light, #fcfdfd);
	position: relative;
}

.nemra-events-list__cal-cell:last-child {
	border-right: 0;
}

.nemra-events-list__cal-day {
	font-size: 13px;
	font-weight: 500;
	color: var(--nemra-muted, #6b6b6b);
	line-height: 1.2;
}

.nemra-events-list__cal-cell.is-muted .nemra-events-list__cal-day {
	color: #eaeaea;
}

.nemra-events-list__cal-event {
	display: block;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.3;
	padding: 3px 6px;
	border-radius: 3px;
	background-color: var(--nemra-green-light, #def5d6);
	color: #000000;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: filter 150ms ease;
}

.nemra-events-list__cal-event--featured {
	background-color: var(--nemra-blue-vibrant, #0074cf);
	color: #ffffff;
}

.nemra-events-list__cal-event--outlined {
	background-color: var(--nemra-light, #fcfdfd);
	border: 1px solid #eaeaea;
	color: var(--nemra-muted, #6b6b6b);
}

a.nemra-events-list__cal-event:hover,
a.nemra-events-list__cal-event:focus-visible {
	filter: brightness( 0.92 );
	text-decoration: none;
	outline: 0;
}

.nemra-events-list__cal-event[hidden] {
	display: none;
}

/* Month pager — "June 2026" + prev/next circles. The mobile comp draws it;
 * desktop's calendar has no month header, so it only shows below 768px
 * (the JS pager itself is wired regardless). */
.nemra-events-list__cal-top {
	display: none;
	align-items: center;
	justify-content: space-between;
	margin: 8px 0 16px;
}

.nemra-events-list__cal-month {
	margin: 0;
	font-size: 24px;
	font-weight: 500;
	letter-spacing: -0.5px;
	color: var(--nemra-dark, #17171a);
}

.nemra-events-list__cal-nav {
	display: flex;
	gap: 8px;
}

.nemra-events-list__cal-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid #eaeaea;
	border-radius: 50%;
	background: transparent;
	color: var(--nemra-dark, #17171a);
	cursor: pointer;
	transition: color 150ms ease, border-color 150ms ease;
}

.nemra-events-list__cal-arrow:disabled {
	color: #c6c6c6;
	cursor: default;
}

/* Responsive: on tablet the 7-col calendar gets cramped — shorter cells,
   smaller pills. */
@media ( max-width: 991px ) {
	.nemra-events-list__cal-cell {
		min-height: 90px;
		padding: 6px;
	}
	.nemra-events-list__cal-event {
		font-size: 10px;
		padding: 3px 4px;
	}
}

/* Mobile calendar (comp screenshot 2026-08-19): month heading + arrow
 * pager, blue weekday labels on the page ground, square white cells with
 * 4px gutters, and events as 8px dots instead of labeled pills. */
@media ( max-width: 768px ) {
	.nemra-events-list__cal-top {
		display: flex;
	}

	.nemra-events-list__cal {
		background: transparent;
		border-radius: 0;
		overflow: visible;
	}

	.nemra-events-list__cal-header {
		background: transparent;
		border-bottom: 0;
		gap: 4px;
	}

	.nemra-events-list__cal-weekday {
		padding: 6px 0;
		font-size: 12px;
		font-weight: 500;
		color: var(--nemra-blue, #2173b3);
	}

	.nemra-events-list__cal-row {
		gap: 4px;
		margin-top: 4px;
	}

	.nemra-events-list__cal-cell {
		min-height: 0;
		aspect-ratio: 1 / 1.15;
		padding: 0;
		border: 0;
		border-radius: 3px;
		align-items: center;
		justify-content: center;
		gap: 0;
	}

	.nemra-events-list__cal-day {
		font-size: 14px;
		font-weight: 400;
		color: var(--nemra-dark, #17171a);
	}

	.nemra-events-list__cal-cell.is-muted .nemra-events-list__cal-day {
		color: #c6c6c6;
	}

	/* Pills collapse to dots: default green, outlined blue, featured
	 * blue-vibrant (an 8px dot can't draw an outline). */
	.nemra-events-list__cal-event {
		position: absolute;
		left: 8px;
		bottom: 8px;
		width: 8px;
		height: 8px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		font-size: 0;
		color: transparent;
		background-color: var(--nemra-green, #4c7f39);
	}

	.nemra-events-list__cal-event--outlined {
		background-color: var(--nemra-blue, #2173b3);
	}

	.nemra-events-list__cal-event--featured {
		background-color: var(--nemra-blue-vibrant, #0074cf);
	}

	/* A second event the same day sits beside the first. */
	.nemra-events-list__cal-event ~ .nemra-events-list__cal-event {
		left: 20px;
	}
}

/* Mobile mode type - appended at the END of the file so it outranks the
 * rules above at equal specificity (same pattern as events-featured).
 * Events mobile comp meta rows hug 15px lines = Body/Small mobile 10/1.5
 * (same step as every small meta row on the mobile frames). */
@media (max-width: 991px) {
	/* Mobile comp 797:23302 resolves its own sizes: category + meta are 12,
	 * and the card title is Body/Large SANS — 20/1.5 Poppins regular, not
	 * the desktop serif. */
	.nemra-events-list .nemra-events-list__row-eyebrow {
		font-size: 12px;
		line-height: 1.5;
	}

	.nemra-events-list .nemra-events-list__title {
		font-family: var(--nemra-font-body, 'Poppins', system-ui, sans-serif);
		font-size: var(--nemra-t-b1-size, 16px);
		font-weight: 400;
		line-height: var(--nemra-t-b1-lh, 1.5);
		letter-spacing: var(--nemra-t-b1-ls, 0);
	}

	.nemra-events-list .nemra-events-list__meta {
		font-size: 12px;
		line-height: 1.5;
	}
}
