/* Events - listing, filters and cards.
   Scoped under .ev-ev so nothing leaks into the theme. */

.ev-ev {
	--ev-ev-cols: 3;
	--ev-ev-gap: 24px;
	--ev-ev-card-bg: #fff;
	--ev-ev-border: #e6e8eb;
	--ev-ev-accent: #1a1a1a;
	--ev-ev-accent-fg: #fff;
	--ev-ev-muted: #6b7280;
	--ev-ev-highlight: #fad715; /* the yellow already used on the site */
	--ev-ev-radius: 12px;

	margin: 0 0 40px;
}

.ev-ev__heading {
	margin: 0 0 24px;
	font-size: 28px;
	line-height: 1.2;
}

/* ---------- upcoming / past tabs ---------- */

.ev-ev__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--ev-ev-border);
}

.ev-ev__tab {
	appearance: none;
	cursor: pointer;
	border: 0;
	border-bottom: 2px solid transparent;
	background: none;
	font: inherit;
	font-size: 17px; /* a step above the filter chips */
	font-weight: 600;
	color: var(--ev-ev-muted);
	padding: 0.6em 1em;
	margin-bottom: -1px;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.ev-ev__tab:hover {
	color: var(--ev-ev-accent);
}

.ev-ev__tab.is-active {
	color: var(--ev-ev-accent);
	border-bottom-color: var(--ev-ev-accent);
}

.ev-ev__tab:focus-visible,
.ev-ev__btn:focus-visible,
.ev-ev__morebtn:focus-visible,
.ev-ev__cta:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

.ev-ev__pill {
	display: inline-block;
	min-width: 1.5em;
	padding: 0.1em 0.45em;
	margin-left: 0.35em;
	font-size: 13px;
	font-weight: 700;
	text-align: center;
	color: #374151;
	background: #f1f3f5;
	border-radius: 999px;
}

/* ---------- filter rows ---------- */

.ev-ev__filters {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 28px;
}

.ev-ev__group {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 8px 12px;
}

.ev-ev__label {
	flex: 0 0 auto;
	min-width: 80px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ev-ev-muted);
}

.ev-ev__btns {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ev-ev__btn {
	appearance: none;
	cursor: pointer;
	border: 1px solid var(--ev-ev-border);
	background: #fff;
	color: #374151;
	font: inherit;
	font-size: 16px;
	line-height: 1.25;
	/* em padding, so the chips grow with the text rather than getting cramped */
	padding: 0.45em 0.95em;
	border-radius: 999px;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ev-ev__btn:hover {
	border-color: #c9ced6;
	background: #f6f7f9;
}

.ev-ev__btn.is-active {
	background: var(--ev-ev-accent);
	border-color: var(--ev-ev-accent);
	color: var(--ev-ev-accent-fg);
}

.ev-ev__count {
	margin: 0;
	font-size: 15px;
	color: var(--ev-ev-muted);
}

/* ---------- grid + cards ---------- */

.ev-ev__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--ev-ev-gap);
	grid-template-columns: repeat(var(--ev-ev-cols), minmax(0, 1fr));
}

.ev-ev__grid[hidden] {
	display: none;
}

.ev-ev__item {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
}

.ev-ev__item[hidden] {
	display: none;
}

.ev-ev__card {
	display: flex;
	flex-direction: column;
	width: 100%;
	background: var(--ev-ev-card-bg);
	border: 1px solid var(--ev-ev-border);
	border-radius: var(--ev-ev-radius);
	overflow: hidden;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.ev-ev__card:hover {
	transform: translateY(-3px);
	border-color: #d4d8de;
	box-shadow: 0 10px 26px rgba(16, 24, 40, 0.1);
}

.ev-ev__item.is-past .ev-ev__card {
	opacity: 0.82;
}

/* media + date chip */

.ev-ev__media {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #f3f4f6;
	overflow: hidden;
}

.ev-ev__media--plain {
	aspect-ratio: auto;
	min-height: 84px;
	display: flex;
	align-items: center;
	padding: 16px;
	background: #fafbfc;
}

.ev-ev__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ev-ev__datechip {
	position: absolute;
	top: 12px;
	left: 12px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 50px;
	padding: 6px 8px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(16, 24, 40, 0.16);
	line-height: 1;
}

.ev-ev__datechip.is-solo {
	position: static;
	box-shadow: none;
	border: 1px solid var(--ev-ev-border);
}

.ev-ev__day {
	font-size: 20px;
	font-weight: 800;
	color: #111;
}

.ev-ev__mon {
	margin-top: 2px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ev-ev-muted);
}

/* body */

.ev-ev__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 8px;
	padding: 18px 20px 22px;
}

.ev-ev__when {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: #111;
}

