/* WPEA Card Filters — frontend styles */

.wpea-cf-wrap {
	--wpea-bg: #fbe1cf;
	--wpea-text: #2b1e3f;
	--wpea-accent: #f36f21;
	--wpea-card-bg: #ffffff;
	--wpea-card-title: #2b1e3f;
	--wpea-heading-font: 'Anton', 'Arial Narrow', sans-serif;
	--wpea-body-font: 'Poppins', Arial, sans-serif;
	--wpea-radius: 4px;
	--wpea-gap: 24px;
	--wpea-ratio: 4/5;
	--wpea-cols-desktop: 4;
	--wpea-cols-tablet: 2;
	--wpea-cols-mobile: 2;

	font-family: var(--wpea-body-font);
	color: var(--wpea-text);
	box-sizing: border-box;
	isolation: isolate; /* keeps this widget's stacking self-contained from the rest of the page */
}
.wpea-cf-wrap *, .wpea-cf-wrap *::before, .wpea-cf-wrap *::after { box-sizing: inherit; }

/* ---------- Filter bar ---------- */
.wpea-cf-filterbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 32px;
	background: var(--wpea-bg);
	padding: 20px 24px;
	position: relative;
	z-index: 100;
}

.wpea-cf-filter { position: relative; z-index: 1; }
.wpea-cf-filter.is-open { z-index: 50; }

.wpea-cf-filter-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	background: none;
	border: none;
	padding: 0 0 6px 0;
	font-family: var(--wpea-heading-font);
	font-weight: 700;
	font-size: 16px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--wpea-text);
	cursor: pointer;
	border-bottom: 2px solid transparent;
}
.wpea-cf-filter.is-open .wpea-cf-filter-toggle,
.wpea-cf-filter-toggle:hover { border-bottom-color: var(--wpea-accent); }

.wpea-cf-chevron {
	width: 10px;
	height: 10px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .15s ease;
	margin-top: -4px;
}
.wpea-cf-filter.is-open .wpea-cf-chevron { transform: rotate(-135deg); margin-top: 2px; }

.wpea-cf-filter-panel {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: var(--wpea-bg);
	box-shadow: 0 12px 24px rgba(0,0,0,0.12);
	z-index: 9999;
	margin-top: 4px;
}
.wpea-cf-filter.is-open .wpea-cf-filter-panel { display: block; }

.wpea-cf-filter-panel ul { list-style: none; margin: 0; padding: 0; }

.wpea-cf-check-option {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 14px 18px;
	font-family: var(--wpea-body-font);
	font-size: 15px;
	color: var(--wpea-text);
	cursor: pointer;
	border-bottom: 1px solid rgba(43,30,63,0.15);
	user-select: none;
}
.wpea-cf-filter-panel li:last-child .wpea-cf-check-option { border-bottom: none; }
.wpea-cf-check-option:hover { background: rgba(0,0,0,0.06); }

.wpea-cf-check-option input.wpea-cf-check,
.wpea-cf-check-option input.wpea-cf-check-all {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.wpea-cf-check-box {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	border: 2px solid var(--wpea-text);
	border-radius: 3px;
	position: relative;
	background: transparent;
}
.wpea-cf-check-box::after {
	content: "";
	position: absolute;
	display: none;
	left: 4px;
	top: 0px;
	width: 5px;
	height: 10px;
	border-right: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(45deg);
}
.wpea-cf-check:checked + .wpea-cf-check-box,
.wpea-cf-check-all:checked + .wpea-cf-check-box {
	background: var(--wpea-accent);
	border-color: var(--wpea-accent);
}
.wpea-cf-check:checked + .wpea-cf-check-box::after,
.wpea-cf-check-all:checked + .wpea-cf-check-box::after { display: block; }
.wpea-cf-check:checked ~ .wpea-cf-check-text,
.wpea-cf-check-all:checked ~ .wpea-cf-check-text { font-weight: 700; }

/* Pill variant for day filter */
.wpea-cf-wrap[data-day-style="pills"] .wpea-cf-filter--day .wpea-cf-filter-toggle { display: none; }
.wpea-cf-wrap[data-day-style="pills"] .wpea-cf-filter--day .wpea-cf-filter-panel {
	display: flex;
	position: static;
	box-shadow: none;
	background: none;
	margin: 0;
	gap: 10px;
}
.wpea-cf-wrap[data-day-style="pills"] .wpea-cf-filter--day .wpea-cf-day-list { display: flex; gap: 10px; }
.wpea-cf-wrap[data-day-style="pills"] .wpea-cf-check-option {
	border: 2px solid var(--wpea-text);
	border-bottom: 2px solid var(--wpea-text);
	border-radius: 999px;
	padding: 8px 16px;
	width: auto;
}
.wpea-cf-wrap[data-day-style="pills"] .wpea-cf-check-option:has(input:checked) {
	background: var(--wpea-accent);
	border-color: var(--wpea-accent);
	color: #fff;
}
.wpea-cf-wrap[data-day-style="pills"] .wpea-cf-check-box { display: none; }

.wpea-cf-reset {
	margin-left: auto;
	align-self: center;
	background: none;
	border: none;
	text-decoration: underline;
	font-family: var(--wpea-body-font);
	font-weight: 600;
	color: var(--wpea-text);
	cursor: pointer;
}

/* ---------- Grid ---------- */
.wpea-cf-grid {
	display: grid;
	grid-template-columns: repeat(var(--wpea-cols-mobile), 1fr);
	gap: var(--wpea-gap);
	padding: var(--wpea-gap) 0;
	position: relative;
	z-index: 1;
}
@media (min-width: 640px) {
	.wpea-cf-grid { grid-template-columns: repeat(var(--wpea-cols-tablet), 1fr); }
}
@media (min-width: 1024px) {
	.wpea-cf-grid { grid-template-columns: repeat(var(--wpea-cols-desktop), 1fr); }
}

.wpea-cf-card {
	display: block;
	background: var(--wpea-card-bg);
	border-radius: var(--wpea-radius);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
}
a.wpea-cf-card { cursor: pointer; }

.wpea-cf-card-media {
	position: relative;
	width: 100%;
	aspect-ratio: var(--wpea-ratio);
	background: #ddd;
	overflow: hidden;
}
.wpea-cf-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.wpea-cf-card-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.wpea-cf-card-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px 12px 0;
}
.wpea-cf-badge {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 4px 8px;
	border-radius: 2px;
}
.wpea-cf-badge--plain {
	background: none;
	padding: 4px 0;
	color: var(--wpea-text);
	font-weight: 600;
}

