/* ============================================================
   Front Porch of Bowdon - Events (shared .fpe-* styles)
   Loads AFTER frontend.css and layers on it: the event signup form is a
   normal .fpb-form-wrap, so every rule here only re-colours it through the
   --fpb-* variables or adds the event-only parts (.fpe-total, .fpe-closed ...).
   Nothing in frontend.css is edited, so the four lead forms are untouched.

   Mobile-first (designed at 360px). Colours checked for WCAG AA; the pairs
   are listed in the build report. #4BA2AC (brand teal) is never used for text.
   Avada styles h2/h3/a globally, so text colours below are set on selectors
   with enough weight (and !important on links/buttons) to hold.
   ============================================================ */

.fpe-list,
.fpe-form-wrap,
.fpe-closed,
.fpe-empty {
	--fpe-ink: #324B4E;
	--fpe-muted: #4B6568;
	--fpe-teal: #006E78;
	--fpe-teal-deep: #00545C;
	--fpe-line: #D3E1E3;
	--fpe-tint: #EAF3F4;
	--fpe-cream: #EEE8A9;
	--fpe-cream-tint: #FAF8E6;
	--fpe-purple: #655D89;
	--fpe-purple-deep: #4F4870;
	--fpe-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
	font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	color: var(--fpe-ink);
	box-sizing: border-box;
}
.fpe-list *,
.fpe-form-wrap *,
.fpe-closed *,
.fpe-empty * {
	box-sizing: border-box;
}

/* ============================================================
   Event list  [fpb_events_list]
   ============================================================ */
.fpe-list {
	display: grid;
	gap: 20px;
	max-width: 880px;
	margin: 0 auto;
	padding: 0;
}

.fpe-list .fpe-card {
	--fpe-date-bg: #006E78;
	--fpe-date-fg: #FFFFFF;
	--fpe-kicker: #006E78;
	display: flex;
	flex-direction: column;
	background: #FFFFFF;
	border: 1px solid var(--fpe-line);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 2px 14px rgba(50, 75, 78, 0.08);
}
.fpe-list .fpe-card--holiday-meal { --fpe-date-bg: #006E78; --fpe-date-fg: #FFFFFF; --fpe-kicker: #006E78; }
.fpe-list .fpe-card--senior-prom  { --fpe-date-bg: #655D89; --fpe-date-fg: #FFFFFF; --fpe-kicker: #655D89; }
.fpe-list .fpe-card--halloween    { --fpe-date-bg: #324B4E; --fpe-date-fg: #FFFFFF; --fpe-kicker: #4F4870; }
.fpe-list .fpe-card--fall-festival{ --fpe-date-bg: #EEE8A9; --fpe-date-fg: #324B4E; --fpe-kicker: #00545C; }

/* An announcement (no signup) sits flatter than a card you can act on. */
.fpe-list .fpe-card--announce {
	background: #F6FAFA;
	box-shadow: none;
}

/* Date block: a band across the top on a phone, a square on the left from 640px. */
.fpe-list .fpe-date {
	display: grid;
	grid-template-areas: "day mon" "day dow";
	grid-template-columns: auto 1fr;
	column-gap: 14px;
	align-items: center;
	justify-content: start;
	padding: 12px 20px;
	background: var(--fpe-date-bg);
	color: var(--fpe-date-fg);
}
.fpe-list .fpe-date-mon,
.fpe-list .fpe-date-dow {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.3;
}
.fpe-list .fpe-date-mon { grid-area: mon; align-self: end; }
.fpe-list .fpe-date-dow { grid-area: dow; align-self: start; }
.fpe-list .fpe-date-day {
	grid-area: day;
	font-family: var(--fpe-serif);
	font-size: 2.6rem;
	font-weight: 700;
	line-height: 1;
}

.fpe-list .fpe-body {
	flex: 1 1 auto;
	min-width: 0;
	padding: 18px 20px 22px;
}
.fpe-list .fpe-body p {
	margin: 0 0 0.5rem;
	padding: 0;
}
.fpe-list .fpe-kicker {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--fpe-kicker);
}
.fpe-list .fpe-body .fpe-title {
	margin: 0 0 0.35rem;
	padding: 0;
	font-family: var(--fpe-serif);
	font-size: 1.45rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--fpe-ink);
}
.fpe-list .fpe-card .fpe-title a {
	color: var(--fpe-ink) !important;
	text-decoration: none;
}
.fpe-list .fpe-card .fpe-title a:hover,
.fpe-list .fpe-card .fpe-title a:focus {
	color: var(--fpe-teal-deep) !important;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.fpe-list .fpe-when {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--fpe-ink);
}
.fpe-list .fpe-summary {
	font-size: 1rem;
	line-height: 1.55;
	color: var(--fpe-ink);
}
.fpe-list .fpe-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin: 0.9rem 0 0;
}
.fpe-list .fpe-body .fpe-meta p { margin: 0; }
.fpe-list .fpe-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 12px;
	margin-top: 1.1rem;
}
.fpe-list .fpe-actions .fpe-btn { margin-top: 0; }
.fpe-list .fpe-price {
	display: inline-block;
	margin: 0;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--fpe-tint);
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--fpe-teal-deep);
}
.fpe-list .fpe-card--senior-prom .fpe-price { background: #F3F1F9; color: var(--fpe-purple-deep); }
.fpe-list .fpe-deadline {
	display: inline-block;
	margin: 0;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--fpe-ink);
}

