/**
 * WCHS Booster Calendar — front-end styles.
 *
 * Palette and type are taken from the live churchillboosterclub.com Elementor
 * kit, not invented:
 *   #002EBA  primary blue  (buttons, links, active states)
 *   #0E7F34  accent green
 *   #F8F9FA  button text / light surface
 *   #111111  body text
 *   #86898C  muted text
 *   #B8BCC4  borders
 *   #F1F1F1  page tint
 * Headings: "Sofia Sans Condensed"; body: "Inter".
 * Buttons on that site are square (border-radius 0) with 18px/40px padding.
 */

.wchs-bc {
	--wchs-blue: #002eba;
	--wchs-blue-dark: #00218a;
	--wchs-green: #0e7f34;
	--wchs-ink: #111111;
	--wchs-muted: #86898c;
	--wchs-border: #b8bcc4;
	--wchs-tint: #f1f1f1;
	--wchs-surface: #ffffff;
	--wchs-surface-alt: #f8f9fa;
	--wchs-on-blue: #f8f9fa;

	--wchs-head-font: "Sofia Sans Condensed", "Oswald", "Arial Narrow", sans-serif;
	--wchs-body-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

	--wchs-gap: 16px;
	--wchs-radius: 0px;

	font-family: var(--wchs-body-font);
	color: var(--wchs-ink);
	font-size: 16px;
	line-height: 1.5;
	box-sizing: border-box;
}

/* Explicit border-box, NOT `inherit`. This plugin ships onto a third-party
   Elementor theme we do not control; `inherit` silently yields content-box the
   moment anything in the host chain resets it, and the symptom is a full-width
   button overflowing its card by exactly its horizontal padding + border. */
.wchs-bc *,
.wchs-bc *::before,
.wchs-bc *::after {
	box-sizing: border-box;
}

.wchs-bc h2,
.wchs-bc h3,
.wchs-bc h4,
.wchs-bc h5 {
	font-family: var(--wchs-head-font);
	font-weight: 700;
	color: var(--wchs-ink);
	margin: 0 0 0.5em;
	line-height: 1.15;
}

.wchs-bc-h2 {
	font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem);
	text-transform: uppercase;
	letter-spacing: 0.01em;
}

/* Screen-reader-only text. */
.wchs-bc-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;
}

/* Honeypot — hidden from humans, reachable by bots. Deliberately NOT
   display:none, which some bots skip. */
.wchs-bc-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* ---------------------------------------------------------------- Focus */

.wchs-bc a:focus-visible,
.wchs-bc button:focus-visible,
.wchs-bc input:focus-visible,
.wchs-bc summary:focus-visible,
.wchs-bc [tabindex]:focus-visible {
	outline: 3px solid var(--wchs-blue);
	outline-offset: 2px;
}

/* --------------------------------------------------------------- Buttons */

