/* Yodel plugins embedded in articles (js/yodel-embed.js), in the events
   list view's look. Values mirror assets/css/yodel-list-view.css's rows.

   Every rule is scoped `.mk-embed .mk-em__…` -- two classes -- so it outranks
   article and site styles that reach in on specificity alone (main.css styles
   bare elements under page wrappers; see the main.css element-leak note). The
   markup uses no p / li / headings, whose article styles are !important. */

.mk-embed {
	--em-pink: #e11383;
	--em-ink: #1f2937;
	--em-muted: #5b6472;
	--em-line: #e5e7eb;
	--em-navy: #123a63;
	/* Featured = the Featured Events box's blue, as in the list view. */
	--em-featured: #0f6f97;
	--em-featured-bg: #e9f4fa;
	--em-featured-line: #cfe6f2;
	--em-morning: #17744d;
	--em-afternoon: #9c5a08;
	--em-evening: #6b4bd6;
	margin: 24px 0;
	font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--em-ink);
	text-align: left;
}
.mk-embed * { box-sizing: border-box; }

.mk-embed .mk-em__day {
	margin: 22px 0 4px;
	padding-bottom: 6px;
	border-bottom: 2px solid var(--em-line);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--em-navy);
}
.mk-embed .mk-em__day:first-child { margin-top: 0; }

/* ---------- row: the whole thing is the expand toggle ---------- */
.mk-embed .mk-em__row {
	display: grid;
	grid-template-columns: 88px 138px minmax(0, 1fr) 22px;
	align-items: center;
	gap: 16px;
	width: 100%;
	margin: 0;
	padding: 14px 8px;
	border: 0;
	border-bottom: 1px solid var(--em-line);
	border-radius: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: background .15s ease;
}
.mk-embed .mk-em__row:hover { background: #fafbfc; }
.mk-embed .mk-em__row:focus-visible { outline: 2px solid var(--em-pink); outline-offset: -2px; }

.mk-embed .mk-em__time { display: block; text-align: right; line-height: 1.3; }
.mk-embed .mk-em__time-start { display: block; font-size: 15px; font-weight: 700; }
.mk-embed .mk-em__time-end { display: block; font-size: 12px; color: var(--em-muted); }

.mk-embed .mk-em__thumb {
	position: relative;
	display: block;
	aspect-ratio: 1.91 / 1;   /* a Facebook event image's shape, as the list view */
	border-radius: 8px;
	overflow: hidden;
	background: var(--em-line);
}
.mk-embed .mk-em__thumb img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.mk-embed .mk-em__flag {
	position: absolute;
	top: 6px;
	left: 0;
	padding: 3px 8px 3px 6px;
	border-radius: 0 6px 6px 0;
	background: var(--em-featured);
	color: #fff;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: .05em;
}

.mk-embed .mk-em__body { display: block; min-width: 0; }
.mk-embed .mk-em__title {
	display: flex;
	align-items: baseline;
	gap: 8px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--em-ink);
}
/* The dot picks up the time-of-day colour, as in the list view. */
.mk-embed .mk-em__dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--em-muted); }
.mk-embed .mk-em__row[data-band="morning"] .mk-em__dot { background: var(--em-morning); }
.mk-embed .mk-em__row[data-band="afternoon"] .mk-em__dot { background: var(--em-afternoon); }
.mk-embed .mk-em__row[data-band="evening"] .mk-em__dot { background: var(--em-evening); }

