/**
 * URC Meetings — frontend (shortcode / block / Cornerstone).
 *
 * Accessibility-first: visible focus styles, AA-contrast defaults, reduced-motion
 * friendly, and a screen-reader-only utility that does not depend on the theme.
 *
 * Appearance is driven by CSS custom properties (`--urc-*`). Defaults live in
 * each `var(… , fallback)` so an ancestor (e.g. the Cornerstone element wrapper)
 * can override them by simply setting the variable.
 */

.urc-meetings-events {
	margin: 0 0 1.5em;
	color: var( --urc-text, #1e1e1e );
	font-size: var( --urc-font-size, inherit );
}

/* Screen-reader-only text (standard clip technique, theme-independent). */
.urc-meetings-events .urc-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect( 0, 0, 0, 0 );
	white-space: nowrap;
	border: 0;
}

.urc-meetings-events__section {
	margin: 0 0 2em;
}

.urc-meetings-events__heading {
	margin: 0 0 0.75em;
	font-size: 1.25rem;
	line-height: 1.3;
}

.urc-meetings-events__empty {
	margin: 0;
	color: var( --urc-muted, #5a5f66 );
	font-style: italic;
}

/* Card grid */
.urc-meetings-events__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: var( --urc-grid, repeat( auto-fill, minmax( 240px, 1fr ) ) );
	gap: var( --urc-gap, 1rem );
}

.urc-meeting-card {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: var( --urc-pad, 1rem 1.25rem );
	background: var( --urc-card-bg, #fff );
	border: var( --urc-border-width, 1px ) solid var( --urc-border, #d2d6dc );
	border-radius: var( --urc-radius, 8px );
	box-shadow: var( --urc-shadow, none );
}

.urc-meeting-card__date {
	margin: 0;
	font-weight: var( --urc-date-weight, 700 );
	font-size: var( --urc-date-size, 1.05rem );
}

.urc-meeting-card__date time {
	white-space: nowrap;
}

/* Document links */
.urc-meeting-card__docs {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 0.9rem;
}

.urc-meeting-card__doc {
	display: inline-flex;
	align-items: center;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	color: var( --urc-link, #1d4ed8 );
}

.urc-meeting-card__doc:hover,
.urc-meeting-card__doc:focus {
	color: var( --urc-link-hover, #1e3a8a );
}

/* Clear, high-contrast focus indicator (WCAG 2.4.7). */
.urc-meeting-card__doc:focus-visible {
	outline: 2px solid var( --urc-link, #1d4ed8 );
	outline-offset: 2px;
	border-radius: 2px;
}

/* Unavailable documents: not a link, clearly de-emphasised but still legible. */
.urc-meeting-card__doc.is-unavailable {
	color: var( --urc-muted, #5a5f66 );
	font-weight: 500;
	text-decoration: none;
	cursor: default;
}

@media ( prefers-reduced-motion: no-preference ) {
	.urc-meeting-card__doc {
		transition: color 0.15s ease;
	}
}

@media ( max-width: 480px ) {
	.urc-meetings-events__list {
		grid-template-columns: 1fr;
	}
}