/* Buttons */
.fpe-list .fpe-card .fpe-btn,
.fpe-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin-top: 0.75rem;
	padding: 0.65rem 1.5rem;
	border: 2px solid #006E78;
	border-radius: 8px;
	background: #006E78;
	color: #FFFFFF !important;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	cursor: pointer;
	transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.1s;
}
.fpe-list .fpe-card .fpe-btn:hover,
.fpe-list .fpe-card .fpe-btn:focus,
.fpe-btn:hover,
.fpe-btn:focus {
	background: #00545C;
	border-color: #00545C;
	color: #FFFFFF !important;
}
.fpe-list .fpe-card .fpe-btn:active,
.fpe-btn:active { transform: scale(0.98); }
.fpe-list .fpe-card .fpe-btn:focus-visible,
.fpe-btn:focus-visible {
	outline: 3px solid #324B4E;
	outline-offset: 2px;
}
.fpe-list .fpe-card .fpe-btn--alt,
.fpe-btn--alt {
	background: #FFFFFF;
	color: #00545C !important;
	border-color: #006E78;
}
.fpe-list .fpe-card .fpe-btn--alt:hover,
.fpe-list .fpe-card .fpe-btn--alt:focus,
.fpe-btn--alt:hover,
.fpe-btn--alt:focus {
	background: #EAF3F4;
	color: #00545C !important;
	border-color: #00545C;
}
.fpe-list .fpe-card--senior-prom .fpe-btn { background: #655D89; border-color: #655D89; }
.fpe-list .fpe-card--senior-prom .fpe-btn:hover,
.fpe-list .fpe-card--senior-prom .fpe-btn:focus { background: #4F4870; border-color: #4F4870; }

/* Card photo: a 16:9 band under the date on a phone, a column on the right from 640px. */
.fpe-list .fpe-photo {
	margin: 0;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #EAF3F4;
}
.fpe-list .fpe-photo img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	object-position: center 30%;
}

@media (min-width: 640px) {
	.fpe-list .fpe-card { flex-direction: row; }
	/* The photo fills the card's height but never sets it: a portrait photo
	   would otherwise stretch the card and leave a gap under the button. */
	.fpe-list .fpe-photo {
		order: 3;
		flex: 0 0 220px;
		aspect-ratio: auto;
		position: relative;
		min-height: 180px;
	}
	.fpe-list .fpe-photo img {
		position: absolute;
		inset: 0;
	}
	.fpe-list .fpe-date {
		flex: 0 0 124px;
		grid-template-areas: "mon" "day" "dow";
		grid-template-columns: 1fr;
		row-gap: 2px;
		align-content: center;
		justify-items: center;
		text-align: center;
		padding: 22px 10px;
	}
	.fpe-list .fpe-date-mon,
	.fpe-list .fpe-date-dow { align-self: auto; }
	.fpe-list .fpe-date-day { font-size: 3rem; }
	.fpe-list .fpe-body { padding: 22px 26px 24px; }
	.fpe-list .fpe-body .fpe-title { font-size: 1.6rem; }
}

/* Nothing upcoming */
.fpe-empty {
	max-width: 880px;
	margin: 0 auto;
	padding: 28px 22px;
	border: 2px dashed #95B0B4;
	border-radius: 14px;
	background: #FFFFFF;
	text-align: center;
	font-size: 1.05rem;
	color: var(--fpe-ink);
}
.fpe-empty a { color: #00545C !important; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   Event signup form  [fpb_event_signup]
   Re-coloured through frontend.css's own variables (sage -> brand teal).
   ============================================================ */
.fpe-form-wrap {
	--fpb-primary: #006E78;
	--fpb-primary-dark: #00545C;
	--fpb-accent: #EEE8A9;
	--fpb-accent-light: #EAF3F4;
	--fpb-text: #2B3F42;
	--fpb-text-muted: #4B6568;
	--fpb-border: #7A9598;          /* input outlines: 3:1 against white */
	--fpb-bg: #FFFFFF;
	--fpb-error: #A63A38;
	--fpb-success-bg: #E6F2EA;
	--fpb-success-text: #1F5A33;
	--fpe-tint: #EAF3F4;
	max-width: 640px;
	margin: 2rem auto;
	border: 1px solid var(--fpe-line);
	border-top: 6px solid var(--fpb-primary);
}
.fpe-form-wrap.fpe-form--senior-prom {
	--fpb-primary: #655D89;
	--fpb-primary-dark: #4F4870;
	--fpb-accent-light: #F3F1F9;
	--fpe-tint: #F3F1F9;
}

.fpe-form-wrap h2 {
	font-family: var(--fpe-serif);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--fpb-primary-dark);
}
.fpe-form-wrap .fpb-form-tagline { color: var(--fpb-text-muted); font-size: 1rem; }

.fpe-form-wrap .fpe-deadline-note {
	margin: 0 0 1.25rem;
	padding: 10px 14px;
	border-left: 5px solid var(--fpb-primary);
	border-radius: 0 8px 8px 0;
	background: var(--fpe-tint);
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--fpe-ink);
}

