/*
 * Atomic Event widgets and the bundled Elementor Loop Item recipe.
 *
 * Data and formatting remain in SGGW Content. These selectors reproduce the
 * Gutenberg Event card while consuming Genotyp's surface-aware color roles.
 */

.sggw-loop-event-card.e-con {
	align-items: stretch;
	background-color: var(--sggw-surface-current);
	block-size: 100%;
	border-radius: var(--wp--custom--radius--medium, 8px);
	box-sizing: border-box;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 0;
	inline-size: 100%;
	min-inline-size: 0;
	overflow: hidden;
	padding: 0;
}

.sggw-loop-event-card .elementor-widget-sggw-event-date {
	align-self: stretch;
	flex: 0 1 160px;
	inline-size: 160px;
	margin: 0;
	min-inline-size: 80px;
}

.sggw-loop-event-card
	.elementor-widget-sggw-event-date
	.elementor-widget-container {
	block-size: 100%;
}

.sggw-elementor-event-date.wp-block-sggw-event-date {
	aspect-ratio: auto;
	block-size: 100%;
	border-radius: 0;
	box-sizing: border-box;
	gap: var(--wp--preset--spacing--10, 8px);
	inline-size: 100%;
	min-block-size: 100%;
	min-inline-size: 80px;
	padding: var(--wp--preset--spacing--20, 12px);
}

.sggw-elementor-event-date
	.wp-block-sggw-event-date-part[data-sggw-event-date-part="day"] {
	font-size: var(--wp--preset--font-size--xx-large);
}

.sggw-elementor-event-date
	.wp-block-sggw-event-date-part[data-sggw-event-date-part="month"] {
	font-size: var(--wp--preset--font-size--medium);
}

.sggw-elementor-event-date
	.wp-block-sggw-event-date-part[data-sggw-event-date-part="year"] {
	font-size: var(--wp--preset--font-size--medium);
}

.sggw-loop-event-card__content.e-con {
	align-items: stretch;
	box-sizing: border-box;
	flex: 1 1 620px;
	gap: var(--wp--preset--spacing--50, 32px);
	inline-size: auto;
	justify-content: space-between;
	min-inline-size: 0;
	padding: var(--wp--preset--spacing--40, 24px);
}

.sggw-loop-event-card__body.e-con {
	align-items: stretch;
	gap: var(--wp--preset--spacing--20, 12px);
	inline-size: 100%;
	min-inline-size: 0;
	padding: 0;
}

.sggw-loop-event-card__meta.e-con {
	align-items: center;
	column-gap: var(--wp--preset--spacing--40, 24px);
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	inline-size: 100%;
	min-inline-size: 0;
	padding: 0;
	row-gap: var(--wp--preset--spacing--10, 8px);
}

.sggw-loop-event-card__meta.e-con .elementor-widget-sggw-event-meta {
	inline-size: auto;
	margin: 0;
}

.sggw-loop-event-card__title,
.sggw-loop-event-card__excerpt,
.sggw-loop-event-card__meta,
.sggw-loop-event-card__registration {
	margin: 0;
	min-inline-size: 0;
}

.sggw-loop-event-card__title .elementor-heading-title {
	color: var(--sggw-text) !important;
	font-family: var(--wp--preset--font-family--body) !important;
	font-size: var(--wp--preset--font-size--large) !important;
	font-style: normal !important;
	font-weight: var(--wp--custom--typography--font-weight--semibold) !important;
	line-height: var(--wp--custom--typography--line-height--large, 1.25) !important;
	margin: 0;
}

.sggw-loop-event-card__title .elementor-heading-title a {
	color: inherit;
	text-decoration: none;
	text-decoration-skip-ink: auto;
	text-decoration-thickness: .08em;
	text-underline-offset: .18em;
}

@media (hover: hover) {
	.sggw-loop-event-card:hover {
		box-shadow: var(--wp--custom--shadow--small);
	}

	.sggw-loop-event-card__title .elementor-heading-title a:hover {
		text-decoration: underline;
	}
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.sggw-loop-event-card {
		transition: box-shadow 150ms ease;
	}
}

.sggw-loop-event-card__title .elementor-heading-title a:focus-visible {
	border-radius: var(--wp--custom--radius--x-small);
	outline: var(--wp--custom--line--focus-ring-width) solid var(--sggw-line-focus);
	outline-offset: var(--wp--custom--line--focus-ring-offset-compact);
}

.sggw-loop-event-card__excerpt {
	color: var(--sggw-text);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	font-style: normal;
	font-weight: var(--wp--custom--typography--font-weight--regular);
	line-height: var(--wp--custom--typography--line-height--supporting, 1.6);
}

.sggw-loop-event-card__excerpt :where(.elementor-widget-container, p) {
	color: inherit;
	font: inherit;
	margin: 0;
}

.sggw-loop-event-card__meta .sggw-elementor-event-meta {
	font-size: var(--wp--preset--font-size--small);
}

.sggw-loop-event-card__registration {
	align-self: flex-start;
}

.sggw-loop-event-card__registration
	.sggw-elementor-event-registration {
	margin: 0;
}

.sggw-elementor-events-grid .elementor-loop-container > .e-loop-item,
.sggw-elementor-events-grid .elementor-loop-container > .e-loop-item > .elementor {
	block-size: 100%;
}

/* Compact Event Loop Item used by notices and narrow editorial lists. */

