/* Event card, format pill and Register button (markup: inc/events.php, FYO\Theme\Events).
   Figma 305:27497 desktop / 293:25898 phones. Global because the upcoming events block, the
   /events/ archive and the event page all use them. */

.fyo-event-card {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: var(--wp--preset--spacing--60, 2rem);
	padding: var(--wp--preset--spacing--60, 2rem);
	border-radius: var(--wp--custom--radius--large);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--charcoal);
}

.fyo-event-card__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40, 1rem);
}

.fyo-event-card__date {
	margin: 0;
}

.fyo-event-card__date time {
	display: flex;
	flex-direction: column;
	font-weight: var(--wp--custom--font-weight--bold);
	line-height: 1.1;
}

.fyo-event-card__day {
	font-size: 3rem; /* 48 */
	letter-spacing: var(--wp--custom--letter-spacing--tight);
}

.fyo-event-card__month {
	font-size: var(--wp--preset--font-size--x-small);
	white-space: nowrap;
}

.fyo-event-format {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: var(--wp--preset--spacing--20, 0.5rem);
	margin: 0;
	padding: var(--wp--preset--spacing--20, 0.5rem) var(--wp--preset--spacing--40, 1rem);
	border-radius: var(--wp--custom--radius--pill);
	background: color-mix(in srgb, var(--wp--preset--color--teal) 30%, transparent);
	color: var(--wp--preset--color--charcoal);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: var(--wp--custom--font-weight--semibold);
	line-height: 1.3;
	white-space: nowrap;
}

.fyo-event-format--in-person {
	background: color-mix(in srgb, var(--wp--preset--color--maroon) 20%, transparent);
}

.fyo-event-format__icon {
	width: 1rem;
	height: 1rem;
}

.fyo-event-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--40, 1rem);
}

.fyo-event-card .fyo-event-card__title {
	margin: 0;
	color: var(--wp--preset--color--charcoal); /* not the red heading colour */
	font-size: var(--wp--preset--font-size--large);
	font-weight: var(--wp--custom--font-weight--bold);
	line-height: 1.3;
	letter-spacing: var(--wp--custom--letter-spacing--tight);
	text-wrap: balance;
}

.fyo-event-card__title a {
	color: inherit;
	text-decoration: none;
}

.fyo-event-card__title a:hover,
.fyo-event-card__title a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* The meta line takes the spare height, so the buttons line up along the row. */
.fyo-event-card__meta {
	flex: 1 1 auto;
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.3;
}

.fyo-event-register {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20, 0.5rem);
	padding: var(--wp--preset--spacing--20, 0.5rem) var(--wp--preset--spacing--50, 1.5rem);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--custom--color--button--primary--background);
	color: var(--wp--custom--color--button--primary--text);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--font-weight--semibold);
	line-height: 1.3;
	text-decoration: none;
	transition: background-color var(--wp--custom--duration--fast) var(--wp--custom--easing--standard);
}

.fyo-event-register:hover,
.fyo-event-register:focus-visible {
	background: var(--wp--custom--color--button--primary--background-hover);
	color: var(--wp--custom--color--button--primary--text);
}

.fyo-event-register__icon {
	width: 1rem;
	height: 1rem;
}

.fyo-event-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

@media (max-width: 782px) {
	.fyo-event-card {
		gap: var(--wp--preset--spacing--50, 1.5rem);
		padding: 1.25rem;
	}

	.fyo-event-card__day {
		font-size: 2rem;
	}

	.fyo-event-card__month,
	.fyo-event-format {
		font-size: 0.75rem;
	}

	.fyo-event-card__body {
		gap: 0.75rem;
	}

	.fyo-event-card .fyo-event-card__title {
		font-size: var(--wp--preset--font-size--medium);
	}

	.fyo-event-card__meta {
		font-size: var(--wp--preset--font-size--x-small);
	}

	.fyo-event-register {
		font-size: var(--wp--preset--font-size--x-small);
	}
}
