/* wp-content/plugins/ceca-widgets/widgets/events-archive/events-archive.css */

/* Events Archive (Figma 90:1387): title 40/50, Upcoming/Past tab bar on a
   full-bleed hairline, 306px filter sidebar + 3-up card grid. Cards reuse
   the event-feed styles (the grid carries the ceca-ef class); archive
   cards run 306x285 with 22/26 titles. */

.ceca-ea__heading {
	margin: 0 0 50px;
	font-size: 40px;
	line-height: 50px;
	font-weight: 700;
	color: #000000;
}

/* --- tabs ---------------------------------------------------------------- */

.ceca-ea__tabs {
	position: relative;
	display: flex;
	gap: 40px;
	border-bottom: 1px solid #E8E8E8;
}

/* The hairline runs the full viewport per the design. */
.ceca-ea__tabs::after {
	content: '';
	position: absolute;
	bottom: -1px;
	left: calc(50% - 50vw);
	width: 100vw;
	border-bottom: 1px solid #E8E8E8;
}

.ceca-ea .ceca-ea__tab {
	position: relative;
	z-index: 1;
	padding: 0 0 14px;
	border: 0;
	background: none;
	cursor: pointer;
	font-family: inherit;
	font-size: 20px;
	line-height: 30px;
	font-weight: 400;
	color: #7E7E7E;
	transition: color 0.2s ease;
}

.ceca-ea .ceca-ea__tab:hover,
.ceca-ea .ceca-ea__tab:focus-visible {
	color: #000000;
	background: none;
}

.ceca-ea .ceca-ea__tab.is-active {
	font-weight: 700;
	color: #000000;
}

.ceca-ea .ceca-ea__tab.is-active::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	border-bottom: 2px solid #000000;
}

/* --- layout -------------------------------------------------------------- */

.ceca-ea__layout {
	display: flex;
	gap: 24px;
	margin-top: 50px;
}

.ceca-ea__sidebar {
	flex: 0 0 306px;
	min-width: 0;
}

.ceca-ea__content {
	flex: 1;
	min-width: 0;
}

/* Desktop: the filters ride along under the sticky header. flex-start stops
   the row stretching the sidebar to full height (which leaves no room to
   stick). Capped to the viewport and scrollable so an expanded filter list
   stays reachable; 2px padding/negative margin keeps focus rings unclipped. */
@media (min-width: 1025px) {
	.ceca-ea__sidebar {
		flex-basis: 310px; /* 306px content + the 2px padding either side */
		align-self: flex-start;
		position: sticky;
		top: calc(var(--ceca-header-offset, 125px) + 30px);
		max-height: calc(100vh - var(--ceca-header-offset, 125px) - 60px);
		overflow-y: auto;
		overscroll-behavior: contain;
		scrollbar-width: thin;
		padding: 2px;
		margin: -2px;
	}
}

/* --- sidebar ------------------------------------------------------------- */

.ceca-ea__side-heading {
	margin: 0 0 24px;
	font-size: 30px;
	line-height: 40px;
	font-weight: 700;
	color: #000000;
}

.ceca-ea .ceca-ea__search {
	width: 100%;
	height: 40px;
	padding: 0 20px;
	border: 1px solid #E8E8E8;
	border-radius: 300px;
	background: #FFFFFF;
	font-family: inherit;
	font-size: 16px;
	color: #000000;
}

.ceca-ea .ceca-ea__search::placeholder {
	color: #7E7E7E;
}

.ceca-ea .ceca-ea__search:focus {
	outline: none;
	border-color: var(--ceca-pink, #C65A93);
}

.ceca-ea__group {
	border-bottom: 1px solid #E8E8E8;
}

.ceca-ea__group:first-of-type {
	margin-top: 40px;
}

.ceca-ea .ceca-ea__group-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 18px 0;
	border: 0;
	background: none;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
	font-size: 22px;
	line-height: 26px;
	font-weight: 700;
	color: #000000;
}

.ceca-ea .ceca-ea__group-toggle:hover,
.ceca-ea .ceca-ea__group-toggle:focus-visible {
	color: var(--ceca-plum, #411024);
	background: none;
}

.ceca-ea__group-toggle svg {
	flex: none;
	width: 14px;
	height: 8px;
	transition: transform 0.3s ease;
}

.ceca-ea__group-toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

.ceca-ea__group-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 0 0 18px;
}

.ceca-ea__group-options[hidden] {
	display: none;
}

.ceca-ea__option {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 16px;
	line-height: 22px;
	color: #000000;
	cursor: pointer;
}