.wchs-bc-btn {
	box-sizing: border-box;
	max-width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 28px;
	background: var(--wchs-blue);
	color: var(--wchs-on-blue);
	border: 2px solid var(--wchs-blue);
	border-radius: var(--wchs-radius);
	font-family: var(--wchs-head-font);
	font-weight: 700;
	font-size: 1.05rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.wchs-bc-btn:hover,
.wchs-bc-btn:focus {
	background: var(--wchs-on-blue);
	color: var(--wchs-blue);
}

.wchs-bc-btn--submit {
	width: 100%;
	margin-top: 8px;
}

.wchs-bc-toggle {
	padding: 8px 16px;
	background: transparent;
	border: 1px solid var(--wchs-border);
	border-radius: var(--wchs-radius);
	font-family: var(--wchs-head-font);
	font-weight: 600;
	font-size: 0.95rem;
	text-transform: uppercase;
	color: var(--wchs-muted);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.wchs-bc-toggle.is-active {
	background: var(--wchs-blue);
	border-color: var(--wchs-blue);
	color: var(--wchs-on-blue);
}

.wchs-bc-iconbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--wchs-border);
	border-radius: var(--wchs-radius);
	color: var(--wchs-ink);
	text-decoration: none;
	font-size: 1.1rem;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.wchs-bc-iconbtn:hover,
.wchs-bc-iconbtn:focus {
	background: var(--wchs-blue);
	border-color: var(--wchs-blue);
	color: var(--wchs-on-blue);
}

/* -------------------------------------------------------------- Notices */

.wchs-bc-notice {
	padding: 14px 18px;
	margin: 0 0 var(--wchs-gap);
	border-left: 4px solid var(--wchs-blue);
	background: var(--wchs-surface-alt);
	font-size: 0.95rem;
}

.wchs-bc-notice--success {
	border-left-color: var(--wchs-green);
}

.wchs-bc-notice--error {
	border-left-color: #b3261e;
}

.wchs-bc-empty {
	padding: 32px 16px;
	text-align: center;
	color: var(--wchs-muted);
	background: var(--wchs-surface-alt);
}

/* ------------------------------------------------------------- Calendar */

.wchs-bc-cal__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wchs-gap);
	margin-bottom: var(--wchs-gap);
}

.wchs-bc-cal__nav {
	display: flex;
	align-items: center;
	gap: 12px;
}

.wchs-bc-cal__title {
	font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
	text-transform: uppercase;
	margin: 0;
	min-width: 8ch;
}

.wchs-bc-cal__views {
	display: flex;
	gap: 8px;
}

.wchs-bc-grid {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	background: var(--wchs-surface);
}

.wchs-bc-grid th {
	padding: 10px 6px;
	background: var(--wchs-blue);
	color: var(--wchs-on-blue);
	font-family: var(--wchs-head-font);
	font-weight: 600;
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border: 1px solid var(--wchs-blue);
}

.wchs-bc-grid__cell {
	vertical-align: top;
	border: 1px solid var(--wchs-border);
	padding: 6px;
	height: 118px;
}

.wchs-bc-grid__cell.is-empty {
	background: var(--wchs-tint);
}

.wchs-bc-grid__cell.is-today {
	background: rgba(0, 46, 186, 0.06);
	box-shadow: inset 0 0 0 2px var(--wchs-blue);
}

.wchs-bc-grid__num {
	display: block;
	font-family: var(--wchs-head-font);
	font-weight: 700;
	font-size: 1rem;
	color: var(--wchs-muted);
	margin-bottom: 4px;
}

.wchs-bc-grid__cell.is-today .wchs-bc-grid__num {
	color: var(--wchs-blue);
}

