/*
 * Event cards (Mhub_Event_Card): a meeting or webinar in a shortcode, block, widget or list,
 * wearing its look. The colours come from the look's variables, printed on each card's id by
 * Mhub_Meeting_Page_Look::scoped_style(); every pair used here is one the palette keeps at
 * WCAG AA (ink, body and muted on the card; on-fill on fill; on-wash on wash).
 *
 * The wrapper is a size container, so a card lays itself out by the room it is given, not by the
 * screen: a card is stacked under 560px and side by side above it.
 */

.mhub-ev-wrap {
	container-type: inline-size;
	max-width: 760px;
	margin-block: 1.5em;
}

.mhub-ev-wrap--compact {
	max-width: 420px;
}

.mhub-ev {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "art" "body" "actions";
	box-sizing: border-box;
	overflow: hidden;
	border-radius: var(--mhub-mt-radius, 14px);
	background: rgb(var(--mhub-mt-card-rgb, 255 255 255));
	box-shadow: 0 0 0 1px rgb(var(--mhub-mt-rule-rgb, 226 232 240));
	color: rgb(var(--mhub-mt-ink-rgb, 15 23 42));
	font-family: var(--mhub-mt-font, inherit);
	line-height: 1.5;
	text-align: left;
}

.mhub-ev *,
.mhub-ev *::before,
.mhub-ev *::after {
	box-sizing: border-box;
}

.mhub-ev.mhub-mp--flat {
	box-shadow: none;
}

.mhub-ev__art {
	grid-area: art;
	min-height: 120px;
	background-color: rgb(var(--mhub-mt-band-rgb, var(--mhub-mt-wash-rgb, 238 234 255)));
}

.mhub-ev__body {
	grid-area: body;
	display: grid;
	gap: 6px;
	align-content: start;
	min-width: 0;
	padding: 18px 20px 4px;
}

.mhub-ev__actions {
	grid-area: actions;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 10px 20px 18px;
}

.mhub-ev p {
	margin: 0;
}

.mhub-ev__eyebrow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	color: rgb(var(--mhub-mt-body-rgb, 71 85 105));
	font-size: 13px;
	font-weight: 600;
}

.mhub-ev__kind {
	padding: 2px 9px;
	border-radius: 999px;
	background: rgb(var(--mhub-mt-wash-rgb, 238 234 255));
	color: rgb(var(--mhub-mt-on-wash-rgb, 58 33 184));
}

.mhub-ev .mhub-ev__title {
	margin: 0;
	color: rgb(var(--mhub-mt-ink-rgb, 15 23 42));
	font-family: var(--mhub-mt-title-font, inherit);
	font-size: 20px;
	font-weight: var(--mhub-mt-title-weight, 700);
	line-height: 1.25;
	letter-spacing: -0.01em;
	overflow-wrap: anywhere;
}

.mhub-ev .mhub-ev__title a {
	color: inherit;
	text-decoration: none;
}

.mhub-ev .mhub-ev__title a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.mhub-ev .mhub-ev__title a:focus-visible,
.mhub-ev .mhub-ev__cta:focus-visible {
	outline: 3px solid rgb(var(--mhub-mt-fill-rgb, 85 54 232));
	outline-offset: 2px;
	border-radius: 4px;
}

.mhub-ev__when {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 10px;
	color: rgb(var(--mhub-mt-ink-rgb, 15 23 42));
	font-size: 14.5px;
	font-weight: 500;
}

.mhub-ev__zone,
.mhub-ev__platform {
	color: rgb(var(--mhub-mt-muted-rgb, 100 116 139));
	font-weight: 400;
}

.mhub-ev__status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: rgb(var(--mhub-mt-body-rgb, 71 85 105));
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}

.mhub-ev__status--live {
	color: rgb(var(--mhub-mt-ink-rgb, 15 23 42));
	font-weight: 700;
}

.mhub-ev__dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: rgb(var(--mhub-mt-danger-rgb, 217 45 32));
}

.mhub-ev__desc {
	color: rgb(var(--mhub-mt-body-rgb, 71 85 105));
	font-size: 15px;
}

.mhub-ev .mhub-ev__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 18px;
	border-radius: calc(var(--mhub-mt-radius, 14px) * 0.7);
	background: rgb(var(--mhub-mt-wash-rgb, 238 234 255));
	color: rgb(var(--mhub-mt-on-wash-rgb, 58 33 184));
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}

.mhub-ev .mhub-ev__cta:hover {
	color: rgb(var(--mhub-mt-on-wash-rgb, 58 33 184));
	text-decoration: underline;
	text-underline-offset: 3px;
}

.mhub-ev .mhub-ev__cta--primary {
	background: rgb(var(--mhub-mt-fill-rgb, 85 54 232));
	color: rgb(var(--mhub-mt-on-fill-rgb, 255 255 255));
}

.mhub-ev .mhub-ev__cta--primary:hover {
	background: rgb(var(--mhub-mt-fill-hover-rgb, var(--mhub-mt-fill-rgb, 74 45 214)));
	color: rgb(var(--mhub-mt-on-fill-rgb, 255 255 255));
	text-decoration: none;
}

.mhub-ev .mhub-ev__cta--primary:active {
	background: rgb(var(--mhub-mt-fill-press-rgb, var(--mhub-mt-fill-rgb, 58 33 184)));
}

/* Card: side by side once there is room. */
@container (min-width: 560px) {
	.mhub-ev--card {
		grid-template-columns: 200px minmax(0, 1fr);
		grid-template-areas: "art body" "art actions";
	}

	.mhub-ev--card .mhub-ev__art {
		min-height: 100%;
	}
}

/* Compact: no art, tighter. */
.mhub-ev--compact .mhub-ev__body {
	padding: 16px 16px 2px;
}

.mhub-ev--compact .mhub-ev__actions {
	padding: 10px 16px 16px;
}

.mhub-ev--compact .mhub-ev__title {
	font-size: 17px;
}

@media (prefers-reduced-motion: no-preference) {
	.mhub-ev .mhub-ev__cta {
		transition: background-color 0.15s ease;
	}
}