.ceca-ea__option input {
	accent-color: var(--ceca-plum, #411024);
}

/* --- grid ---------------------------------------------------------------- */

.ceca-ea__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

/* Archive card geometry: 306x285 with 22/26 titles (feed cards are wider
   slider cards with 30/35 titles). */
.ceca-ea__grid.ceca-ef a.ceca-ef__card {
	flex: none;
	width: auto;
	min-height: 285px;
	padding: 20px;
}

.ceca-ea__grid.ceca-ef .ceca-ef__title {
	font-size: 22px;
	line-height: 26px;
}

.ceca-ea__status,
.ceca-ea__empty {
	margin: 24px 0 0;
	font-size: 18px;
	line-height: 30px;
	color: #545454;
}

.ceca-ea__sentinel {
	height: 1px;
}

.ceca-ea__empty[hidden],
.ceca-ea__status[hidden] {
	display: none;
}

/* --- smaller screens (interim until the mobile designs land) ------------- */

@media (max-width: 1024px) {
	.ceca-ea__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Filter pill + panel close only exist on mobile. */
.ceca-ea .ceca-ea__filter-open,
.ceca-ea .ceca-ea__filter-close {
	display: none;
}

/* Mobile (Figma 2372:8240 + "Filter Open" 2372:9602, 440 frame): title
   14px under the header, tabs 20px below, cards 20px under the rule at
   400×387 with 10px between; the filters leave the page for a full-screen
   panel opened from a floating "Filter" pill (user, 2026-10-02). */
@media (max-width: 767px) {
	/* Header → title gap comes from the theme's page rhythm (30px). */

	.ceca-ea__heading {
		margin: 0 0 20px;
		font-size: 25px;
		line-height: 27px;
	}

	.ceca-ea .ceca-ea__tab {
		padding-bottom: 10px;
	}

	.ceca-ea__layout {
		flex-direction: column;
		margin-top: 20px;
	}

	.ceca-ea__grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.ceca-ea__grid.ceca-ef a.ceca-ef__card {
		min-height: 387px;
	}

	.ceca-ea__grid.ceca-ef .ceca-ef__title {
		font-size: 25px;
		line-height: 30px;
	}

	/* Filters: a full-screen panel, hidden until the pill opens it. */
	.ceca-ea__sidebar {
		display: none;
		position: fixed;
		inset: 0;
		z-index: 1000;
		flex: none;
		width: 100%;
		padding: 62px var(--ceca-gutter, 20px) 40px;
		overflow-y: auto;
		overscroll-behavior: contain;
		background: #FFFFFF;
	}

	.ceca-ea.is-filters-open .ceca-ea__sidebar {
		display: block;
	}

	.ceca-ea__side-heading {
		display: none;
	}

	.ceca-ea__group:first-of-type {
		margin-top: 20px;
	}

	.ceca-ea .ceca-ea__filter-close,
	.ceca-ea .ceca-ea__filter-close:hover,
	.ceca-ea .ceca-ea__filter-close:focus {
		display: flex;
		align-items: center;
		justify-content: center;
		position: absolute;
		top: 13px;
		right: calc(var(--ceca-gutter, 20px) - 6px);
		width: 34px;
		height: 34px;
		padding: 0;
		border: 0;
		background: none;
		color: #000000;
		cursor: pointer;
	}

	.ceca-ea__filter-close svg {
		width: 22px;
		height: 22px;
	}

	.ceca-ea .ceca-ea__filter-open,
	.ceca-ea .ceca-ea__filter-open:hover,
	.ceca-ea .ceca-ea__filter-open:focus {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 5px;
		position: fixed;
		left: 50%;
		bottom: 24px;
		z-index: 90;
		width: 110px;
		height: 50px;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: #FFFFFF;
		box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
		color: #000000;
		font-family: inherit;
		font-size: 18px;
		line-height: 23px;
		transform: translateX(-50%);
		cursor: pointer;
	}

	.ceca-ea__filter-open svg {
		width: 32px;
		height: 17px;
		flex: none;
	}

	/* The page behind the panel must not scroll. */
	html.ceca-ea-locked,
	html.ceca-ea-locked body {
		overflow: hidden;
	}
}

/* Empty state: centred both ways in a card-height area (285px, one row of
   cards) rather than hanging at the foot of an empty grid (user,
   2026-09-29). The [hidden] rule above still wins when there are events. */
.ceca-ea__empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 285px;
	margin: 0;
	padding: 0;
	text-align: center;
}

/* Same for the /events/ pill: hidden while the mobile menu is open. */
body.ceca-drawer-open .ceca-ea .ceca-ea__filter-open {
	display: none !important;
}