.wchs-bc-grid__events {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.wchs-bc-pill {
	display: block;
	width: 100%;
	text-align: left;
	padding: 4px 6px;
	border: 0;
	border-left: 3px solid var(--wchs-blue);
	background: var(--wchs-surface-alt);
	font-family: var(--wchs-body-font);
	font-size: 0.78rem;
	line-height: 1.25;
	color: var(--wchs-ink);
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.wchs-bc-pill--away {
	border-left-color: var(--wchs-muted);
}

.wchs-bc-pill:hover {
	background: var(--wchs-tint);
}

.wchs-bc-pill__time {
	display: block;
	font-weight: 700;
	color: var(--wchs-blue);
}

.wchs-bc-pill__title {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wchs-bc-detail {
	padding: 10px;
	margin-top: 4px;
	background: var(--wchs-surface);
	border: 1px solid var(--wchs-border);
	font-size: 0.85rem;
}

.wchs-bc-detail__title {
	font-size: 1rem;
	margin-bottom: 8px;
}

.wchs-bc-detail__list {
	margin: 0;
	display: grid;
	gap: 6px;
}

.wchs-bc-detail__list div {
	display: grid;
	grid-template-columns: 5.5rem 1fr;
	gap: 8px;
}

.wchs-bc-detail__list dt {
	color: var(--wchs-muted);
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.wchs-bc-detail__list dd {
	margin: 0;
}

/* ----------------------------------------------------------- List view */

.wchs-bc-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wchs-bc-list__daydivider {
	padding: 10px 14px;
	margin-top: 8px;
	background: var(--wchs-blue);
	color: var(--wchs-on-blue);
	font-family: var(--wchs-head-font);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.wchs-bc-list__item {
	display: flex;
	gap: var(--wchs-gap);
	padding: 14px;
	border-bottom: 1px solid var(--wchs-border);
	background: var(--wchs-surface);
}

.wchs-bc-list__time {
	flex: 0 0 5.5rem;
	font-weight: 700;
	color: var(--wchs-blue);
}

.wchs-bc-list__title {
	font-family: var(--wchs-head-font);
	font-weight: 700;
	font-size: 1.15rem;
}

.wchs-bc-list__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 4px;
	color: var(--wchs-muted);
	font-size: 0.9rem;
}

.wchs-bc-tag {
	display: inline-block;
	padding: 2px 9px;
	background: var(--wchs-blue);
	color: var(--wchs-on-blue);
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.wchs-bc-tag--away {
	background: var(--wchs-muted);
}

/* ------------------------------------------------------------- Upcoming */

.wchs-bc-upcoming__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 2px;
}

.wchs-bc-upcoming__item {
	display: flex;
	align-items: center;
	gap: var(--wchs-gap);
	padding: 12px 14px;
	background: var(--wchs-surface-alt);
}

.wchs-bc-upcoming__date {
	flex: 0 0 56px;
	text-align: center;
	padding: 6px 0;
	background: var(--wchs-blue);
	color: var(--wchs-on-blue);
	font-family: var(--wchs-head-font);
}

.wchs-bc-upcoming__mon {
	display: block;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.wchs-bc-upcoming__day {
	display: block;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1;
}

.wchs-bc-upcoming__title {
	font-family: var(--wchs-head-font);
	font-weight: 700;
	font-size: 1.1rem;
}

.wchs-bc-upcoming__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--wchs-muted);
	font-size: 0.9rem;
}

/* ---------------------------------------------------------------- Board */

.wchs-bc-board__day {
	margin-bottom: 32px;
}

.wchs-bc-board__date {
	font-size: 1.3rem;
	text-transform: uppercase;
	padding-bottom: 8px;
	border-bottom: 3px solid var(--wchs-blue);
	margin-bottom: var(--wchs-gap);
}

.wchs-bc-board__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: var(--wchs-gap);
}

.wchs-bc-card {
	display: flex;
	flex-direction: column;
	padding: 20px;
	background: var(--wchs-surface);
	border: 1px solid var(--wchs-border);
	border-top: 4px solid var(--wchs-blue);
}

.wchs-bc-card.is-full {
	border-top-color: var(--wchs-muted);
}

.wchs-bc-card__title {
	font-size: 1.25rem;
	margin-bottom: 2px;
}

.wchs-bc-card__time {
	margin: 0 0 12px;
	color: var(--wchs-muted);
	font-size: 0.92rem;
}

.wchs-bc-card__events {
	list-style: none;
	margin: 0 0 12px;
	padding: 10px 12px;
	background: var(--wchs-surface-alt);
	font-size: 0.88rem;
	display: grid;
	gap: 4px;
}

.wchs-bc-card__eventtime {
	font-weight: 700;
	color: var(--wchs-blue);
	margin-right: 6px;
}

.wchs-bc-card__desc {
	margin: 0 0 12px;
	font-size: 0.92rem;
	color: var(--wchs-muted);
}

.wchs-bc-meter {
	height: 8px;
	background: var(--wchs-tint);
	overflow: hidden;
}

.wchs-bc-meter__fill {
	display: block;
	height: 100%;
	background: var(--wchs-green);
	transition: width 0.3s ease;
}

.wchs-bc-card.is-full .wchs-bc-meter__fill {
	background: var(--wchs-muted);
}

.wchs-bc-card__count {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 8px 0 14px;
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--wchs-ink);
}

.wchs-bc-card__wl {
	font-weight: 400;
	color: var(--wchs-muted);
}

.wchs-bc-card__roster {
	margin-bottom: 14px;
}

.wchs-bc-card__rosterhead {
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--wchs-muted);
	margin-bottom: 6px;
}