/* The markup contract names .fpb-form-row; frontend.css only knows .fpb-field-row. Same rules. */
.fpe-form-wrap .fpb-form-row {
	display: flex;
	gap: 1rem;
}
.fpe-form-wrap .fpb-form-row .fpb-field { flex: 1; min-width: 0; }

.fpe-form-wrap .fpb-field label { color: var(--fpe-ink); }
.fpe-form-wrap .fpb-field input[type="text"],
.fpe-form-wrap .fpb-field input[type="email"],
.fpe-form-wrap .fpb-field input[type="tel"],
.fpe-form-wrap .fpb-field select,
.fpe-form-wrap .fpb-field textarea {
	min-height: 44px;
	font-size: 1rem;           /* 16px: stops iOS zooming on focus */
}
.fpe-form-wrap .fpb-field input:focus,
.fpe-form-wrap .fpb-field select:focus,
.fpe-form-wrap .fpb-field textarea:focus {
	border-color: var(--fpb-primary);
	box-shadow: 0 0 0 3px rgba(0, 110, 120, 0.28);
}
.fpe-form-wrap.fpe-form--senior-prom .fpb-field input:focus,
.fpe-form-wrap.fpe-form--senior-prom .fpb-field select:focus,
.fpe-form-wrap.fpe-form--senior-prom .fpb-field textarea:focus {
	box-shadow: 0 0 0 3px rgba(101, 93, 137, 0.3);
}

/* Running total */
.fpe-form-wrap .fpe-total {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 14px;
	margin: 1.25rem 0;
	padding: 14px 18px;
	border: 1px solid var(--fpe-line);
	border-left: 6px solid var(--fpb-primary);
	border-radius: 10px;
	background: var(--fpe-tint);
}
.fpe-form-wrap .fpe-total-label {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--fpe-ink);
}
.fpe-form-wrap .fpe-total-amount {
	margin-left: auto;
	font-family: var(--fpe-serif);
	font-size: 2.1rem;
	font-weight: 700;
	line-height: 1.1;
	color: var(--fpb-primary-dark);
}
.fpe-form-wrap .fpe-total-note {
	flex: 1 0 100%;
	font-size: 0.92rem;
	color: var(--fpb-text-muted);
}

.fpe-form-wrap .fpb-btn-primary {
	width: 100%;
	justify-content: center;
	min-height: 48px;
	font-size: 1.05rem;
	color: #FFFFFF;
}
.fpe-form-wrap .fpb-form-message.fpb-error { background: #FDF3F3; }

@media (min-width: 480px) {
	.fpe-form-wrap .fpb-btn-primary { width: auto; }
}
@media (max-width: 600px) {
	.fpe-form-wrap .fpb-form-row { flex-direction: column; gap: 0; }
	.fpe-form-wrap h2 { font-size: 1.5rem; }
}

/* ============================================================
   After the deadline
   ============================================================ */
.fpe-closed {
	max-width: 640px;
	margin: 2rem auto;
	padding: 28px 24px;
	border: 1px solid var(--fpe-line);
	border-top: 6px solid #95B0B4;
	border-radius: 8px;
	background: #FFFFFF;
	text-align: center;
}
.fpe-closed h2 {
	margin: 0 0 0.5rem;
	font-family: var(--fpe-serif);
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--fpe-ink);
}
.fpe-closed p {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.6;
	color: var(--fpe-ink);
}
.fpe-closed a { color: #00545C !important; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
	.fpe-btn, .fpe-list .fpe-card .fpe-btn { transition: none; }
}
