/* Featured events bar — js/yodel-featured-bar.js
   Sits between the day picker and the widget's own event grid. Scoped under
   .mk-featured so it can't affect the rest of the site. */

.mk-featured {
	/* Was #1287b8 = 4.05:1 on white, and behind white button text. 5.61 now. */
	--mkf-accent: #0f6f97;       /* badges, buttons, headings */
	--mkf-accent-dark: #0d6f96;  /* hover / stronger text */
	--mkf-bg: #e9f4fa;           /* panel ground */
	--mkf-line: #cfe6f2;
	--mkf-ink: #1f2937;
	--mkf-muted: #5b6472;
	--mkf-card: 340px;
	--mkf-gap: 16px;

	position: relative;
	margin: 22px 0 28px;
	padding: 18px 20px 20px;
	background: var(--mkf-bg);
	border: 1px solid var(--mkf-line);
	border-radius: 14px;
	font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--mkf-ink);
}
.mk-featured * { box-sizing: border-box; }
.mk-featured[hidden] { display: none; }

/* main.css styles bare headings inside .template-events-calendar -- its h2 rule
   paints a pink block with white uppercase text, which is what this heading wore
   before. Those selectors are (0,1,1), so every rule the component sets on a
   heading or paragraph is prefixed with .mk-featured to reach (0,2,0) and win on
   specificity rather than on stylesheet load order. */
.mk-featured .mk-featured__title,
.mk-featured .mk-featured__name,
.mk-featured .mk-fcard__title,
.mk-featured .mk-featured__sub,
.mk-featured .mk-featured__desc,
.mk-featured .mk-featured__meta,
.mk-featured .mk-fcard__place,
.mk-featured .mk-featured__promoted {
	background: none;
	text-transform: none;
	letter-spacing: normal;
	padding: 0;
	border: 0;
	margin: 0;
}

/* ---------- header ---------- */
.mk-featured__head {
	display: flex;
	align-items: baseline;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}
/* "Feature Your Event" in the box's top-right corner. */
.mk-featured__action { margin-left: auto; align-self: center; }
.mk-featured__action:empty { display: none; }
@media (max-width: 700px) {
	/* Under the heading rather than squeezed beside it. */
	.mk-featured__action { margin-left: 0; width: 100%; }
}
.mk-featured .mk-featured__title {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--mkf-accent);
}
.mk-featured .mk-featured__sub {
	font-size: 14px;
	color: var(--mkf-muted);
}
/* ---------- carousel ---------- */
.mk-featured__carousel { position: relative; }
.mk-featured__carousel[hidden],
.mk-featured__focus[hidden] { display: none; }

/* Arrows overlay the row's edges, sitting on top of the peeking cards. */
.mk-featured__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	width: 38px;
	height: 38px;
	border: 1px solid var(--mkf-line);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .16);
	color: var(--mkf-accent);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
