/* Resource Filter - override these variables in your theme/Customizer CSS to restyle.
 * Defaults are chosen to meet WCAG 2.2 AA (text 4.5:1, UI component borders 3:1).
 * If you change colours, keep those ratios. */
.rf,
.rf-chips,
.rf-tags,
.rf-type,
.rf-bar,
.rf-views,
.rf-results,
.rf-pc-item,
.rf-map-wrap,
.rf-drawer {
	--rf-ink: #1d3a2f;     /* text + selected state: 12.4:1 on white */
	--rf-muted: #3d5247;   /* secondary text: 8.4:1 on white */
	--rf-border: #5f7168;  /* control borders: 5.2:1 on white, 4.6:1 on #eaf3ee */
	--rf-line: #d3ddd8;    /* decorative dividers only (not used to identify controls) */
	--rf-surface: #fff;
	--rf-action: #223f6e;  /* navy: Filters button and selected states on the church search page */
	--rf-cta: #fdd878;     /* yellow: the Update results button */
}

/* Visually hidden, still read by screen readers. */
.rf-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ---- Form layout ---- */
.rf {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
	gap: 1.5rem 2rem;
	color: var(--rf-ink);
}
.rf--no-focus { grid-template-columns: minmax(0, 1fr); }
.rf fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.rf legend,
.rf__label { display: block; margin: 0 0 .6rem; padding: 0; font-weight: 700; }
.rf__field + .rf__field { margin-top: 1.5rem; }
.rf input[type="search"] {
	width: 100%;
	padding: .9rem 1rem;
	border: 2px solid var(--rf-ink);
	border-radius: 6px;
	background: var(--rf-surface);
	color: var(--rf-ink);
	font: inherit;
}
.rf input[type="search"]::placeholder { color: #56675f; opacity: 1; } /* 6.0:1 on white */
.rf input[type="search"]:focus-visible { outline: 3px solid var(--rf-ink); outline-offset: 2px; }

/* ---- Type pills ---- */
.rf-pills { display: flex; flex-wrap: wrap; gap: .6rem; }
.rf-pill { position: relative; margin: 0; cursor: pointer; }
.rf-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.rf-pill span {
	display: inline-block;
	min-height: 24px;
	padding: .65rem 1.2rem;
	border: 2px solid var(--rf-border);
	border-radius: 999px;
	background: var(--rf-surface);
	color: var(--rf-ink);
	overflow-wrap: anywhere;
}
/* "+" / tick give a non-colour cue. The "/ ''" alt text stops screen readers
   announcing the symbol (the checkbox already announces its state). */
.rf-pill span::before { content: "+\00a0\00a0"; content: "+\00a0\00a0" / ""; }
.rf-pill input:checked + span { background: var(--rf-ink); border-color: var(--rf-ink); color: #fff; }
.rf-pill input:checked + span::before { content: "\2713\00a0\00a0"; content: "\2713\00a0\00a0" / ""; }
.rf-pill input:focus-visible + span { outline: 3px solid var(--rf-ink); outline-offset: 3px; }

/* ---- Focus cards ---- */
.rf-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.rf-card { position: relative; margin: 0; cursor: pointer; }
.rf-card input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.rf-card__body {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .5rem;
	height: 100%;
	padding: .9rem .5rem;
	border: 2px solid var(--rf-border);
	border-radius: 10px;
	background: var(--rf-surface);
	color: var(--rf-ink);
	font-weight: 600;
	text-align: center;
	overflow-wrap: anywhere;
}
.rf-card__body img {
	width: 56px;
	height: 56px;
	object-fit: contain; /* The icon files already include their own ring and tint. */
}
.rf-card input:checked + .rf-card__body {
	border-color: var(--rf-ink);
	background: #eef2fb; /* fallback */
	background: var(--focus-bg, color-mix(in srgb, var(--focus, var(--rf-ink)) 10%, #fff));
}
/* Tick badge: selection is shown by more than colour. */
.rf-card input:checked + .rf-card__body::after {
	content: "\2713";
	content: "\2713" / "";
	position: absolute;
	top: .35rem;
	right: .35rem;
	display: grid;
	place-items: center;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	background: var(--rf-ink);
	color: #fff;
	font-size: .875em;
	line-height: 1;
}
.rf-card input:focus-visible + .rf-card__body { outline: 3px solid var(--rf-ink); outline-offset: 3px; }

/* ---- Buttons ---- */
.rf__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .75rem; }
.rf-btn {
	display: inline-block;
	min-height: 24px;
	padding: .85rem 2rem;
	border: 2px solid var(--rf-ink);
	border-radius: 999px;
	background: transparent;
	color: var(--rf-ink);
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}
.rf-btn--primary { background: var(--rf-ink); color: #fff; }
.rf-btn:focus-visible { outline: 3px solid var(--rf-ink); outline-offset: 3px; }

/* ---- Active filter chips ---- */
.rf-chips { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.rf-chip {
	display: inline-block;
	min-height: 24px;
	padding: .6rem 1.1rem;
	border: 2px solid var(--rf-ink);
	border-radius: 999px;
	background: var(--rf-ink);
	color: #fff;
	text-decoration: none;
}
a.rf-chip:hover,
a.rf-chip:focus { color: #fff; text-decoration: underline; }
a.rf-chip:focus-visible { outline: 3px solid var(--rf-ink); outline-offset: 3px; }

/* ---- Result card tags (not interactive; text carries the meaning) ---- */
.rf-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.rf-tag {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .35rem .8rem;
	border: 1px solid var(--rf-line);
	border-radius: 999px;
	background: var(--rf-surface);
	color: var(--rf-ink);
	font-size: .875em;
	line-height: 1.2;
}
.rf-tag--focus {
	border-color: var(--focus, var(--rf-ink));
	background: var(--focus-bg, color-mix(in srgb, var(--focus, var(--rf-ink)) 8%, #fff));
}
.rf-tag img { width: 22px; height: 22px; border-radius: 50%; object-fit: contain; }

/* ---- Card type label ---- */
.rf-type { margin: 0; color: var(--rf-muted); font-size: .875em; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
	.rf { grid-template-columns: minmax(0, 1fr); }
	.rf-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Windows High Contrast / forced colours: backgrounds are removed, so
   make selection and focus visible with system colours. ---- */
@media (forced-colors: active) {
	.rf-pill input:checked + span,
	.rf-card input:checked + .rf-card__body { border-color: Highlight; outline: 2px solid Highlight; }
	.rf-card input:checked + .rf-card__body::after { background: Highlight; color: HighlightText; }
	.rf-pill input:focus-visible + span,
	.rf-card input:focus-visible + .rf-card__body,
	.rf-btn:focus-visible,
	a.rf-chip:focus-visible { outline: 3px solid CanvasText; }
}

/* ---- Result count + admin hint ---- */
.rf-summary { margin: 0 0 1rem; color: var(--rf-muted, #3d5247); font-size: 1em; }
.rf-notice { margin: 0 0 1rem; padding: .6rem .8rem; border-left: 4px solid #b45309; background: #fff7ed; color: #1d3a2f; }

/* ---- Archive icon block ---- */
.rf-icon { --rf-icon-size: 160px; }
.rf-icon img,
.rf-icon__placeholder {
	display: block;
	box-sizing: border-box;
	width: var(--rf-icon-size);
	height: var(--rf-icon-size);
	border-radius: 50%; /* The icon files already include their own ring and tint. */
	box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
	object-fit: contain;
}
.rf-icon--plain img { border-radius: 0; box-shadow: none; }
.rf-icon__placeholder { padding: calc(var(--rf-icon-size) * .12); border: 4px dashed #8a9a92; border-radius: 50%; border-style: dashed; border-color: #8a9a92; box-shadow: none; }

/* ---- Place Search (address + keyword) ---- */
.rf input[type="text"] {
	width: 100%;
	box-sizing: border-box;
	padding: .9rem 1rem;
	border: 2px solid var(--rf-ink);
	border-radius: 6px;
	background: var(--rf-surface);
	color: var(--rf-ink);
	font: inherit;
}
.rf input[type="text"]:focus-visible { outline: 3px solid var(--rf-ink, #1d3a2f); outline-offset: 2px; }
.rf input[type="text"][aria-invalid="true"] { border-color: #b45309; }
.rf__hint { margin: .4rem 0 0; color: var(--rf-muted, #3d5247); font-size: .875em; }
.rf-place .rf__field + .rf__field { margin-top: 0; }
.rf-note { grid-column: 1 / -1; margin: 0 0 1rem; color: var(--rf-muted, #3d5247); font-size: 1em; }
.rf-place .rf-notice, .rf-place .rf-note { grid-column: 1 / -1; }
.rf-distance { margin: 0; color: var(--rf-muted, #3d5247); font-size: .875em; }

/* ---- Place Search: panel buttons, select, results bar, view links ---- */
.rf-select {
	width: 100%;
	box-sizing: border-box;
	padding: .8rem 1rem;
	border: 2px solid var(--rf-ink);
	border-radius: 999px;
	background: var(--rf-surface, #fff);
	color: var(--rf-ink);
	font: inherit;
}
.rf-select:focus-visible { outline: 3px solid var(--rf-ink); outline-offset: 2px; }
.rf-btn--dark { background: var(--rf-ink); color: #fff; }
.rf__actions--stack { flex-direction: column; align-items: stretch; justify-content: flex-start; }
.rf__actions--stack .rf-btn { text-align: center; }
.rf-place .rf__field + .rf__field { margin-top: 1rem; }
.rf-place .rf__main { display: block; } /* stacked panel; the filters page re-grids it */
.rf-fp__loc .rf__field + .rf__field { margin-top: 0; }

.rf-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1.5rem; }
.rf-bar__count { margin: 0; font-size: 1.25em; font-weight: 700; }
.rf-views ul { display: flex; margin: 0; padding: 0; list-style: none; border: 2px solid var(--rf-ink); border-radius: 999px; overflow: hidden; }
.rf-view { display: block; padding: .6rem 1.2rem; color: var(--rf-ink); text-decoration: none; font-weight: 600; }
.rf-view:hover { text-decoration: underline; }
.rf-view.is-current { background: var(--rf-ink); color: #fff; }
.rf-view:focus-visible { outline: 3px solid var(--rf-ink); outline-offset: -5px; }
.rf-view.is-current:focus-visible { outline-color: #fff; }

/* Grid / List: put the class "place-grid" on the element that holds the cards. */
body.rf-place-view-list .place-grid { grid-template-columns: minmax(0, 1fr) !important; }
body.rf-place-view-map .place-grid { grid-template-columns: minmax(0, 1fr) !important; }

/* ---- Map ---- */
.rf-map-wrap { margin: 0 0 1.5rem; }
.rf-map { height: 420px; border: 2px solid var(--rf-ink); border-radius: 10px; overflow: hidden; }
.rf-map--preview, .rf-map__fallback { padding: 1rem; }
.rf-skip { position: absolute; left: -9999px; }
.rf-skip:focus { position: static; display: inline-block; margin: 0 0 .5rem; padding: .5rem .8rem; background: #fff; color: var(--rf-ink); outline: 3px solid var(--rf-ink); }
.rf-pin { background: none; border: 0; }
.rf-pin span { display: block; width: 24px; height: 24px; box-sizing: border-box; border-radius: 50%; background: var(--rf-ink); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--rf-ink); }
.rf-pin:focus-visible { outline: 3px solid #b45309; outline-offset: 3px; border-radius: 50%; }

/* ---- Filters page ---- */
.rf-fp { color: var(--rf-ink); }
.rf-fp__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1.5rem; }
.rf-back, .rf-applied { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem 1rem; color: var(--rf-ink); font-weight: 600; text-decoration: none; }
.rf-back:hover, .rf-applied:hover { text-decoration: underline; }
.rf-applied { border: 2px solid var(--rf-ink); border-radius: 999px; }
.rf-back:focus-visible, .rf-applied:focus-visible { outline: 3px solid var(--rf-ink); outline-offset: 3px; }
.rf-fp__loc { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; align-items: start; gap: 1.5rem; margin: 0 0 2rem; }
.rf-fp__loc > .rf-btn { align-self: start; margin-top: 2rem; }
.rf-fp__title { margin: 0 0 1rem; }

.rf-tablist { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.5rem; }
.rf-tab { appearance: none; padding: .7rem 1rem; border: 2px solid transparent; border-radius: 6px; background: none; color: var(--rf-ink); font: inherit; font-weight: 600; cursor: pointer; }
.rf-tab:hover { text-decoration: underline; }
.rf-tab[aria-selected="true"] { border-color: var(--rf-ink); }
.rf-tab:focus-visible, .rf-panel:focus-visible { outline: 3px solid var(--rf-ink); outline-offset: 2px; }
.rf-panel { margin: 0 0 2rem; }
.rf-panel[hidden] { display: none; }
.rf-panel__head h3 { margin: 0 0 .25rem; }
.rf-panel__head p { margin: 0 0 1.5rem; color: var(--rf-muted, #3d5247); }
.rf-facets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.rf-facet { margin: 0; padding: 1.25rem; border: 0; border-radius: 10px; background: rgba(0, 0, 0, .035); min-width: 0; }
.rf-facet legend { padding: 0; font-weight: 700; }
.rf-facet__help { margin: .25rem 0 .5rem; color: var(--rf-muted, #3d5247); }
.rf-facet__options { display: grid; gap: .5rem 1rem; margin-top: .75rem; }
.rf-facet__options--checkbox { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rf-opt { display: flex; align-items: center; gap: .6rem; min-height: 2rem; cursor: pointer; }
.rf-opt input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--rf-ink); flex: none; }
.rf-opt input:focus-visible { outline: 3px solid var(--rf-ink); outline-offset: 2px; }

.rf-fp__sticky { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 1rem; margin-top: 2rem; padding: 1rem 1.25rem; background: #fde9a2; }
.rf-fp__note { margin: 0 auto 0 0; font-weight: 600; }
html:has(.rf-fp__sticky) { scroll-padding-bottom: 8rem; } /* WCAG 2.2: keep focused controls out from under the bar */

@media (max-width: 900px) {
	.rf-fp__loc { grid-template-columns: minmax(0, 1fr); }
	.rf-fp__loc > .rf-btn { margin-top: 0; }
	.rf-facets, .rf-facet__options--checkbox { grid-template-columns: minmax(0, 1fr); }
	.rf-fp__note { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .rf-map * { transition: none !important; } }
@media (forced-colors: active) {
	.rf-view.is-current, .rf-tab[aria-selected="true"] { outline: 2px solid CanvasText; }
	.rf-pin span { background: CanvasText; border-color: Canvas; }
}

/* ---- Place Finder layout + cards ---- */
.rf-finder__layout { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 2rem; align-items: start; }
.rf-finder__side { padding: 1.5rem; border: 1px solid var(--rf-border, #5f7168); border-radius: 12px; background: var(--rf-surface, #fff); }
.rf-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.rf-results--list, .rf-results--map { grid-template-columns: minmax(0, 1fr); }
.rf-pc-item { margin: 0; padding: 0; list-style: none; }
.rf-pc { display: flex; flex-direction: column; height: 100%; box-sizing: border-box; padding: 1.25rem; border: 1px solid var(--rf-line, #cdd6d1); border-radius: 12px; background: var(--rf-surface, #fff); }
.rf-pc__media { margin: 0 0 1rem; }
.rf-pc__img { display: block; width: 100%; height: 220px; object-fit: cover; border-radius: 6px; }
.rf-pc__noimg { width: 100%; height: 220px; border-radius: 6px; background: #e4ebe7; }
.rf-pc__title { margin: 0 0 .25rem; font-size: 1.5em; line-height: 1.2; }
.rf-pc__title a { color: inherit; text-decoration: underline; }
.rf-pc__title a:focus-visible { outline: 3px solid var(--rf-ink); outline-offset: 3px; }
.rf-pc__meta { margin: 0 0 .75rem; color: var(--rf-muted, #3d5247); }
.rf-pc__excerpt { margin: 0 0 1rem; }
.rf-pc__facts { display: flex; flex-wrap: wrap; gap: .5rem; margin: auto 0 0; padding: 0; list-style: none; }
.rf-pc__facts li { margin: 0; padding: .3rem .8rem; border: 1px solid #e0b43c; border-radius: 999px; background: #fffdf4; }
.rf-pc__placeholder { font-style: italic; }
.rf-results--list .rf-pc { flex-direction: row; gap: 1.5rem; }
.rf-results--list .rf-pc__media { flex: 0 0 260px; margin: 0; }
.rf-results--list .rf-pc__body { flex: 1 1 auto; min-width: 0; }
.rf-empty { margin: 0; padding: 1.5rem; border: 1px dashed var(--rf-border, #5f7168); border-radius: 12px; }

.rf-pages ul { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.rf-page { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; box-sizing: border-box; padding: 0 .9rem; border: 2px solid var(--rf-ink); border-radius: 999px; color: var(--rf-ink); font-weight: 600; text-decoration: none; background: transparent; }
a.rf-page:hover { text-decoration: underline; }
a.rf-page:focus-visible { outline: 3px solid var(--rf-ink); outline-offset: 3px; }
.rf-page.is-current { background: var(--rf-ink); color: #fff; }

@media (max-width: 900px) {
	.rf-finder__layout { grid-template-columns: minmax(0, 1fr); }
	.rf-results { grid-template-columns: minmax(0, 1fr); }
	.rf-results--list .rf-pc { flex-direction: column; }
	.rf-results--list .rf-pc__media { flex-basis: auto; }
}
@media (forced-colors: active) { .rf-page.is-current { outline: 2px solid CanvasText; } }

/* ---- Filters panel: a 90%-wide sheet on the results page, with a strip of the results peeking out below ---- */
.rf-sheet { width: 90%; max-width: 1200px; margin: 0 auto; box-sizing: border-box; padding: clamp(1rem, 3vw, 2rem); border-radius: 16px 16px 0 0; background: var(--rf-surface, #fff); box-shadow: 0 -2px 18px rgba(0, 0, 0, .15); position: relative; z-index: 1; }
.rf-peek { width: 100%; max-height: 12rem; overflow: hidden; margin-top: -1px; padding-top: 1.5rem; pointer-events: none; user-select: none; }
.rf-peek .rf-results { margin-top: 0; }
@media (max-width: 900px) { .rf-sheet { width: 100%; border-radius: 0; } }

/* ---- Filters flyout: opens over the navy bar and the results area only (the site header and green band stay visible) ---- */
.rf-finder { position: relative; }
.rf-drawer {
	position: absolute; z-index: 20; top: 0; left: var(--rf-drawer-left, calc(50% - 50vw));
	box-sizing: border-box; width: var(--rf-drawer-width, 100vw); max-width: 100vw; min-height: 100%; height: auto;
	margin: 0; padding: 0; border: 0;
	background: var(--rf-surface, #fff); color: var(--rf-ink);
	box-shadow: 4px 0 24px rgba(0, 0, 0, .25);
}
.rf-drawer[open] { animation: rf-fade-in .2s ease-out; }
.rf-drawer__inner { display: flex; flex-direction: column; box-sizing: border-box; min-height: 100%; padding: 0 var(--rf-pad, 1.5rem) 0; }
.rf-drawer .rf-fp { display: flex; flex: 1; flex-direction: column; }
.rf-drawer .rf-fp__sticky { margin-top: auto; margin-inline: calc(var(--rf-pad, 1.5rem) * -1); padding-inline: var(--rf-pad, 1.5rem); }
.rf-back { appearance: none; background: none; border: 0; font: inherit; cursor: pointer; }
/* While the flyout is open, the bar and results underneath are dimmed (and made inert by the script). */
.rf-finder.is-filtering > .rf-bar, .rf-finder.is-filtering > .rf-finder__layout { opacity: .35; }
@keyframes rf-fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rf-drawer[open] { animation: none; } }

/* The navy bar inside the flyout: "Back to results" and the "N filters applied" pill. */
.rf-drawer .rf-fp__top { margin: 0 calc(var(--rf-pad, 1.5rem) * -1) 2rem; padding: 1.25rem var(--rf-pad, 1.5rem); background: var(--rf-action); color: #fff; }
.rf-drawer .rf-back { padding: .4rem 0; color: #fff; font-weight: 600; font-size: 1em; }
.rf-drawer .rf-back:hover { text-decoration: underline; }
.rf-drawer .rf-back:focus-visible, .rf-drawer .rf-applied:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.rf-drawer .rf-applied { gap: .6rem; padding: .6rem 1.25rem; border-radius: 999px; background: #fff; color: var(--rf-action); font-size: 1em; font-weight: 600; text-decoration: none; }
.rf-drawer .rf-applied:hover { text-decoration: underline; }
.rf-drawer .rf-applied::before { content: ""; width: 1.1em; height: 1.1em; background: currentColor; -webkit-mask: var(--rf-icon) center / contain no-repeat; mask: var(--rf-icon) center / contain no-repeat; --rf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h18l-7 8.5V20l-4-2v-4.5z'/%3E%3C/svg%3E"); }

/* ---- Fallback map image on cards with no photo ---- */
.rf-pc__map { position: relative; width: 100%; height: 220px; overflow: hidden; border-radius: 6px; background: #e4ebe7; }
.rf-pc__mapgrid { position: absolute; left: 50%; top: 50%; width: 768px; height: 512px; transform: translate(calc(var(--mx) * -1), calc(var(--my) * -1)); }
.rf-pc__mapgrid img { position: absolute; display: block; width: 256px; height: 256px; max-width: none; border-radius: 0; }
.rf-pc__pin { position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; box-sizing: border-box; border-radius: 50%; background: var(--rf-ink); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--rf-ink); }
.rf-pc__credit { position: absolute; right: 0; bottom: 0; padding: 1px 6px; background: rgba(255, 255, 255, .88); color: #1d3a2f; font-size: .75em; }
.rf-results--list .rf-pc__map { height: 180px; }
@media (forced-colors: active) { .rf-pc__pin { background: CanvasText; border-color: Canvas; } }

/* ---- Church search page: match the design ---- */
/* Buttons: Filters navy, Update results yellow. */
.rf-place .rf-btn--dark { background: var(--rf-action); border-color: var(--rf-action); color: #fff; }
.rf-place .rf-btn--primary { background: var(--rf-cta); border-color: var(--rf-cta); color: var(--rf-ink); }
.rf-place .rf-btn--dark:hover, .rf-place .rf-btn--primary:hover { filter: brightness(.95); }

/* Cards: rounder, roomier, with a divider under the title and bigger text. */
.rf-pc { padding: 1.5rem; border-color: #dde3e6; border-radius: 20px; }
.rf-pc__img, .rf-pc__noimg, .rf-pc__map { border-radius: 4px; }
.rf-pc__title { font-size: 1.5em; font-weight: 700; line-height: 1.15; }
.rf-pc__meta { margin: 0 0 1rem; padding-bottom: 1rem; border-bottom: 1px solid #dde3e6; font-size: 1em; }
.rf-pc__excerpt { font-size: 1em; line-height: 1.5; }

/* Fact pills (address, distance, membership): amber outline, with an icon. */
.rf-pc__facts li { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem 1rem; border: 1.5px solid #f0b429; background: #fff; font-size: .875em; font-weight: 600; font-style: normal; }
.rf-pc__facts li::before { content: ""; flex: none; width: 1.1em; height: 1.1em; background: currentColor; -webkit-mask: var(--rf-fact-icon) center / contain no-repeat; mask: var(--rf-fact-icon) center / contain no-repeat; }
.rf-pc__facts li:not([class*="rf-pc__fact--"])::before { display: none; }
.rf-pc__fact--address { --rf-fact-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6.5-5.6-6.5-11a6.5 6.5 0 0 1 13 0c0 5.4-6.5 11-6.5 11z'/%3E%3Ccircle cx='12' cy='10' r='2.4'/%3E%3C/svg%3E"); }
.rf-pc__fact--distance { --rf-fact-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 3L3 10.5l7.5 3L13.5 21 21 3z'/%3E%3C/svg%3E"); }
.rf-pc__fact--membership { --rf-fact-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21V11a8 8 0 0 1 16 0v10M8 21v-9a4 4 0 0 1 8 0v9M12 21v-6'/%3E%3C/svg%3E"); }

/* ---- Church search header (green band) and the search panel heading ---- */
body:has(.rf-hero) { overflow-x: clip; }
.rf-hero {
	/* Full screen width; the content below lines up with the page's own container. */
	margin-inline: calc(50% - 50vw);
	padding: 40px calc(50vw - 50%);
	background: linear-gradient(90deg, #5c7d4c 0%, #97b758 45%, #d3e05e 100%);
	color: #fff;
}
.rf-hero__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.rf-hero a { color: inherit; text-decoration: none; }
.rf-hero a:hover, .rf-hero a:focus-visible { text-decoration: underline; }
.rf-hero__crumbs ol { display: flex; flex-wrap: wrap; gap: .4em; margin: 0 0 12px; padding: 0; list-style: none; font-size: .875em; }
.rf-hero__crumbs li + li::before { content: "/"; margin-right: .4em; }
.rf-hero__title { margin: 0; color: inherit; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 700; line-height: 1.1; }
.rf-hero__sub { margin: 16px 0 0; font-size: 1.125em; }
.rf-hero__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 13rem; height: 13rem; border-radius: 50%; background: rgba(255, 255, 255, .18); color: #fff; }
.rf-hero__icon:empty { display: none; }
.rf-hero__icon svg { width: 60%; height: 60%; fill: none; stroke: currentColor; }
@media (max-width: 782px) { .rf-hero__icon { display: none; } }

.rf-place__heading { margin: 0 0 .5rem; font-size: 1.5em; font-weight: 700; line-height: 1.2; color: var(--rf-ink); }
.rf-place__intro { margin: 0 0 1.25rem; color: var(--rf-muted, #3d5247); }

/* ---- Results bar: full-width navy band with the count and the Grid / List / Map pill ---- */
body:has(.rf-bar) { overflow-x: clip; }
.rf-bar {
	display: block;
	margin: 0 calc(50% - 50vw) 2rem;
	padding: 1.25rem calc(50vw - 50%);
	background: var(--rf-action);
	color: #fff;
}
.rf-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.rf-bar .rf-bar__count { margin: 0; color: inherit; font-size: 1.25em; font-weight: 600; }
.rf-bar .rf-views ul { border: 1.5px solid #fff; background: transparent; padding: 3px; gap: 2px; }
.rf-bar .rf-view { display: flex; align-items: center; gap: .5rem; padding: .55rem 1.1rem; border-radius: 999px; color: #fff; font-weight: 500; }
.rf-bar .rf-view.is-current { background: #fff; color: var(--rf-action); font-weight: 700; }
.rf-bar .rf-view:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.rf-bar .rf-view.is-current:focus-visible { outline-color: var(--rf-cta); }
.rf-bar .rf-view::before { content: ""; width: 1.1em; height: 1.1em; background: currentColor; -webkit-mask: var(--rf-view-icon) center / contain no-repeat; mask: var(--rf-view-icon) center / contain no-repeat; }
.rf-view--grid { --rf-view-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='6.5' height='6.5' rx='1'/%3E%3Crect x='13.5' y='4' width='6.5' height='6.5' rx='1'/%3E%3Crect x='4' y='13.5' width='6.5' height='6.5' rx='1'/%3E%3Crect x='13.5' y='13.5' width='6.5' height='6.5' rx='1'/%3E%3C/svg%3E"); }
.rf-view--list { --rf-view-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11M4.5 6h.01M4.5 12h.01M4.5 18h.01'/%3E%3C/svg%3E"); }
.rf-view--map { --rf-view-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linejoin='round'%3E%3Cpath d='M3 6l6-2 6 2 6-2v14l-6 2-6-2-6 2zM9 4v14M15 6v14'/%3E%3C/svg%3E"); }
@media (forced-colors: active) { .rf-bar .rf-view.is-current { outline: 2px solid CanvasText; } }

/* Fact pills: flush with the card's text (themes indent lists inside content), with the design's pale yellow fill. */
.rf-pc .rf-pc__facts { margin: auto 0 0; padding: 0; list-style: none; }
.rf-pc .rf-pc__facts li { margin: 0; list-style: none; background: #fff8e0; }
.rf-pc .rf-pc__facts li::marker { content: none; }

/* ---- Church search page: off-white background behind the panel and cards (full width, below the navy bar) ---- */
.rf-finder { --rf-page: #f8f7f1; }
.rf-finder .rf-bar { margin-bottom: 0; }
.rf-finder .rf-finder__layout {
	margin-inline: calc(50% - 50vw);
	padding: 2rem calc(50vw - 50%) 3rem; /* content lines up with the page's own container */
	background: var(--rf-page);
}

/* ---- Search panel icons: Filters, Reset and the Location label ---- */
.rf-place .rf-btn--dark, .rf-place .rf-btn--reset { display: flex; align-items: center; justify-content: center; gap: .6rem; }
.rf-place .rf-btn--dark::before, .rf-place .rf-btn--reset::before,
.rf__label--location::before { content: ""; flex: none; width: 1.15em; height: 1.15em; background: currentColor; -webkit-mask: var(--rf-icon) center / contain no-repeat; mask: var(--rf-icon) center / contain no-repeat; }
.rf-place .rf-btn--dark { --rf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h18l-7 8.5V20l-4-2v-4.5z'/%3E%3C/svg%3E"); }
.rf-place .rf-btn--reset { --rf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 12a8.5 8.5 0 1 0 2.6-6.1L3.5 8.5M3.5 3.5v5h5'/%3E%3C/svg%3E"); }
.rf__label--location { display: flex; align-items: center; gap: .5rem; --rf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6.5-5.6-6.5-11a6.5 6.5 0 0 1 13 0c0 5.4-6.5 11-6.5 11z'/%3E%3Ccircle cx='12' cy='10' r='2.4'/%3E%3C/svg%3E"); }

/* ---- Search panel: tighter spacing, and the distance menu looks like a dropdown ---- */
.rf-place { row-gap: 0; }
.rf-place .rf-place__heading { margin: 0 0 .5rem; font-size: 1.5em; font-weight: 700; line-height: 1.2; color: var(--rf-ink); }
.rf-place .rf-place__intro { margin: 0 0 1.25rem; line-height: 1.45; }
.rf-place .rf__field + .rf__field { margin-top: 1rem; }
.rf-place .rf__label { margin-bottom: .4rem; }
.rf-place .rf__hint { margin-top: .3rem; }
.rf-place .rf__actions--stack { margin-top: 1.75rem; gap: .75rem; }

/* Same box as the text fields (square-ish corners, same border and height), with a chevron on the right. */
.rf-select {
	padding: .9rem 2.75rem .9rem 1rem;
	border: 2px solid var(--rf-ink);
	border-radius: 6px;
	-webkit-appearance: none;
	appearance: none;
	background-color: var(--rf-surface, #fff);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d3a2f' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	background-size: 1.1rem;
	cursor: pointer;
}


/* ====== Filters flyout, second pass: matches the design (fields, buttons, tabs, panel, bottom bar) ====== */
.rf-drawer { --rf-green: #4d6b1f; --rf-soft: #f7f7f2; }
.rf-drawer__inner { padding: 0 var(--rf-pad-end, var(--rf-pad, 2rem)) 0 var(--rf-pad, 2rem); }
.rf-drawer .rf-fp__top { margin-inline: calc(var(--rf-pad, 2rem) * -1) calc(var(--rf-pad-end, var(--rf-pad, 2rem)) * -1); padding-inline: var(--rf-pad, 2rem) var(--rf-pad-end, var(--rf-pad, 2rem)); }

/* Town or postcode: a wide, square-cornered box with a navy border, like the design. */
.rf-fp input[type="text"] {
	width: 100%; box-sizing: border-box; min-height: 3.5rem; padding: 0 1rem;
	border: 1px solid var(--rf-action, var(--rf-ink)); border-radius: 0; background: #fff; color: var(--rf-ink); font: inherit;
}
.rf-fp input[type="text"]:focus-visible { outline: 3px solid var(--rf-action, var(--rf-ink)); outline-offset: 2px; }
.rf-fp input[type="text"][aria-invalid="true"] { border-color: #b45309; }
.rf-fp .rf__field { margin: 0; min-width: 0; }
.rf-fp .rf__label { display: block; margin: 0 0 .5rem; font-weight: 700; }
.rf-fp .rf__label--location { display: flex; }
.rf-fp .rf-select { min-height: 3.5rem; padding: 0 2.75rem 0 1rem; border: 1px solid var(--rf-action, var(--rf-ink)); border-radius: 999px; }

/* Row: wide text box, then Location (left aligned, straight after it), then Update results at the far right. */
.rf-fp__loc { grid-template-columns: minmax(0, 45%) minmax(11rem, 1fr) auto; justify-content: stretch; align-items: start; column-gap: 1.5rem; }
.rf-fp__loc > .rf-btn { justify-self: end; margin-top: 2rem; }
.rf-fp__loc .rf-select { width: 100%; max-width: 16rem; }

/* Update results: yellow pill with a refresh icon (Astra's own button states are reset too). */
.rf-fp .rf-btn--update, .rf-fp .rf-btn--update:hover, .rf-fp .rf-btn--update:focus, .rf-fp .rf-btn--update:active {
	display: inline-flex; align-items: center; gap: .6rem; min-height: 3.5rem; padding: 0 1.5rem; border: 2px solid var(--rf-cta); border-radius: 999px;
	background: var(--rf-cta); color: var(--rf-ink); font-weight: 700; box-shadow: none;
}
.rf-fp .rf-btn--update:hover { filter: brightness(.96); }
.rf-fp .rf-btn--update::before, .rf-fp .rf-btn--clear::before { content: ""; flex: none; width: 1.15em; height: 1.15em; background: currentColor; -webkit-mask: var(--rf-icon) center / contain no-repeat; mask: var(--rf-icon) center / contain no-repeat; }
.rf-fp .rf-btn--update { --rf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 12a8.5 8.5 0 1 0 2.6-6.1L3.5 8.5M3.5 3.5v5h5'/%3E%3C/svg%3E"); }
.rf-fp .rf-btn--clear { --rf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }

/* Group icons (copied from the profile page). */
.rf-gicon { display: inline-flex; flex: none; width: 1.75rem; height: 1.75rem; }
.rf-gicon svg { display: block; width: 100%; height: 100%; }

/* Tabs: same look as the profile page tabs (bold, soft background and blue border when selected), on a white band with a shadow. */
.rf-fp .rf-tablist { gap: .5rem 1rem; align-items: center; justify-content: space-between; }
.rf-fp .rf-tab, .rf-fp .rf-tab:hover, .rf-fp .rf-tab:focus, .rf-fp .rf-tab:active {
	display: inline-flex; align-items: center; gap: .6rem; padding: 10px 14px; border: 1px solid transparent; border-radius: 8px;
	background: none; color: var(--ic-dark, var(--rf-ink)); font: inherit; font-weight: 700; text-decoration: none; box-shadow: none;
}
.rf-fp .rf-tab:not([aria-selected="true"]):hover, .rf-fp .rf-tab:not([aria-selected="true"]):focus { background: #f3f8fa; border-color: #9fc3d6; }
.rf-fp .rf-tab[aria-selected="true"], .rf-fp .rf-tab[aria-selected="true"]:hover, .rf-fp .rf-tab[aria-selected="true"]:focus { background: rgba(217, 235, 238, .2); border-color: #b7d8f7; }
.rf-fp .rf-tab:focus-visible { outline: 3px solid #1a73e8; outline-offset: 2px; }
.rf-fp .rf-tab__count { font-weight: 700; }
.rf-drawer .rf-tablist {
	margin: 0 calc(var(--rf-pad-end, var(--rf-pad, 2rem)) * -1) 0 calc(var(--rf-pad, 2rem) * -1);
	padding: 1rem var(--rf-pad-end, var(--rf-pad, 2rem)) 1rem var(--rf-pad, 2rem);
	background: #fff; box-shadow: 0 8px 14px -10px rgba(0, 0, 0, .3); position: relative; z-index: 1;
}

/* Panel heading: big round icon, title and green description. */
.rf-drawer .rf-panel { margin: 0; padding-top: 3rem; }
.rf-panel__head { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.5rem; }
.rf-panel__head .rf-gicon { width: 4.5rem; height: 4.5rem; }
.rf-panel__head h3 { margin: 0 0 .15rem; font-size: 1.25em; }
.rf-panel__head p { margin: 0; color: var(--rf-green, var(--rf-muted)); }
.rf-drawer .rf-panel__head p { margin: 0; }

/* Facet boxes: pale panels, bold titles, options below. */
.rf-drawer .rf-facets { align-items: start; gap: 1.5rem; }
.rf-drawer .rf-facet { padding: 1.5rem; border-radius: 12px; background: var(--rf-soft); }
.rf-drawer .rf-facet legend { float: left; width: 100%; margin: 0 0 .75rem; padding: 0; font-weight: 700; }
.rf-drawer .rf-facet legend + * { clear: both; }
.rf-drawer .rf-facet__help { margin: 0 0 .5rem; color: var(--rf-green); }
.rf-drawer .rf-facet__options { margin-top: 0; }
.rf-drawer .rf-opt input { accent-color: var(--rf-action); }
.rf-drawer .rf-tabs { padding-bottom: 3rem; border-bottom: 1px solid var(--rf-line); margin-bottom: 3.5rem; }

/* Bottom bar: full-width yellow band, green note on the left, white "Clear filters" and dark "Show results" pills on the right. */
.rf-drawer .rf-fp__sticky {
	justify-content: flex-end; gap: 1rem; margin-top: auto; padding: 1rem var(--rf-pad-end, var(--rf-pad, 2rem)) 1rem var(--rf-pad, 2rem);
	margin-inline: calc(var(--rf-pad, 2rem) * -1) calc(var(--rf-pad-end, var(--rf-pad, 2rem)) * -1); background: #ffe08a;
}
.rf-drawer .rf-fp__note { color: var(--rf-green); font-weight: 700; }
.rf-drawer .rf-btn--clear, .rf-drawer .rf-btn--clear:hover, .rf-drawer .rf-btn--clear:focus, .rf-drawer .rf-btn--clear:active {
	display: inline-flex; align-items: center; gap: .6rem; min-height: 3.5rem; padding: 0 1.75rem; border: 2px solid #fff; border-radius: 999px;
	background: #fff; color: var(--rf-ink); font-weight: 700; box-shadow: none;
}
.rf-drawer .rf-fp__sticky .rf-btn--dark, .rf-drawer .rf-fp__sticky .rf-btn--dark:hover, .rf-drawer .rf-fp__sticky .rf-btn--dark:focus, .rf-drawer .rf-fp__sticky .rf-btn--dark:active {
	display: inline-flex; align-items: center; min-height: 3.5rem; padding: 0 1.75rem; border: 2px solid var(--rf-ink); border-radius: 999px;
	background: var(--rf-ink); color: #fff; font-weight: 700; box-shadow: none;
}
.rf-drawer .rf-btn:hover { filter: brightness(.96); }

@media (max-width: 900px) {
	.rf-fp__loc { grid-template-columns: minmax(0, 1fr); }
	.rf-fp__loc > .rf-btn { justify-self: start; margin-top: 0; }
	.rf-drawer .rf-tablist { justify-content: flex-start; }
}


/* ====== Flyout, third pass ====== */
/* Back to results: no Astra hover/focus/active background; text stays white. */
.rf-drawer .rf-fp__top .rf-back, .rf-drawer .rf-fp__top .rf-back:hover, .rf-drawer .rf-fp__top .rf-back:focus, .rf-drawer .rf-fp__top .rf-back:active {
	background: none; background-color: transparent; border: 0; border-radius: 0; box-shadow: none; color: #fff; -webkit-text-fill-color: #fff;
}
.rf-drawer .rf-fp__top .rf-back:hover { text-decoration: underline; }
.rf-drawer .rf-fp__top .rf-back:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
/* The applied pill stays white with navy text in every state; [hidden] must win over the flex display. */
.rf-drawer .rf-applied[hidden] { display: none; }
.rf-drawer .rf-applied, .rf-drawer .rf-applied:hover, .rf-drawer .rf-applied:focus, .rf-drawer .rf-applied:active { background: #fff; color: var(--rf-action); border: 0; box-shadow: none; }
/* Show results: black with white text in every state. */
.rf-drawer .rf-fp .rf-fp__sticky button.rf-btn--dark, .rf-drawer .rf-fp .rf-fp__sticky button.rf-btn--dark:hover, .rf-drawer .rf-fp .rf-fp__sticky button.rf-btn--dark:focus, .rf-drawer .rf-fp .rf-fp__sticky button.rf-btn--dark:active {
	background: #000; background-color: #000; border-color: #000; color: #fff; -webkit-text-fill-color: #fff; box-shadow: none; text-shadow: none;
}
.rf-drawer .rf-fp .rf-fp__sticky button.rf-btn--dark::before { display: none; }