.sggw-loop-event-card-compact.e-con {
	align-items: center;
	background-color: var(--sggw-surface-current);
	block-size: 100%;
	border-radius: var(--wp--custom--radius--medium, 8px);
	box-sizing: border-box;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: var(--wp--preset--spacing--40, 24px);
	inline-size: 100%;
	min-inline-size: 0;
	overflow: hidden;
	padding: var(--wp--preset--spacing--40, 24px);
}

.sggw-loop-event-card-compact .elementor-widget-sggw-event-date {
	align-self: center;
	flex: 0 0 80px;
	inline-size: 80px;
	margin: 0;
	min-inline-size: 80px;
}

.sggw-loop-event-card-compact
	.elementor-widget-sggw-event-date
	.elementor-widget-container {
	block-size: auto;
}

.sggw-loop-event-card-compact
	.sggw-elementor-event-date.wp-block-sggw-event-date {
	aspect-ratio: 1;
	background-color: var(--sggw-surface-alternating) !important;
	block-size: 80px;
	border-radius: var(--wp--custom--radius--x-small, 4px);
	gap: 2px;
	inline-size: 80px;
	min-block-size: 80px;
	min-inline-size: 80px;
	padding: var(--wp--preset--spacing--20, 12px);
}

.sggw-loop-event-card-compact
	.sggw-elementor-event-date
	.wp-block-sggw-event-date-part[data-sggw-event-date-part="day"] {
	font-size: var(--wp--preset--font-size--x-large);
}

.sggw-loop-event-card-compact
	.sggw-elementor-event-date
	.wp-block-sggw-event-date-part[data-sggw-event-date-part="month"],
.sggw-loop-event-card-compact
	.sggw-elementor-event-date
	.wp-block-sggw-event-date-part[data-sggw-event-date-part="year"] {
	font-size: var(--wp--preset--font-size--x-small);
}

.sggw-loop-event-card-compact__content.e-con {
	align-items: stretch;
	box-sizing: border-box;
	flex: 1 1 auto;
	gap: var(--wp--preset--spacing--10, 8px);
	inline-size: auto;
	min-inline-size: 0;
	padding: 0;
}

.sggw-loop-event-card-compact__title,
.sggw-loop-event-card-compact__meta,
.sggw-loop-event-card-compact__meta .elementor-widget-sggw-event-meta {
	margin: 0;
	min-inline-size: 0;
}

.sggw-loop-event-card-compact__title .elementor-heading-title {
	color: var(--sggw-text) !important;
	font-family: var(--wp--preset--font-family--body) !important;
	font-size: var(--wp--preset--font-size--large) !important;
	font-style: normal !important;
	font-weight: var(--wp--custom--typography--font-weight--semibold) !important;
	line-height: var(--wp--custom--typography--line-height--large, 1.25) !important;
	margin: 0;
	overflow-wrap: anywhere;
}

.sggw-loop-event-card-compact__title .elementor-heading-title a {
	color: inherit;
	text-decoration: none;
	text-decoration-skip-ink: auto;
	text-decoration-thickness: .08em;
	text-underline-offset: .18em;
}

.sggw-loop-event-card-compact__title .elementor-heading-title a:focus-visible {
	border-radius: var(--wp--custom--radius--x-small);
	outline: var(--wp--custom--line--focus-ring-width) solid var(--sggw-line-focus);
	outline-offset: var(--wp--custom--line--focus-ring-offset-compact);
}

.sggw-loop-event-card-compact__meta.e-con {
	align-items: center;
	flex-direction: row;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--10, 8px);
	inline-size: 100%;
	min-inline-size: 0;
	padding: 0;
}

.sggw-loop-event-card-compact__meta .sggw-elementor-event-meta {
	font-size: var(--wp--preset--font-size--small);
}

.sggw-elementor-events-grid--compact .elementor-loop-container > .e-loop-item,
.sggw-elementor-events-grid--compact .elementor-loop-container > .e-loop-item > .elementor {
	block-size: 100%;
	inline-size: 100%;
}

@media (hover: hover) {
	.sggw-loop-event-card-compact:hover {
		box-shadow: var(--wp--custom--shadow--small);
	}

	.sggw-loop-event-card-compact__title .elementor-heading-title a:hover {
		text-decoration: underline;
	}
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.sggw-loop-event-card-compact {
		transition: box-shadow 150ms ease;
	}
}

@media (forced-colors: active) {
	.sggw-loop-event-card,
	.sggw-loop-event-card-compact {
		background: Canvas;
		border: var(--wp--custom--line--width) solid CanvasText;
		box-shadow: none !important;
		color: CanvasText;
		forced-color-adjust: none;
	}

	.sggw-loop-event-card__title .elementor-heading-title,
	.sggw-loop-event-card-compact__title .elementor-heading-title,
	.sggw-loop-event-card__excerpt,
	.sggw-loop-event-card__meta .sggw-elementor-event-meta,
	.sggw-loop-event-card-compact__meta .sggw-elementor-event-meta {
		color: CanvasText !important;
	}

	.sggw-loop-event-card__title .elementor-heading-title a,
	.sggw-loop-event-card-compact__title .elementor-heading-title a {
		color: LinkText;
		text-decoration: underline;
	}

	.sggw-loop-event-card__title .elementor-heading-title a:focus-visible,
	.sggw-loop-event-card-compact__title .elementor-heading-title a:focus-visible {
		outline-color: Highlight;
	}

	.sggw-loop-event-card-compact
		.sggw-elementor-event-date.wp-block-sggw-event-date {
		background: Canvas;
		border: 1px solid CanvasText;
		color: CanvasText;
		forced-color-adjust: none;
	}
}