.mk-featured__nav:hover { background: var(--mkf-accent); color: #fff; }
.mk-featured__nav--prev { left: -6px; }
.mk-featured__nav--next { right: -6px; }
.mk-featured__nav[hidden] { display: none; }

.mk-featured__viewport {
	overflow: hidden;
	scroll-behavior: smooth;
}
.mk-featured__row {
	display: flex;
	gap: var(--mkf-gap);
	align-items: stretch;
}

/* ---------- card ---------- */
.mk-fcard {
	flex: 0 0 var(--mkf-card);
	max-width: var(--mkf-card);
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--mkf-line);
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: box-shadow .18s ease, transform .18s ease;
}
.mk-fcard:hover {
	box-shadow: 0 8px 20px rgba(18, 135, 184, .22);
	transform: translateY(-2px);
}
.mk-fcard__img {
	position: relative;
	height: 150px;      /* taller than a list row, shorter than a full tile */
	background: #dfe7ec;
	overflow: hidden;
}
.mk-fcard__img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.mk-fcard__badge {
	position: absolute;
	top: 10px;
	left: 0;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 12px 5px 10px;
	border-radius: 0 6px 6px 0;
	background: var(--mkf-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
}
.mk-fcard__date {
	position: absolute;
	top: 44px;
	left: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 6px 10px 8px;
	border-radius: 0 6px 6px 0;
	background: var(--mkf-accent);
	color: #fff;
	line-height: 1.1;
}
.mk-fcard__date b:nth-child(1),
.mk-fcard__date b:nth-child(2) { font-size: 10px; letter-spacing: .07em; }
.mk-fcard__date b:nth-child(3) { font-size: 22px; }

.mk-fcard__body {
	display: flex;
	flex-direction: column;
	gap: 5px;
	padding: 12px 14px 14px;
	flex: 1 1 auto;
}
.mk-featured .mk-fcard__title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.mk-featured .mk-fcard__place {
	font-size: 13px;
	color: var(--mkf-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.mk-fcard__place .mk-pin {
	width: 14px;
	height: 14px;
	margin-right: 4px;
	vertical-align: -2px;
	color: var(--mkf-accent);
}

/* ---------- focused view ---------- */
.mk-featured__focus {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) minmax(0, 3fr);
	gap: 0;
	background: #fff;
	border: 1px solid var(--mkf-line);
	border-radius: 12px;
	overflow: hidden;
	animation: mk-featured-in .28s ease both;
}
@keyframes mk-featured-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

.mk-featured__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 4;
	width: 30px;
	height: 30px;
	border: 1px solid var(--mkf-line);
	border-radius: 50%;
	background: #fff;
	color: var(--mkf-muted);
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
}
.mk-featured__close:hover { background: var(--mkf-accent); border-color: var(--mkf-accent); color: #fff; }

.mk-featured__hero { position: relative; min-height: 260px; background: #dfe7ec; }
.mk-featured__hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-featured__ribbon {
	position: absolute;
	top: 16px;
	left: 0;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 9px 20px 9px 16px;
	background: var(--mkf-accent);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .07em;
	border-radius: 0 6px 6px 0;
}
.mk-featured__herodate {
	position: absolute;
	left: 16px;
	bottom: 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 8px 14px 10px;
	border-radius: 8px;
	background: var(--mkf-accent);
	color: #fff;
	line-height: 1.1;
}
.mk-featured__herodate b:nth-child(1),
.mk-featured__herodate b:nth-child(2) { font-size: 11px; letter-spacing: .07em; }
.mk-featured__herodate b:nth-child(3) { font-size: 27px; }

.mk-featured__body { padding: 22px 24px; }
.mk-featured__eyebrow {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .09em;
	color: var(--mkf-accent);
	margin-bottom: 6px;
}
.mk-featured .mk-featured__name {
	margin-bottom: 10px;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--mkf-ink);
}
.mk-featured .mk-featured__desc {
	margin-bottom: 12px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--mkf-muted);
}
.mk-featured .mk-featured__meta {
	margin-bottom: 6px;
	font-size: 14px;
	display: flex;
	align-items: flex-start;
	gap: 8px;
}
/* Same 16px icons as the list rows (.mk-lv__ico). */
.mk-featured__meta .mk-ico {
	width: 16px;
	height: 16px;
	margin-top: 2px;
	color: var(--mkf-accent);
	flex: 0 0 auto;
}

.mk-featured__pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mk-featured__pill {
	padding: 5px 12px;
	border-radius: 999px;
	background: #eef6fb;
	border: 1px solid var(--mkf-line);
	font-size: 12px;
	font-weight: 600;
	color: var(--mkf-accent-dark);
}
.mk-featured__pill--ages {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: #fff;
}
.mk-featured__pill--ages .mk-ico { width: 14px; height: 14px; }

.mk-featured__aside {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 22px 24px;
	border-left: 1px solid var(--mkf-line);
	justify-content: center;
}
.mk-featured .mk-featured__promoted { margin-bottom: 4px; font-size: 13px; color: var(--mkf-muted); }
.mk-featured__promoted b { display: block; color: var(--mkf-ink); font-size: 14px; }

.mk-featured__cta,
.mk-featured__ghost,
.mk-featured__link {
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	border-radius: 8px;
	padding: 10px 14px;
	text-decoration: none;
	white-space: nowrap;
}
.mk-featured__cta { background: var(--mkf-accent); color: #fff; border: 1px solid var(--mkf-accent); }
.mk-featured__cta:hover { background: var(--mkf-accent-dark); }
.mk-featured__ghost { background: #fff; color: var(--mkf-accent); border: 1px solid var(--mkf-line); }
.mk-featured__ghost:hover { border-color: var(--mkf-accent); }
.mk-featured__link { background: none; border: 0; color: var(--mkf-accent); padding: 4px; }
.mk-featured__link:hover { text-decoration: underline; }

/* Add-to-Calendar chooser */
.mk-featured__calwrap { position: relative; }
.mk-featured__calwrap .mk-featured__ghost { width: 100%; }
.mk-featured__calmenu {
	position: absolute;
	right: 0;
	left: 0;
	top: calc(100% + 6px);
	z-index: 6;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--mkf-line);
	border-radius: 8px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .16);
	overflow: hidden;
}
.mk-featured__calmenu[hidden] { display: none; }
.mk-featured__calopt {
	font: inherit;
	font-size: 13px;
	text-align: left;
	padding: 10px 12px;
	background: none;
	border: 0;
	color: var(--mkf-ink);
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
}
.mk-featured__calopt:hover { background: #eef6fb; color: var(--mkf-accent-dark); }

/* Transient confirmation after Share copies a link to the clipboard. */
.mk-featured__toast {
	position: absolute;
	left: 50%;
	bottom: 14px;
	transform: translateX(-50%);
	background: var(--mkf-ink);
	color: #fff;
	font-size: 13px;
	padding: 8px 16px;
	border-radius: 999px;
	z-index: 5;
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
	.mk-featured__focus { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
	.mk-featured__aside {
		grid-column: 1 / -1;
		border-left: 0;
		border-top: 1px solid var(--mkf-line);
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
	}
	.mk-featured__promoted { margin: 0 auto 0 0; }
}
@media (max-width: 700px) {
	.mk-featured { padding: 14px 12px 16px; --mkf-card: 260px; }
	.mk-featured__focus { grid-template-columns: minmax(0, 1fr); }
	/* Fixed rather than min-height: stacked, the hero spans the full width, so
	   letting the image's aspect ratio set the height pushes everything else off
	   the screen. object-fit crops instead. */
	.mk-featured__hero { min-height: 0; height: 200px; }
	.mk-featured .mk-featured__name { font-size: 21px; }
	.mk-featured__nav--prev { left: -2px; }
	.mk-featured__nav--next { right: -2px; }

	/* Undo the tablet row: on a phone the organizer and the three actions each
	   get their own full-width line rather than sharing one. */
	.mk-featured__aside {
		flex-direction: column;
		align-items: stretch;
		flex-wrap: nowrap;
	}
	.mk-featured .mk-featured__promoted { margin: 0 0 6px; }
	.mk-featured__calwrap { width: 100%; }
	.mk-featured__cta,
	.mk-featured__ghost { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.mk-featured__viewport { scroll-behavior: auto; }
	.mk-fcard { transition: none; }
	.mk-featured__focus { animation: none; }
}