.ev-ev__when::after {
	content: "";
	display: block;
	width: 32px;
	height: 3px;
	margin-top: 8px;
	background: var(--ev-ev-highlight);
	border-radius: 2px;
}

/* Three classes deliberately - see the note in ev-gg-feed.css. The theme's
   h1..h6 {font-weight:normal} and .blog-post .entry-content h3 {margin-top:30px}
   would otherwise leave the card title light and pushed off the divider. */
.ev-ev .ev-ev__card .ev-ev__title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}

.ev-ev__title a {
	color: inherit;
	text-decoration: none;
}

.ev-ev__title a:hover {
	text-decoration: underline;
}

.ev-ev__where {
	margin: 0;
	font-size: 14px;
	color: var(--ev-ev-muted);
}

.ev-ev__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin: 2px 0 0;
}

.ev-ev__tag {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #374151;
	background: #f1f3f5;
	border-radius: 4px;
	padding: 0.25em 0.55em;
}

.ev-ev__tag.is-format {
	background: #111;
	color: #fff;
}

.ev-ev__excerpt {
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
	color: #4b5563;
}

.ev-ev__cta {
	margin-top: auto;
	padding-top: 10px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	color: #111;
	align-self: flex-start;
}

.ev-ev__cta::after {
	content: " \2192";
	transition: transform 0.15s ease;
	display: inline-block;
}

.ev-ev__cta:hover::after {
	transform: translateX(3px);
}

/* ---------- "see more" button ---------- */

.ev-ev__more {
	margin: 32px 0 0;
	text-align: center;
}

.ev-ev__morebtn {
	display: inline-block;
	padding: 0.8em 2em;
	background: var(--ev-ev-accent);
	color: var(--ev-ev-accent-fg);
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	border-radius: 999px;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.ev-ev__morebtn:hover {
	opacity: 0.88;
	transform: translateY(-2px);
	color: var(--ev-ev-accent-fg);
}

/* ---------- empty states ---------- */

.ev-ev__none,
.ev-ev-empty {
	margin: 24px 0 0;
	padding: 24px;
	text-align: center;
	color: var(--ev-ev-muted);
	background: #f9fafb;
	border: 1px dashed var(--ev-ev-border);
	border-radius: var(--ev-ev-radius);
}

.ev-ev__none[hidden] {
	display: none;
}

.ev-ev__reset {
	appearance: none;
	border: 0;
	background: none;
	padding: 0;
	margin-left: 6px;
	font: inherit;
	color: #2563eb;
	text-decoration: underline;
	cursor: pointer;
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
	.ev-ev__grid {
		grid-template-columns: repeat(min(var(--ev-ev-cols), 2), minmax(0, 1fr));
	}
}

@media (max-width: 680px) {
	.ev-ev {
		--ev-ev-gap: 16px;
	}
	.ev-ev__grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.ev-ev__label {
		min-width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ev-ev__card,
	.ev-ev__btn,
	.ev-ev__morebtn,
	.ev-ev__cta::after {
		transition: none;
	}
	.ev-ev__card:hover,
	.ev-ev__morebtn:hover {
		transform: none;
	}
}

/* ---------- "Other events" sidebar widget ----------
   Sizes in px on purpose: the barrel theme sets html{font-size:62.5%},
   so rem here would render at 62.5% of the intended size. */

.ev-ev-side {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ev-ev-side__item {
	margin: 0;
	padding: 0;
	list-style: none;
	border-bottom: 1px solid #e6e8eb;
}

.ev-ev-side__item:last-child {
	border-bottom: 0;
}

.ev-ev-side__link {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 0;
	text-decoration: none;
	color: inherit;
}

.ev-ev-side__link:hover .ev-ev-side__title {
	text-decoration: underline;
}

.ev-ev-side__link:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

.ev-ev-side__date {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 46px;
	padding: 6px 4px;
	background: #f6f7f9;
	border: 1px solid #e6e8eb;
	border-radius: 8px;
	line-height: 1;
}

.ev-ev-side__day {
	font-size: 18px;
	font-weight: 800;
	color: #111;
}

.ev-ev-side__mon {
	margin-top: 3px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #6b7280;
}

.ev-ev-side__text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.ev-ev-side__title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	color: #111;
}

.ev-ev-side__meta {
	font-size: 13px;
	line-height: 1.4;
	color: #6b7280;
}

.ev-ev-side__item.is-past .ev-ev-side__date {
	opacity: 0.6;
}

.ev-ev-side__item.is-past .ev-ev-side__title {
	color: #4b5563;
}

.ev-ev-side__all {
	margin: 16px 0 0;
}

.ev-ev-side__all a {
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	color: #111;
}

.ev-ev-side__all a::after {
	content: " \2192";
}

.ev-ev-side__all a:hover {
	text-decoration: underline;
}
