/* FFX Events: calendar, lists, detail and map inside the Avada content area. */
.ffx-events, .ffx-detail, .ffx-map {
	--ffx-accent: #c40000;
	--ffx-accent-dark: #8f0000;
	--ffx-ink: #212934;
	--ffx-muted: #4f5662;
	--ffx-line: #d9dce1;
	--ffx-soft: #f6f6f7;
	--ffx-focus: #0b57d0;
	color: var(--ffx-ink);
	margin: 0 0 2rem;
}
.ffx-sr {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ffx-events a:focus-visible, .ffx-detail a:focus-visible, .ffx-map a:focus-visible,
.ffx-events button:focus-visible, .ffx-map button:focus-visible,
.ffx-events input:focus-visible, .ffx-events select:focus-visible,
.ffx-item:focus-within .ffx-card {
	outline: 3px solid var(--ffx-focus);
	outline-offset: 2px;
}
/* Native date-picker button: focus sits in the input's shadow tree, so only :focus-within matches the host. */
.ffx-events input:focus-within, .ffx-events select:focus-within {
	outline: 3px solid var(--ffx-focus);
	outline-offset: 2px;
}
.ffx-heading { margin: 0 0 1rem; line-height: 1.25; }
.ffx-heading__kicker { font-weight: 400; color: var(--ffx-muted); }

/* Filter form */
.ffx-filter {
	display: grid; gap: .75rem 1rem; grid-template-columns: 1fr;
	padding: 1rem; margin: 0 0 1.5rem; background: var(--ffx-soft); border: 1px solid var(--ffx-line); border-radius: 4px;
}
.ffx-filter .ffx-field, .ffx-filter .ffx-actions { margin: 0; display: flex; flex-direction: column; gap: .25rem; }
.ffx-filter label { font-weight: 600; font-size: .9rem; }
.ffx-events .ffx-filter select, .ffx-events .ffx-filter input[type="search"], .ffx-events .ffx-filter input[type="date"] {
	width: 100%; height: auto; min-height: 44px; padding: .4rem .6rem; font-size: 1rem; line-height: 1.3;
	border: 1px solid #8a919c; border-radius: 3px; background: #fff; color: var(--ffx-ink); box-sizing: border-box; color-scheme: light;
}
.ffx-filter .ffx-actions { flex-direction: row; align-items: center; gap: 1rem; align-self: end; }
@media (min-width: 900px) {
	.ffx-filter { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.ffx-filter .ffx-field--search { grid-column: span 2; }
	.ffx-filter .ffx-field select { grid-column: auto; }
}

/* Buttons */
.ffx-button, .ffx-events .ffx-button {
	display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .5rem 1.25rem;
	background: var(--ffx-accent); color: #fff; border: 2px solid var(--ffx-accent); border-radius: 3px;
	font-weight: 700; text-decoration: none; cursor: pointer; font-size: 1rem; line-height: 1.2;
}
.ffx-button:hover { background: var(--ffx-accent-dark); border-color: var(--ffx-accent-dark); color: #fff; }
.ffx-button--secondary { background: #fff; color: var(--ffx-accent); }
.ffx-button--secondary:hover { background: var(--ffx-accent); color: #fff; }
.ffx-button[aria-busy="true"] { opacity: .7; cursor: progress; }
.ffx-reset { color: var(--ffx-muted); }

/* Month navigation */
.ffx-monthnav {
	display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem;
	padding: .75rem 0; margin: 0 0 1rem; border-bottom: 2px solid var(--ffx-ink);
}
.ffx-monthnav .ffx-heading { margin: 0; text-align: center; text-transform: uppercase; letter-spacing: .03em; }
.ffx-monthnav__prev, .ffx-monthnav__next {
	display: inline-flex; align-items: center; gap: .3rem; min-height: 44px; color: var(--ffx-accent); text-decoration: none; font-weight: 600;
}
.ffx-monthnav__next { justify-self: end; text-align: right; }
@media (max-width: 599px) {
	.ffx-monthnav { grid-template-columns: 1fr 1fr; }
	.ffx-monthnav .ffx-heading { grid-column: 1 / -1; grid-row: 1; }
}

/* Lists */
.ffx-status { margin: 0 0 .75rem; color: var(--ffx-muted); }
.ffx-status:empty { display: none; }
.ffx-list { list-style: none; margin: 0; padding: 0; }
.ffx-events .ffx-list > li { margin: 0 0 .75rem; padding: 0; list-style: none; }
.ffx-card {
	line-height: 1.45;
	display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; padding: .9rem 1rem;
	background: #fff; border: 1px solid var(--ffx-line); border-left: 6px solid var(--ffx-event-color, var(--ffx-accent)); border-radius: 4px;
}
.ffx-datebox { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; line-height: 1.1; text-transform: uppercase; }
.ffx-datebox__day { font-size: 1.9rem; font-weight: 800; }
.ffx-datebox__month { font-weight: 700; color: var(--ffx-accent); }
.ffx-datebox__year { font-size: .8rem; color: var(--ffx-muted); }
.ffx-events .ffx-card__body > * { margin: 0 0 .3rem; }
.ffx-events .ffx-card__body > :last-child { margin-bottom: 0; }
.ffx-events .ffx-card__title { font-size: 1.15rem; line-height: 1.3; margin: 0 0 .3rem; }
.ffx-card__title a { color: var(--ffx-ink); text-decoration: none; }
.ffx-card__title a:hover { color: var(--ffx-accent); text-decoration: underline; }
.ffx-card__title a::after { content: ""; position: absolute; inset: 0; }
.ffx-item { position: relative; }
.ffx-card__subtitle { color: var(--ffx-muted); }
.ffx-card__meta { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: .95rem; }
.ffx-card__cats { font-size: .85rem; color: var(--ffx-muted); text-transform: uppercase; letter-spacing: .02em; }
.ffx-item--cancelled .ffx-card__title a { text-decoration: line-through; }
.ffx-badge {
	display: inline-block; padding: .1rem .5rem; border-radius: 3px; font-size: .8rem; font-weight: 700;
	text-transform: uppercase; background: #fde8e8; color: #8f0000; border: 1px solid #f2b8b8;
}
.ffx-badge--tentative, .ffx-badge--postponed { background: #fff4d6; color: #6b4b00; border-color: #e8cf86; }
.ffx-badge--moved_online { background: #e4effd; color: #0b3f8a; border-color: #a9c6f0; }
.ffx-badge--large { font-size: .95rem; margin-bottom: 1rem; }
.ffx-month { margin: 0 0 1.5rem; }
.ffx-events .ffx-month__title { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 .75rem; padding-bottom: .3rem; border-bottom: 1px solid var(--ffx-line); }
.ffx-empty { padding: 1.25rem 1rem; background: var(--ffx-soft); border-radius: 4px; }
.ffx-more { text-align: center; margin: 1rem 0 0; }
.ffx-next a, .ffx-back a, .ffx-back-month a { color: var(--ffx-accent); font-weight: 600; }
.ffx-back { margin: 0 0 1rem; }

/* Term selection (Lists & Items replacement) */
.ffx-terms { list-style: none; margin: 0; padding: 0; border: 1px solid var(--ffx-line); border-radius: 4px; }
.ffx-events .ffx-terms > li { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--ffx-line); }
.ffx-terms > li:last-child { border-bottom: 0; }
.ffx-terms a {
	display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; min-height: 44px; padding: .9rem 2.5rem .9rem 1rem; position: relative;
	color: var(--ffx-ink); text-decoration: none; font-weight: 700; text-transform: uppercase;
}
.ffx-terms a::after { content: "›"; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--ffx-muted); }
.ffx-terms a:hover { background: var(--ffx-soft); color: var(--ffx-accent); }
.ffx-terms__name { flex: 1 1 16rem; }
.ffx-terms__count { font-weight: 400; font-size: .85rem; text-transform: none; color: var(--ffx-muted); }

/* Notices */
.ffx-notice { padding: .75rem 1rem; border-left: 4px solid var(--ffx-accent); background: #fdf0f0; margin: 0 0 1rem; }
.ffx-notice--editor { border-left-color: #b07800; background: #fff8e5; }

/* Detail */
.ffx-detail__subtitle { font-size: 1.15rem; color: var(--ffx-muted); }
.ffx-detail__image img { max-width: 100%; height: auto; }
.ffx-facts { display: grid; gap: 0; margin: 0 0 1.5rem; border-top: 1px solid var(--ffx-line); }
.ffx-facts__row { display: grid; grid-template-columns: 1fr; gap: .2rem; padding: .75rem 0; border-bottom: 1px solid var(--ffx-line); }
.ffx-facts dt { font-weight: 700; text-transform: uppercase; font-size: .85rem; letter-spacing: .03em; color: var(--ffx-muted); }
.ffx-facts dd { margin: 0; }
@media (min-width: 700px) { .ffx-facts__row { grid-template-columns: 11rem 1fr; gap: 1rem; } }
.ffx-detail__cta { margin: 0 0 1.5rem; }
.ffx-share__list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.ffx-share__list li { margin: 0; list-style: none; }
.ffx-share__link {
	display: inline-flex; align-items: center; min-height: 44px; padding: .4rem .9rem;
	border: 1px solid var(--ffx-line); border-radius: 3px; text-decoration: none; color: var(--ffx-ink);
}
.ffx-share__link:hover { border-color: var(--ffx-accent); color: var(--ffx-accent); }

/* Map */
.ffx-map__stage { position: relative; height: var(--ffx-map-height, 420px); max-height: 70vh; background: #e9ecef; border: 1px solid var(--ffx-line); border-radius: 4px; overflow: hidden; }
.ffx-map__placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; height: 100%; padding: 1rem; text-align: center; box-sizing: border-box; }
.ffx-map__placeholder p { margin: 0; max-width: 32rem; }
.ffx-map__canvas { position: absolute; inset: 0; }
.ffx-map__canvas[hidden] { display: none; }
.ffx-map__skip { margin: .5rem 0 1rem; }
.ffx-map__places { list-style: none; margin: 0; padding: 0; }
.ffx-map .ffx-map__places > li { list-style: none; margin: 0 0 1rem; padding: 0 0 1rem; border-bottom: 1px solid var(--ffx-line); }
.ffx-map__places h3 { font-size: 1.05rem; margin: 0 0 .25rem; }
.ffx-map__places ul { margin: .25rem 0 0 1.1rem; }
.ffx-map .ffx-map__popup ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.ffx-map .ffx-map__popup h3 { font-size: 1rem; line-height: 1.3; margin: 0 0 .25rem; padding-right: 1rem; letter-spacing: 0; }
.ffx-map .ffx-map__popup p, .ffx-map .ffx-map__popup li { margin: 0 0 .25rem; line-height: 1.35; font-size: .9rem; }
.ffx-map .leaflet-popup-content a { color: var(--ffx-accent); }
