/**
 * COD Cambridge - Prayer Wall ([cod_prayer_wall])
 *
 * COD design system only:
 *   green #154734 · lime #C7EA46 · off-white #E5E1DA · dark #101512 · page #F4F2ED
 *   radius 12 / 24 / 32 / pill · Gotham (gotham-black)
 * Selectors are scoped a few classes deep where needed so the site kit's
 * global <a> styles (letter-spacing, hover font-size, colours) cannot leak in.
 */

.cod-pw {
	font-family: gotham-black, sans-serif;
	color: #101512;
}

/* ---------- Filter pills ---------- */

.cod-pw .cod-pw-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	margin: 0 0 26px; /* filter row belongs with the wall: moderate gap to the cards */
}

.cod-pw .cod-pw-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
}

.cod-pw .cod-pw-chips .cod-pw-chip,
.cod-pw .cod-pw-chips .cod-pw-chip:hover,
.cod-pw .cod-pw-chips .cod-pw-chip:focus {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 7px 16px;
	border: 1px solid rgba(21, 71, 52, 0.22);
	border-radius: 999px;
	background: transparent;
	color: var(--cod-green, #154734);
	font-family: gotham-black, sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.cod-pw .cod-pw-chips .cod-pw-chip:hover {
	background: rgba(21, 71, 52, 0.05);
}

.cod-pw .cod-pw-chips .cod-pw-chip[aria-current="page"],
.cod-pw .cod-pw-chips .cod-pw-chip[aria-current="page"]:hover,
.cod-pw .cod-pw-chips .cod-pw-chip[aria-current="page"]:focus {
	border-color: var(--cod-green, #154734);
	background: var(--cod-lime, #C7EA46);
	color: var(--cod-green, #154734);
	font-weight: 700;
}

.cod-pw .cod-pw-chips .cod-pw-chip:focus {
	outline: none;
}

.cod-pw .cod-pw-chips .cod-pw-chip:focus-visible {
	outline: 2px solid var(--cod-green, #154734);
	outline-offset: 2px;
}

/* ---------- Grid ---------- */

.cod-pw .cod-pw-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px var(--cod-gap, 24px);
	align-items: start;
	justify-items: stretch; /* cards fill their own column and stay left-aligned in a partly filled row */ /* cards keep their natural height; no stretching to the tallest card in the row */
}

/* ---------- Cards ---------- */

.cod-pw .cod-pw-card {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
	padding: 32px 28px; /* 28px sides give the footer room for "name · 59 minutes ago" plus the control on one row in 3 columns */
	border: 1px solid rgba(16, 21, 18, 0.06);
	border-radius: 24px;
	color: var(--cod-green, #154734);
}

/* Prayer: off-white card, green type, lime accent. */
.cod-pw .cod-pw-card--prayer {
	background: var(--cod-offwhite, #E5E1DA);
	box-shadow: inset 0 3px 0 var(--cod-lime, #C7EA46);
}

/* Testimony: very soft lime tint on the page background. */
.cod-pw .cod-pw-card--testimony {
	background: #ECF0DA; /* cod-lime-tint over cod-page-bg, opaque so it never shows the page through */
	border-color: rgba(21, 71, 52, 0.14);
}

.cod-pw .cod-pw-card__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.cod-pw .cod-pw-pill {
	display: inline-flex;
	align-items: center;
	padding: 5px 11px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 1.2px;
	text-transform: uppercase;
}

.cod-pw .cod-pw-pill--prayer {
	background: var(--cod-lime, #C7EA46);
	color: var(--cod-green, #154734);
}

.cod-pw .cod-pw-pill--testimony {
	background: var(--cod-green, #154734);
	color: var(--cod-lime, #C7EA46);
}

.cod-pw .cod-pw-answered {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	border: 1px solid var(--cod-green, #154734);
	border-radius: 999px;
	color: var(--cod-green, #154734);
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 1.2px;
	text-transform: uppercase;
}

.cod-pw .cod-pw-card__text {
	margin: 0;
	color: #101512;
	font-size: 16px;
	line-height: 1.6;
	letter-spacing: 0;
	overflow-wrap: anywhere;
}

.cod-pw .cod-pw-card__foot {
	display: flex;
	flex-wrap: wrap; /* the control drops to its own row only when there is genuinely no room beside the metadata */
	align-items: center;
	gap: 6px 12px;
	margin-top: 4px;
	padding-top: 18px;
	border-top: 1px solid rgba(16, 21, 18, 0.10);
}

.cod-pw .cod-pw-card__meta {
	order: 1;
	display: flex;          /* name · time behave as one unit: the time never wraps away from the name */
	flex: 1 1 auto;
	flex-wrap: nowrap;
	align-items: baseline;
	min-width: 0;
	margin: 0;
	color: rgba(16, 21, 18, 0.68);
	font-size: 14px;
	line-height: 1.4;
	letter-spacing: 0;
}

.cod-pw .cod-pw-card__name {
	min-width: 0;
	color: var(--cod-green, #154734);
	font-weight: 700;
	overflow-wrap: anywhere; /* only a very long name may break, never the time */
}

.cod-pw .cod-pw-card__meta time {
	white-space: nowrap; /* "2 hours ago" never splits across lines */
}

.cod-pw .cod-pw-card__sep {
	flex: 0 0 auto;
	margin: 0 3px;
}

.cod-pw .cod-pw-card__category {
	order: 3;
	flex: 0 0 100%; /* always its own row, under the metadata */
	margin: -2px 0 0;
	color: rgba(16, 21, 18, 0.62);
	font-size: 13px;
	line-height: 1.4;
	letter-spacing: 0;
}

/* "I prayed" button: quiet control that sits in the footer's right column. Scoped three classes deep
 * (with :hover/:focus/:active) so the site kit's global button styles cannot leak in. */
.cod-pw .cod-pw-card .cod-pw-prayed,
.cod-pw .cod-pw-card .cod-pw-prayed:hover,
.cod-pw .cod-pw-card .cod-pw-prayed:focus,
.cod-pw .cod-pw-card .cod-pw-prayed:active {
	order: 2;
	flex: 0 0 auto; /* never shrinks */
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0 0 0 auto; /* stays on the right */
	padding: 5px 10px;
	-webkit-appearance: none;
	appearance: none;
	border: 1px solid rgba(21, 71, 52, 0.22);
	border-radius: 999px;
	outline: none;
	background: transparent;
	box-shadow: none;
	color: var(--cod-green, #154734);
	font-family: gotham-black, sans-serif;
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.cod-pw .cod-pw-card .cod-pw-prayed:hover {
	border-color: rgba(21, 71, 52, 0.5);
	background: rgba(21, 71, 52, 0.06);
}

/* Keyboard focus keeps a clear ring (the only outline this control ever shows). */
.cod-pw .cod-pw-card .cod-pw-prayed:focus-visible {
	outline: 2px solid var(--cod-green, #154734);
	outline-offset: 2px;
}

/* Prayed: one thin border, lime fill, dark green text; the tick and "Prayed" wording carry the state too. */
.cod-pw .cod-pw-card .cod-pw-prayed.is-prayed,
.cod-pw .cod-pw-card .cod-pw-prayed.is-prayed:hover,
.cod-pw .cod-pw-card .cod-pw-prayed.is-prayed:focus,
.cod-pw .cod-pw-card .cod-pw-prayed.is-prayed:active {
	border: 1px solid rgba(21, 71, 52, 0.35);
	background: var(--cod-lime, #C7EA46);
	box-shadow: none;
	cursor: default;
}

.cod-pw .cod-pw-card .cod-pw-prayed.is-prayed:focus-visible {
	outline: 2px solid var(--cod-green, #154734);
	outline-offset: 2px;
}

.cod-pw .cod-pw-card .cod-pw-prayed.is-busy {
	opacity: 0.6;
	cursor: progress;
}

/* Inert (script not ready / JS off): reads as a plain counter. */
.cod-pw .cod-pw-card .cod-pw-prayed:disabled {
	border-color: transparent;
	background: transparent;
	cursor: default;
}

.cod-pw .cod-pw-prayed__count {
	font-variant-numeric: tabular-nums;
}

.cod-pw .cod-pw-prayed-msg {
	order: 4;
	flex: 0 0 100%;
	color: #8a2b2b;
	font-size: 13px;
	line-height: 1.4;
	text-align: right;
}

/* ---------- Empty state ---------- */

.cod-pw .cod-pw-empty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	padding: 48px 40px;
	border-radius: 24px;
	background: var(--cod-offwhite, #E5E1DA);
}

.cod-pw .cod-pw-empty .cod-pw-empty__text {
	margin: 0;
	color: var(--cod-green, #154734);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.3px;
}

.cod-pw .cod-pw-cta,
.cod-pw .cod-pw-cta:hover,
.cod-pw .cod-pw-cta:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 14px 28px;
	border: 1.5px solid var(--cod-lime, #C7EA46);
	border-radius: 999px;
	background: var(--cod-lime, #C7EA46);
	color: var(--cod-green, #154734);
	font-family: gotham-black, sans-serif;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.2px;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.cod-pw .cod-pw-cta:hover {
	border-color: var(--cod-lime-hover, #B6DA38);
	background: var(--cod-lime-hover, #B6DA38);
}

.cod-pw .cod-pw-cta:focus {
	outline: none;
}

.cod-pw .cod-pw-cta:focus-visible {
	outline: 2px solid var(--cod-green, #154734);
	outline-offset: 3px;
}

/* ---------- Tablet ---------- */

@media (max-width: 1024px) {
	.cod-pw .cod-pw-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ---------- Mobile (Elementor mobile breakpoint: 767px) ---------- */

@media (max-width: 767px) {
	.cod-pw .cod-pw-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.cod-pw .cod-pw-bar {
		margin-bottom: 24px;
	}

	.cod-pw .cod-pw-card {
		padding: 26px 24px;
	}

	.cod-pw .cod-pw-empty {
		padding: 32px 24px;
	}

	.cod-pw .cod-pw-empty .cod-pw-empty__text {
		font-size: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cod-pw .cod-pw-chips .cod-pw-chip,
	.cod-pw .cod-pw-cta {
		transition: none;
	}
}

/* ---------- Page brand motif (Prayer Wall page 19727) ----------
 * A very large, cropped City of David icon-only mark (media library "Logo-icon.svg",
 * cross-in-circle, no wordmark) used as an architectural background for the whole page body
 * (intro, filters and wall). Drawn as a CSS mask so it takes COD green at ~3.5% opacity on the
 * light page background. Behind all content, clipped at the wrapper edges (so it never reaches
 * the header or footer), decorative only: no markup, no pointer events.
 * The selector uses the Elementor element id of the page wrapper (408f56fa).
 * ::after is used because Elementor already uses .e-con::before for its background overlay.
 */
.elementor-element-408f56fa {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

.elementor-element-408f56fa::after {
	--cod-pw-motif: min(64vw, 960px);
	content: "";
	position: absolute;
	z-index: -1;
	top: 40px;
	right: calc(var(--cod-pw-motif) * -0.3); /* bleeds off the right edge */
	left: auto;
	width: var(--cod-pw-motif);
	height: var(--cod-pw-motif);
	background-color: var(--cod-green, #154734);
	opacity: 0.035;
	-webkit-mask: url("/wp-content/uploads/2026/05/Logo-icon.svg") no-repeat center / contain;
	mask: url("/wp-content/uploads/2026/05/Logo-icon.svg") no-repeat center / contain;
	pointer-events: none;
}

@media (max-width: 1024px) {
	.elementor-element-408f56fa::after {
		--cod-pw-motif: 72vw;
		top: 60px;
	}
}

@media (max-width: 767px) {
	.elementor-element-408f56fa::after {
		--cod-pw-motif: 320px;
		top: 90px;
		right: -150px;
		opacity: 0.03;
	}
}

/* Very narrow screens: metadata, category, then the control (left-aligned) so nothing is squeezed. */
@media (max-width: 380px) {
	.cod-pw .cod-pw-card__meta {
		flex: 0 0 100%;
	}

	.cod-pw .cod-pw-card__category {
		order: 2;
	}

	.cod-pw .cod-pw-card .cod-pw-prayed,
	.cod-pw .cod-pw-card .cod-pw-prayed:hover,
	.cod-pw .cod-pw-card .cod-pw-prayed:focus,
	.cod-pw .cod-pw-card .cod-pw-prayed:active {
		order: 3;
		margin: 6px 0 0;
	}
}
