/**
 * FCSA Events Hub — public stylesheet.
 * Theme-neutral, BEM-ish class names, no framework dependency.
 */

.fcsa-events-hub {
	--fcsa-eh-primary: #b8431c;
	--fcsa-eh-accent: #f79239;
	--fcsa-eh-accent-scoped: var(--fcsa-eh-primary);
	--fcsa-eh-text: #1c2331;
	--fcsa-eh-text-muted: #57606a;
	--fcsa-eh-border: #d0d7de;
	--fcsa-eh-bg-muted: #f6f8fa;
	--fcsa-eh-danger: #cf222e;
	--fcsa-eh-success: #1a7f37;
	--fcsa-eh-info: #0969da;
	--fcsa-eh-radius: 6px;
}

.fcsa-events-hub__notice {
	padding: 0.85em 1em;
	border-radius: var(--fcsa-eh-radius);
	background: var(--fcsa-eh-bg-muted);
	color: var(--fcsa-eh-text);
}

.fcsa-events-hub__notice--success {
	background: #dafbe1;
	color: var(--fcsa-eh-success);
}

.fcsa-events-hub__notice--info {
	background: #ddf4ff;
	color: var(--fcsa-eh-info);
}

.fcsa-events-hub__notice--error {
	background: #ffebe9;
	color: var(--fcsa-eh-danger);
}

.fcsa-events-hub__grid {
	--fcsa-eh-columns: 3;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.5em;
}

@media (min-width: 700px) {
	.fcsa-events-hub__grid {
		grid-template-columns: repeat(var(--fcsa-eh-columns), 1fr);
	}
}

.fcsa-events-hub__card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--fcsa-eh-border);
	border-radius: var(--fcsa-eh-radius);
	overflow: hidden;
	background: #fff;
}

.fcsa-events-hub__card--cancelled {
	opacity: 0.7;
}

.fcsa-events-hub__card-image-link {
	display: block;
}

.fcsa-events-hub__card-image {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	display: block;
}

.fcsa-events-hub__card-image-placeholder {
	width: 100%;
	aspect-ratio: 16 / 9;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	background: linear-gradient(135deg, var(--fcsa-eh-accent-scoped), var(--fcsa-eh-accent));
}

.fcsa-events-hub__card-body {
	padding: 1em;
	display: flex;
	flex-direction: column;
	gap: 0.5em;
	flex: 1;
}

.fcsa-events-hub__card-title {
	margin: 0;
	font-size: 1.1em;
}

.fcsa-events-hub__card-title a {
	color: var(--fcsa-eh-text);
	text-decoration: none;
}

.fcsa-events-hub__card-title a:hover {
	color: var(--fcsa-eh-primary);
}

.fcsa-events-hub__card-meta {
	margin: 0;
	font-size: 0.85em;
	color: var(--fcsa-eh-text-muted);
	display: flex;
	gap: 0.75em;
	flex-wrap: wrap;
}

.fcsa-events-hub__card-excerpt {
	margin: 0;
	font-size: 0.95em;
	color: var(--fcsa-eh-text);
}

.fcsa-events-hub__card-link {
	margin-top: auto;
	color: var(--fcsa-eh-accent-scoped);
	font-weight: 600;
	text-decoration: none;
}

.fcsa-events-hub__card-link:hover {
	text-decoration: underline;
}

.fcsa-events-hub__card-footer {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75em;
}

.fcsa-events-hub__card-footer .fcsa-events-hub__card-link {
	margin-top: 0;
}