.wpea-cf-card-title {
	font-family: var(--wpea-heading-font);
	font-weight: 700;
	font-size: 28px;
	line-height: 1.05;
	text-transform: uppercase;
	color: var(--wpea-card-title);
	padding: 8px 12px 4px;
}

.wpea-cf-card-subtitle {
	font-family: var(--wpea-body-font);
	font-size: 13px;
	color: var(--wpea-text);
	opacity: 0.75;
	padding: 0 12px 16px;
	font-weight: bold;
}

.wpea-cf-card-genre {
	font-family: var(--wpea-body-font);
	font-size: 14px;
	color: var(--wpea-text);
	opacity: 0.7;
	padding: 0 12px 6px;
	font-weight: 400;
}

.wpea-cf-card.wpea-cf-hidden { display: none; }

/* Compact card variant - used when a card's "Resize this card to a
   compact size when it has no image" option is on. No media container at
   all (rather than an empty placeholder box), so it reads as a dense list
   row instead of an empty poster card. Opt-in per card - see
   wpea-cf-cpt.php / wpea-cf-cards-admin.php / wpea-cf-event-cards-admin.php. */
.wpea-cf-card--compact {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 0;
	padding: 14px 4px;
}
.wpea-cf-card--compact .wpea-cf-card-badges {
	padding: 0 12px 6px;
}
.wpea-cf-card--compact .wpea-cf-card-title {
	font-size: 20px;
	padding: 0 12px 2px;
}
.wpea-cf-card--compact .wpea-cf-card-genre {
	padding: 0 12px 4px;
}
.wpea-cf-card--compact .wpea-cf-card-subtitle {
	padding: 0 12px 0;
}

.wpea-cf-wrap .wpea-cf-pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 28px 0 8px;
	font-family: var(--wpea-body-font);
}
.wpea-cf-wrap .wpea-cf-pager .wpea-cf-load-more,
.wpea-cf-wrap .wpea-cf-pager .wpea-cf-page-btn {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 46px;
	min-width: 46px;
	margin: 0;
	padding: 0 20px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	color: #fff;
	background: transparent;
	border: 2px solid var(--wpea-accent);
	border-radius: var(--wpea-radius);
	box-shadow: none;
	transition: background .15s, color .15s;
}
.wpea-cf-wrap .wpea-cf-pager .wpea-cf-load-more { padding: 0 40px; }
.wpea-cf-wrap .wpea-cf-pager .wpea-cf-load-more:hover,
.wpea-cf-wrap .wpea-cf-pager .wpea-cf-page-btn:hover:not(:disabled),
.wpea-cf-wrap .wpea-cf-pager .wpea-cf-page-btn.is-current {
	background: var(--wpea-accent);
	color: #fff;
}
.wpea-cf-wrap .wpea-cf-pager .wpea-cf-page-btn:disabled { opacity: .4; cursor: default; }
.wpea-cf-wrap .wpea-cf-pager .wpea-cf-load-more:focus-visible,
.wpea-cf-wrap .wpea-cf-pager .wpea-cf-page-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.wpea-cf-empty,
.wpea-cf-no-results { font-family: var(--wpea-body-font); padding: 24px 0; }

@media (max-width: 768px) {
.wpea-cf-filter-toggle {
  margin: 0;
}
.wpea-cf-card-title {
  font-size: 32px !important;
}
.wpea-cf-wrap .wpea-cf-card-genre {
  line-height: 1.25;
  font-weight: 600;
}
/* Reset pinned to the top-right corner of the filter bar instead of
   wrapping onto its own line under the filters. Right padding on the bar
   keeps the filters from running underneath it. */
.wpea-cf-wrap .wpea-cf-filterbar:has(.wpea-cf-reset) {
  padding-right: 80px;
}
.wpea-cf-wrap .wpea-cf-reset {
  position: absolute;
  top: 12px;
  right: 12px;
  margin: 0;
  padding: 4px;
  line-height: 1.2;
}

}


@media (max-width: 640px) {
	.wpea-cf-card-title { font-size: 20px; }
	.wpea-cf-card-genre { font-size: 12px; }
	.wpea-cf-card-subtitle { font-size: 12px; }
	.wpea-cf-badge { font-size: 11px; padding: 3px 6px; }
	.wpea-cf-filterbar { gap: 20px; padding: 16px; }
	.wpea-cf-grid { gap: calc(var(--wpea-gap) * 0.6); }
}