.mk-embed .mk-em__meta { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
/* Fixed icon column, so every line's text starts at the same left edge. */
.mk-embed .mk-em__metaline {
	display: grid;
	grid-template-columns: 16px minmax(0, 1fr);
	gap: 7px;
	align-items: start;
	font-size: 13px;
	line-height: 1.45;
	color: var(--em-muted);
}
.mk-embed .mk-em__meta .mk-em__metaline > span {
	/* Up to two lines, as in the events list (js/yodel-list-view.js). */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	overflow-wrap: anywhere;
}
.mk-embed .mk-em__ico { width: 16px; height: 16px; margin-top: 2px; color: var(--em-pink); }
/* Desktop has the time column; this line is for phones. */
.mk-embed .mk-em__metaline--time { display: none; }

.mk-embed .mk-em__chev { display: block; color: #667085; font-size: 22px; line-height: 1; text-align: center; }

/* ---------- featured: the list view's treatment ---------- */
/* The same row with more room: the Featured Events box's blue ground, a bigger
   thumbnail and title, and the two-line blurb ordinary rows leave out. Sorted first within its day. */
.mk-embed .mk-em__row--featured {
	grid-template-columns: 88px 210px minmax(0, 1fr) 22px;
	margin: 8px 0 10px;
	padding: 16px 12px;
	border: 1px solid var(--em-featured-line);
	border-radius: 12px;
	background: var(--em-featured-bg);
}
.mk-embed .mk-em__row--featured:hover { background: #ddedf7; }
.mk-embed .mk-em__row--featured .mk-em__title { font-size: 19px; }
.mk-embed .mk-em__blurb {
	display: -webkit-box;
	margin-top: 6px;
	overflow: hidden;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	font-size: 13px;
	line-height: 1.45;
	color: var(--em-muted);
}

/* ---------- detail: the tapped row turns into a card, in place ---------- */
/* The row and its card share .mk-em__item, whose height is animated between
   them; the rest of the list just moves by the difference. */
.mk-embed .mk-em__item.is-animating { transition: height .25s ease; }
.mk-embed .mk-em__row[hidden] { display: none; }
.mk-embed .mk-em__item.is-open { padding: 10px 0 12px; }
.mk-embed .mk-em__detail {
	position: relative;
	animation: mk-em-in .25s ease;
	display: grid;
	grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
	gap: 24px;
	align-items: start;
	padding: 20px;
	border: 1px solid var(--em-line);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}
@keyframes mk-em-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.mk-embed .mk-em__detail { animation: none; }
}
/* The photo keeps its own shape: rounded, top-aligned, nothing behind it. */
.mk-embed .mk-em__detail-img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	border-radius: 10px;
}
/* No photo: the text takes the full width. */
.mk-embed .mk-em__detail > .mk-em__detail-info:nth-child(2) { grid-column: 1 / -1; }
.mk-embed .mk-em__detail-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding-right: 32px; }
.mk-embed .mk-em__eyebrow {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--em-featured);
}
.mk-embed .mk-em__detail-title { font-size: 22px; font-weight: 700; line-height: 1.25; color: var(--em-ink); }
.mk-embed .mk-em__detail-meta { display: flex; flex-direction: column; gap: 4px; }
.mk-embed .mk-em__detail .mk-em__metaline { font-size: 14px; color: var(--em-ink); }
.mk-embed .mk-em__desc { font-size: 14px; line-height: 1.55; color: var(--em-ink); }
.mk-embed .mk-em__more {
	align-self: flex-start;
	margin-top: 4px;
	padding: 9px 18px;
	border-radius: 999px;
	background: var(--em-pink);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}
.mk-embed .mk-em__more:hover,
.mk-embed .mk-em__more:focus { color: #fff; filter: brightness(1.08); text-decoration: none; }
.mk-embed .mk-em__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid var(--em-line);
	border-radius: 50%;
	background: #fff;
	color: var(--em-ink);
	font: inherit;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}
.mk-embed .mk-em__close:hover { border-color: var(--em-pink); color: var(--em-pink); }
.mk-embed .mk-em__close:focus-visible { outline: 2px solid var(--em-pink); outline-offset: 2px; }

/* A featured event's card stays in the Featured blue its row had: the blue
   ground and border, and blue where an ordinary card is pink. */
.mk-embed .mk-em__detail--featured {
	border-color: var(--em-featured-line);
	background: var(--em-featured-bg);
}
.mk-embed .mk-em__detail--featured .mk-em__ico { color: var(--em-featured); }
.mk-embed .mk-em__detail--featured .mk-em__more { background: var(--em-featured); }
.mk-embed .mk-em__detail--featured .mk-em__close:hover { border-color: var(--em-featured); color: var(--em-featured); }
.mk-embed .mk-em__detail--featured .mk-em__close:focus-visible { outline-color: var(--em-featured); }

/* ---------- show more / empty ---------- */
.mk-embed .mk-em__showmore {
	display: block;
	margin: 18px auto 0;
	padding: 10px 22px;
	border: 1.5px solid var(--em-pink);
	border-radius: 999px;
	background: #fff;
	color: var(--em-pink);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
.mk-embed .mk-em__showmore:hover { background: #fdf2f8; }
.mk-embed .mk-em__showmore[hidden] { display: none; }
.mk-embed .mk-em__empty { padding: 18px; font-size: 15px; color: var(--em-muted); text-align: center; }

/* ---------- phones ---------- */
@media (max-width: 700px) {
	/* Thumbnail first; the time leaves its column for the third meta line. */
	.mk-embed .mk-em__row { grid-template-columns: 112px minmax(0, 1fr) 18px; gap: 12px; }
	.mk-embed .mk-em__time { display: none; }
	.mk-embed .mk-em__thumb { align-self: start; aspect-ratio: 1; }   /* square on a phone, as the events list */
	.mk-embed .mk-em__metaline--time { display: grid; }
	.mk-embed .mk-em__title { font-size: 15px; }
	.mk-embed .mk-em__metaline { font-size: 12px; }
	.mk-embed .mk-em__row--featured { grid-template-columns: 150px minmax(0, 1fr) 18px; }
	.mk-embed .mk-em__row--featured .mk-em__title { font-size: 17px; }
	/* Photo above the text; the close button sits over the photo's corner. */
	.mk-embed .mk-em__detail { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 14px; }
	.mk-embed .mk-em__detail-info { padding-right: 0; }
	.mk-embed .mk-em__detail-title { font-size: 19px; }
	.mk-embed .mk-em__close { top: 22px; right: 22px; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
}