.wchs-bc-card__rosterlist {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.wchs-bc-card__rosterlist li {
	padding: 3px 10px;
	background: var(--wchs-tint);
	font-size: 0.85rem;
}

.wchs-bc-card__closed {
	margin: 0;
	padding: 12px;
	background: var(--wchs-tint);
	color: var(--wchs-muted);
	text-align: center;
	font-size: 0.92rem;
}

.wchs-bc-card__disclosure {
	margin-top: auto;
}

.wchs-bc-card__disclosure > summary {
	list-style: none;
	width: 100%;
	box-sizing: border-box;
}

.wchs-bc-card__disclosure > summary::-webkit-details-marker {
	display: none;
}

/* ----------------------------------------------------------------- Form */

.wchs-bc-form {
	margin-top: var(--wchs-gap);
	padding-top: var(--wchs-gap);
	border-top: 1px solid var(--wchs-border);
}

.wchs-bc-form__row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.wchs-bc-field {
	margin-bottom: 12px;
	display: flex;
	flex-direction: column;
}

.wchs-bc-field label {
	font-size: 0.82rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--wchs-muted);
	margin-bottom: 4px;
}

.wchs-bc-field input {
	padding: 11px 12px;
	border: 1px solid var(--wchs-border);
	border-radius: var(--wchs-radius);
	font-family: var(--wchs-body-font);
	font-size: 1rem;
	color: var(--wchs-ink);
	background: var(--wchs-surface);
	width: 100%;
}

.wchs-bc-field input:focus {
	border-color: var(--wchs-blue);
}

.wchs-bc-req {
	color: #b3261e;
}

.wchs-bc-optional {
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
}

.wchs-bc-form__note,
.wchs-bc-form__privacy {
	font-size: 0.82rem;
	color: var(--wchs-muted);
	margin: 0 0 12px;
}

/* ---------------------------------------------------------- Responsive */

@media (max-width: 900px) {
	.wchs-bc-board__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.wchs-bc-form__row {
		grid-template-columns: 1fr;
	}

	.wchs-bc-cal__bar {
		flex-direction: column;
		align-items: stretch;
	}

	.wchs-bc-cal__nav {
		justify-content: space-between;
	}

	.wchs-bc-cal__views {
		justify-content: stretch;
	}

	.wchs-bc-cal__views .wchs-bc-toggle {
		flex: 1;
	}

	/* The 7-column grid is unusable at 390px, so the month view collapses to
	   the list view on small screens and the toggle is hidden. */
	.wchs-bc-calendar[data-wchs-calendar] .wchs-bc-cal__panel[data-wchs-panel="month"] {
		display: none;
	}

	.wchs-bc-calendar[data-wchs-calendar] .wchs-bc-cal__panel[data-wchs-panel="list"] {
		display: block !important;
	}

	.wchs-bc-cal__views {
		display: none;
	}

	.wchs-bc-list__item {
		flex-direction: column;
		gap: 4px;
	}

	.wchs-bc-list__time {
		flex: none;
	}

	.wchs-bc-card {
		padding: 16px;
	}

	/* 28px of horizontal padding is generous at 390px; trim it so long labels
	   ("Join the waitlist") do not have to wrap. */
	.wchs-bc-btn {
		padding: 14px 18px;
	}
}

/* ------------------------------------------------------- Reduced motion */

@media (prefers-reduced-motion: reduce) {
	.wchs-bc *,
	.wchs-bc *::before,
	.wchs-bc *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
	}
}
