/**
 * Area 53 Events Calendar: "Featured events" cards (1.9.8).
 * Colours, font, corners and spacing come from the active theme (Area 53 Block
 * theme.json presets) and follow its dark mode; fallbacks keep it readable elsewhere.
 * Meaning is carried by text, never by colour alone.
 */

.cec-featured {
	--cec-ink: var(--wp--preset--color--contrast, #0d2436);
	--cec-muted: var(--wp--preset--color--muted, #3f5563);
	--cec-line: var(--wp--preset--color--border, #e2e8f0);
	--cec-bg-soft: var(--wp--preset--color--sky-light, #e3f7fc);
	--cec-surface: var(--wp--preset--color--surface, #ffffff);
	--cec-primary: var(--wp--preset--color--primary, #0e7690);
	--cec-primary-ink: var(--wp--preset--color--on-primary, #ffffff);
	--cec-link: var(--wp--preset--color--link, var(--cec-primary));
	--cec-focus: var(--wp--preset--color--link, #0b6178);
	--cec-radius: var(--wp--custom--radius--small, 10px);
	--cec-radius-lg: var(--wp--custom--radius--medium, 14px);
	--cec-gap: var(--wp--preset--spacing--30, 1rem);
	color: var(--cec-ink);
	font-family: inherit;
}

.cec-featured-title {
	margin: 0 0 var(--cec-gap);
}

.cec-featured-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
	gap: var(--cec-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.cec-featured-card {
	display: flex;
	flex-direction: column;
	margin: 0;
	overflow: hidden;
	background: var(--cec-surface);
	border: 1px solid var(--cec-line);
	border-radius: var(--cec-radius-lg);
}

/* Flyer: shown whole (never cropped), so dates and details on it stay readable. */
.cec-featured-flyer {
	display: block;
	background: var(--cec-bg-soft);
	border-bottom: 1px solid var(--cec-line);
}

.cec-featured-flyer img {
	display: block;
	width: 100%;
	height: 14rem;
	object-fit: contain;
}

.cec-featured-main {
	display: flex;
	flex: 1;
	gap: var(--cec-gap);
	padding: var(--cec-gap);
}

.cec-featured-date {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
	min-width: 3.75rem;
	margin: 0;
	padding: 0.4rem 0.5rem;
	line-height: 1.1;
	text-align: center;
	color: var(--cec-primary-ink);
	background: var(--cec-primary);
	border-radius: var(--cec-radius);
}

.cec-featured-mon,
.cec-featured-dow {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.cec-featured-day {
	font-size: 1.6rem;
	font-weight: 700;
}

.cec-featured-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
}

.cec-featured-name {
	margin: 0 0 0.35rem;
	font-size: 1.15rem;
	line-height: 1.3;
	overflow-wrap: break-word;
	hyphens: auto;
}

.cec-featured-name a {
	color: var(--cec-link);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.cec-featured-when,
.cec-featured-where,
.cec-featured-repeats {
	margin: 0 0 0.25rem;
	font-size: 0.95rem;
	line-height: 1.45;
	color: var(--cec-muted);
}

.cec-featured-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	margin: auto 0 0;
	padding-top: 0.6rem;
}

.cec-featured-more {
	color: var(--cec-link);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.cec-featured a:focus-visible {
	outline: 3px solid var(--cec-focus);
	outline-offset: 2px;
}

.cec-featured .cec-btn.cec-register-btn--list {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0.35em 1em;
	font-size: 0.95em;
	text-decoration: none;
	color: var(--cec-primary-ink);
	background: var(--cec-primary);
	border-radius: var(--cec-radius);
}

.cec-featured .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.cec-featured-placeholder {
	padding: var(--cec-gap);
	border: 1px dashed var(--cec-line);
	border-radius: var(--cec-radius);
}