.fcsa-events-hub__card-register {
	color: var(--fcsa-eh-accent-scoped);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.fcsa-events-hub__card-register:hover {
	text-decoration: underline;
}

.fcsa-events-hub__card-presenter {
	margin: 0;
	font-size: 0.85em;
	color: var(--fcsa-eh-text-muted);
}

.fcsa-events-hub__card-tags {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
}

.fcsa-events-hub__tag {
	display: inline-block;
	padding: 0.15em 0.6em;
	border-radius: 999px;
	font-size: 0.75em;
	background: var(--fcsa-eh-bg-muted);
	color: var(--fcsa-eh-text-muted);
	border: 1px solid var(--fcsa-eh-border);
}

.fcsa-events-hub__price-badge {
	display: inline-block;
	padding: 0.2em 0.6em;
	border-radius: 999px;
	font-size: 0.8em;
	font-weight: 700;
	width: fit-content;
	background: var(--fcsa-eh-bg-muted);
	color: var(--fcsa-eh-accent-scoped);
	border: 1px solid var(--fcsa-eh-accent-scoped);
}

.fcsa-events-hub__countdown {
	margin: 0;
	font-size: 0.85em;
	font-weight: 700;
	color: var(--fcsa-eh-accent-scoped);
}

.fcsa-events-hub__detail-image {
	width: 100%;
	max-height: 420px;
	object-fit: cover;
	border-radius: var(--fcsa-eh-radius);
	margin: 1em 0;
}

.fcsa-events-hub__detail-presenter {
	margin: 0.5em 0 0;
}

.fcsa-events-hub__notice--past,
.fcsa-events-hub__notice--cancelled {
	background: var(--fcsa-eh-bg-muted);
	border: 1px solid var(--fcsa-eh-border);
}

.fcsa-events-hub__register-external {
	display: inline-block;
	background: var(--fcsa-eh-accent-scoped);
	color: #fff;
	border-radius: var(--fcsa-eh-radius);
	padding: 0.75em 1.6em;
	font-weight: 700;
	text-decoration: none;
}

.fcsa-events-hub__register-external:hover {
	filter: brightness(1.1);
	color: #fff;
}

.fcsa-events-hub__field--error input,
.fcsa-events-hub__field--error textarea,
.fcsa-events-hub__field--error select {
	border-color: var(--fcsa-eh-danger);
}

.fcsa-events-hub__required {
	color: var(--fcsa-eh-danger);
}

/*
 * Inline per-field message, inserted by assets/js/signup-form.js only
 * (client-side pre-submit validation) — the server-rendered PRG error path
 * still uses the single top-level notice above, unchanged.
 */
.fcsa-events-hub__field-error-text {
	margin: 0;
	font-size: 0.85em;
	color: var(--fcsa-eh-danger);
}

.fcsa-events-hub__checkbox-label {
	display: flex;
	align-items: center;
	gap: 0.4em;
}

/*
 * Countdown text updates on a plain interval, per-minute — never uses CSS
 * transitions/animations, so there is nothing here to gate behind
 * prefers-reduced-motion. Documented per requirement 2.
 */
@media (prefers-reduced-motion: reduce) {
	.fcsa-events-hub__countdown {
		transition: none;
	}
}

.fcsa-events-hub__badge {
	display: inline-block;
	padding: 0.2em 0.6em;
	border-radius: 999px;
	font-size: 0.75em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	width: fit-content;
}

.fcsa-events-hub__badge--cancelled {
	background: var(--fcsa-eh-danger);
	color: #fff;
}

.fcsa-events-hub__detail {
	max-width: 760px;
}

.fcsa-events-hub__detail-title {
	margin-top: 0.5em;
}

.fcsa-events-hub__detail-meta {
	color: var(--fcsa-eh-text-muted);
	display: flex;
	gap: 1em;
	flex-wrap: wrap;
}

.fcsa-events-hub__detail-capacity {
	font-weight: 600;
}

.fcsa-events-hub__detail-description {
	margin: 1.5em 0;
	line-height: 1.6;
}

.fcsa-events-hub__signup-form {
	border: 1px solid var(--fcsa-eh-border);
	border-radius: var(--fcsa-eh-radius);
	padding: 1.5em;
	background: var(--fcsa-eh-bg-muted);
	max-width: 420px;
}

.fcsa-events-hub__field {
	display: flex;
	flex-direction: column;
	gap: 0.3em;
	margin-bottom: 1em;
}

.fcsa-events-hub__field input,
.fcsa-events-hub__field select,
.fcsa-events-hub__field textarea {
	padding: 0.5em 0.7em;
	border: 1px solid var(--fcsa-eh-border);
	border-radius: var(--fcsa-eh-radius);
	font: inherit;
}

.fcsa-events-hub__field textarea {
	min-height: 5em;
	resize: vertical;
}

.fcsa-events-hub__field input[type="checkbox"] {
	padding: 0;
	border: none;
}

.fcsa-events-hub__honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.fcsa-events-hub__submit {
	background: var(--fcsa-eh-accent-scoped);
	color: #fff;
	border: none;
	border-radius: var(--fcsa-eh-radius);
	padding: 0.65em 1.4em;
	font-weight: 600;
	cursor: pointer;
}

.fcsa-events-hub__submit:hover {
	filter: brightness(1.1);
}
