/* Brand blue aligned with member-filter / logo slider */
.pp-eurocham-event-filter {
	--ppef-brand: #0f1c59;
	--ppef-brand-hover: #0b143d;
	--ppef-border: #ccc;
	max-width: 100%;
	margin: 0 0 2.5rem;
}

.pp-eurocham-event-filter__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	align-items: center;
}

.pp-eurocham-event-filter__tab {
	box-sizing: border-box;
	padding: 0.55rem 1.15rem;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
	font-family: inherit;
	cursor: pointer;
	border-radius: 4px;
	border: 1px solid var(--ppef-border);
	background: #fff;
	color: var(--ppef-brand);
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pp-eurocham-event-filter__tab:hover,
.pp-eurocham-event-filter__tab:focus-visible {
	outline: none;
	border-color: var(--ppef-brand);
	color: var(--ppef-brand);
	background: #f7f9fc;
}

.pp-eurocham-event-filter__tab.is-active {
	background: var(--ppef-brand);
	border-color: var(--ppef-brand);
	color: #fff;
}

.pp-eurocham-event-filter__tab.is-active:hover,
.pp-eurocham-event-filter__tab.is-active:focus-visible {
	background: var(--ppef-brand-hover);
	border-color: var(--ppef-brand-hover);
	color: #fff;
}

/* Hide inactive panels. Use [hidden] attribute so non-JS / search engines still see all panels. */
.pp-eurocham-event-filter__panel[hidden] {
	display: none !important;
}

.pp-eurocham-event-filter__empty,
.pp-eurocham-event-filter__notice {
	margin: 0;
	font-size: 0.95rem;
	color: #444;
}

.pp-eurocham-event-filter__grid {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

/* Desktop: 10-column track grid; first card 4fr, second and third 3fr each (4+3+3) */
@media (min-width: 1024px) {
	.pp-eurocham-event-filter__grid {
		display: grid;
		grid-template-columns: repeat(12, 1fr);
		gap: 1.5rem;
		align-items: stretch;
	}

	.pp-eurocham-event-filter__grid > .pp-eurocham-event-filter__card:first-child {
		grid-column: span 4;
	}

	.pp-eurocham-event-filter__grid > .pp-eurocham-event-filter__card:nth-child(2),
	.pp-eurocham-event-filter__grid > .pp-eurocham-event-filter__card:nth-child(3) {
		grid-column: span 4;
	}

	.pp-eurocham-event-filter__grid > .pp-eurocham-event-filter__card:only-child {
		grid-column: 1 / -1;
	}
}

.pp-eurocham-event-filter__card {
	box-sizing: border-box;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
}

.pp-eurocham-event-filter__card-inner {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	height: 100%;
}

.pp-eurocham-event-filter__media {
	width: 100%;
}

.pp-eurocham-event-filter__media img,
.pp-eurocham-event-filter__media .tribe-events-event-image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 0;
}

.pp-eurocham-event-filter__media a {
	display: block;
}

.pp-eurocham-event-filter__content {
	padding: 1.25rem;
	box-sizing: border-box;
	min-width: 0;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}

.pp-eurocham-event-filter__schedule {
	font-size: 0.875rem;
	color: #666;
	margin-bottom: 0.5rem;
}

.pp-eurocham-event-filter__title {
	margin: 0 0 0.65rem;
	font-size: 1.25rem;
	line-height: 1.25;
	font-weight: 700;
}

.pp-eurocham-event-filter__title a {
	color: #1a1a1a;
	text-decoration: none;
}

.pp-eurocham-event-filter__title a:hover,
.pp-eurocham-event-filter__title a:focus-visible {
	text-decoration: underline;
}

.pp-eurocham-event-filter__meta {
	margin-bottom: 0.75rem;
	font-size: 0.9rem;
	line-height: 1.45;
	color: #333;
}

.pp-eurocham-event-filter__meta .tribe-events-venue-details {
	font-weight: 400;
}

.pp-eurocham-event-filter__meta .tribe-events-venue-details a,
.pp-eurocham-event-filter__meta .tribe-events-venue-details strong {
	font-weight: 700;
}

.pp-eurocham-event-filter__footer {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.35rem;
	margin-top: auto;
	padding-top: 0.75rem;
	font-size: 0.9rem;
}

/* Match list order: CTA → cost → “tickets left” */
.pp-eurocham-event-filter__footer form {
	order: 1;
	margin: 0;
}

.pp-eurocham-event-filter__footer .tribe-button {
	cursor: pointer;
	text-decoration: underline;
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	color: var(--ppef-brand);
}

.pp-eurocham-event-filter__footer .tribe-events-event-cost {
	order: 2;
	font-weight: 600;
}

.pp-eurocham-event-filter__footer .tribe-tickets-left {
	order: 3;
	font-size: 0.85rem;
	color: #666;
}

.pp-eurocham-event-filter__get-tickets {
	order: 1;
	font-weight: 600;
	text-decoration: underline;
	color: var(--ppef-brand);
}

/* ------------------------------------------------------------------
   Flickity slider variant (active when > 3 upcoming events)
   ------------------------------------------------------------------ */

/*
 * Pre-init layout: a horizontally clipped flex row so the cards already
 * appear in their final positions before Flickity boots. Once Flickity adds
 * .flickity-enabled, it manages its own internal viewport/slider markup and
 * these properties effectively become inert.
 */
.pp-eurocham-event-filter__grid.pp-eurocham-event-filter__grid--slider {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	overflow: hidden;
	padding-bottom: 3rem; /* room for dots */
	gap: 0;
}

/* Once Flickity is enabled the viewport handles overflow and the direct child
   becomes .flickity-viewport — restore block flow on the container. */
.pp-eurocham-event-filter__grid--slider.flickity-enabled {
	display: block;
	overflow: visible;
}

/* Mobile (< 768px): 1 card per page */
.pp-eurocham-event-filter__grid--slider .pp-eurocham-event-filter__card {
	width: 100%;
	margin-right: 0;
	flex: 0 0 auto;
}

/* Tablet (768–1023px): 2 cards per page */
@media (min-width: 768px) {
	.pp-eurocham-event-filter__grid--slider .pp-eurocham-event-filter__card {
		width: calc((100% - 1.5rem) / 2);
		margin-right: 1.5rem;
	}

	/* Reset desktop grid spans on slider cards. */
	.pp-eurocham-event-filter__grid--slider > .pp-eurocham-event-filter__card,
	.pp-eurocham-event-filter__grid--slider > .pp-eurocham-event-filter__card:first-child,
	.pp-eurocham-event-filter__grid--slider > .pp-eurocham-event-filter__card:nth-child(2),
	.pp-eurocham-event-filter__grid--slider > .pp-eurocham-event-filter__card:nth-child(3),
	.pp-eurocham-event-filter__grid--slider > .pp-eurocham-event-filter__card:only-child {
		grid-column: auto;
	}
}

/* Desktop (≥ 1024px): 3 cards per page */
@media (min-width: 1024px) {
	.pp-eurocham-event-filter__grid--slider .pp-eurocham-event-filter__card {
		width: calc((100% - 3rem) / 3);
	}
}

/* While Flickity is still booting, hide the "page dots" placeholder gap by
   not reserving extra space until the dots actually exist. We already have
   `padding-bottom: 3rem` above which keeps room. No layout shift needed. */

/* Flickity viewport / cells */
.pp-eurocham-event-filter__grid--slider .flickity-viewport {
	transition: height 0.2s ease;
}

/* Arrows — hidden on mobile, dots only */
.pp-eurocham-event-filter__grid--slider .flickity-prev-next-button {
	display: none;
	width: 40px;
	height: 40px;
	background: var(--ppef-brand);
	border-radius: 50%;
	opacity: 1;
}

@media (min-width: 768px) {
	.pp-eurocham-event-filter__grid--slider .flickity-prev-next-button {
		display: block;
	}
}

.pp-eurocham-event-filter__grid--slider .flickity-prev-next-button:hover,
.pp-eurocham-event-filter__grid--slider .flickity-prev-next-button:focus {
	background: var(--ppef-brand-hover);
}

.pp-eurocham-event-filter__grid--slider .flickity-prev-next-button:disabled {
	opacity: 0.35;
}

.pp-eurocham-event-filter__grid--slider .flickity-prev-next-button .flickity-button-icon {
	fill: #fff;
	left: 28%;
	top: 28%;
	width: 44%;
	height: 44%;
}

.pp-eurocham-event-filter__grid--slider .flickity-prev-next-button.previous {
	left: -8px;
}

.pp-eurocham-event-filter__grid--slider .flickity-prev-next-button.next {
	right: -8px;
}

@media (min-width: 1024px) {
	.pp-eurocham-event-filter__grid--slider .flickity-prev-next-button.previous {
		left: -20px;
	}
	.pp-eurocham-event-filter__grid--slider .flickity-prev-next-button.next {
		right: -20px;
	}
}

/* Dots */
.pp-eurocham-event-filter__grid--slider .flickity-page-dots {
	bottom: 0.5rem;
}

.pp-eurocham-event-filter__grid--slider .flickity-page-dots .dot {
	width: 10px;
	height: 10px;
	background: var(--ppef-brand);
	opacity: 0.3;
	margin: 0 4px;
}

.pp-eurocham-event-filter__grid--slider .flickity-page-dots .dot.is-selected {
	opacity: 1;
}
