/**
 * Provides the bundled Event Carousel and Event Sidebar presentation.
 *
 * Project scope: ModusWorks Contextual Featured Content.
 * Dependencies: Event Carousel and Event Sidebar layout.php class contracts
 * plus event-carousel.js state for Carousel instances only.
 * Writes: Generic plugin presentation only; brand color is a widget setting.
 * Maintenance boundary: Flexbox only; no CSS Grid or theme-specific selectors.
 *
 * Change record:
 * - 2026-10-15: Moved the public stylesheet into the established assets tree
 *   because the RFM web server does not expose newly deployed layout asset
 *   subdirectories directly.
 * - 2026-10-15: Added responsive grouped Event cards and accessible controls.
 * - 2026-10-15: Matched the approved SmartMag three-column rhythm with a 50px
 *   desktop gutter, centered dividers, white controls, linked organizer, and
 *   over-image Event category treatment without a theme dependency.
 * - 2026-10-15: Fixed title and arrow dimensions to the homepage's computed
 *   20px and 40px values instead of allowing the theme root size to scale rems.
 * - 2026-10-15: Preserved three Flexbox columns on tablets and constrained the
 *   viewport to the active group so hidden, taller groups add no blank space.
 * - 2026-10-15: Added mobile progressive reveal, a full-width Load More Events
 *   control, and increased desktop and tablet dot separation.
 * - 2026-10-16: Added the compact single-Event sidebar wrapper and heading.
 * - 2026-10-16: Added the two-tone sidebar heading, tighter card title, and
 *   closing divider with measured spacing above the following ad.
 */

/* BEGIN Contextual Featured Content Event Carousel presentation (2026-10-15). */
.mw-cfc-layout-event-carousel {
	position: relative;
	width: 100%;
}

.mw-cfc-layout-event-sidebar {
	border-bottom: 1px solid #ebebeb;
	box-sizing: border-box;
	padding-bottom: 16px;
	position: relative;
	width: 100%;
}

.mw-cfc-event-sidebar__heading {
	align-items: center;
	display: flex;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 1rem;
	text-transform: uppercase;
}

.mw-cfc-event-sidebar__heading::after {
	border-top: 1px solid #e2e2e2;
	content: "";
	flex: 1 1 auto;
	margin-left: 0.75rem;
}

.mw-cfc-event-sidebar__heading-accent {
	color: var(--mw-cfc-accent);
	margin-left: 0.25em;
}

.mw-cfc-layout-event-sidebar .mw-cfc-event-card__title {
	font-size: 18px;
	line-height: 1.2;
}

.mw-cfc-event-carousel__viewport {
	overflow: hidden;
	touch-action: pan-y;
	transition: height 220ms ease;
}

.mw-cfc-event-carousel__track {
	align-items: flex-start;
	display: flex;
	transition: transform 320ms ease;
	width: 100%;
}

.mw-cfc-event-carousel__group {
	display: flex;
	flex: 0 0 100%;
	list-style: none;
	margin: 0;
	min-width: 0;
	padding: 0;
}

.mw-cfc-event-carousel__item {
	flex: 1 1 0;
	min-width: 0;
	position: relative;
}

.mw-cfc-gap-small .mw-cfc-event-carousel__group { gap: 1rem; }
.mw-cfc-gap-medium .mw-cfc-event-carousel__group { gap: 2.125rem; }
.mw-cfc-gap-large .mw-cfc-event-carousel__group { gap: 3rem; }

.mw-cfc-event-card__image {
	margin: 0 0 0.8rem;
	overflow: hidden;
	position: relative;
}

.mw-cfc-event-card__image a,
.mw-cfc-event-card__image img {
	display: block;
	height: 100%;
	width: 100%;
}

.mw-cfc-event-card__image img {
	object-fit: cover;
	transition: opacity 180ms ease;
}

.mw-cfc-event-card__image a:hover img,
.mw-cfc-event-card__image a:focus-visible img { opacity: 0.78; }

.mw-cfc-ratio-21-9 .mw-cfc-event-card__image { aspect-ratio: 21 / 9; }
.mw-cfc-ratio-16-9 .mw-cfc-event-card__image { aspect-ratio: 16 / 9; }
.mw-cfc-ratio-4-3 .mw-cfc-event-card__image { aspect-ratio: 4 / 3; }
.mw-cfc-ratio-3-2 .mw-cfc-event-card__image { aspect-ratio: 3 / 2; }
.mw-cfc-ratio-1-1 .mw-cfc-event-card__image { aspect-ratio: 1 / 1; }
.mw-cfc-ratio-3-4 .mw-cfc-event-card__image { aspect-ratio: 3 / 4; }

.mw-cfc-event-card__date-badge {
	align-items: center;
	background: #fff;
	border-radius: 3px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
	color: #111;
	display: flex;
	flex-direction: column;
	left: 0.75rem;
	line-height: 1;
	min-width: 3.35rem;
	padding: 0.48rem 0.58rem 0.52rem;
	pointer-events: none;
	position: absolute;
	top: 0.75rem;
}

.mw-cfc-event-card__date-badge span {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.07em;
}

.mw-cfc-event-card__date-badge strong {
	font-size: 1.35rem;
	font-weight: 700;
	margin-top: 0.22rem;
}

.mw-cfc-event-card__taxonomy {
	font-size: 0.625rem;
	font-weight: 600;
	line-height: 1.375rem;
	margin: 0;
	text-transform: uppercase;
}

.mw-cfc-event-card__taxonomy--overlay {
	background: var(--mw-cfc-accent);
	bottom: 0;
	color: #fff;
	left: 0;
	padding: 0 0.5rem;
	position: absolute;
	z-index: 1;
}

.mw-cfc-event-card__taxonomy--overlay a { color: #fff; }
.mw-cfc-event-card__taxonomy.mw-cfc-event-card__taxonomy--overlay a:hover,
.mw-cfc-event-card__taxonomy.mw-cfc-event-card__taxonomy--overlay a:focus-visible { color: #fff; text-decoration: underline; }
.mw-cfc-event-card__taxonomy--standalone { margin-bottom: 0.45rem; }
.mw-cfc-event-card__taxonomy--standalone a { color: var(--mw-cfc-accent); }
.mw-cfc-event-card__taxonomy a:hover,
.mw-cfc-event-card__taxonomy a:focus-visible { color: #111; text-decoration: underline; }

.mw-cfc-event-card__organizer {
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.35;
	margin: 0.625rem 0 0.3125rem;
}

.mw-cfc-event-card__organizer a { color: var(--mw-cfc-accent); }
.mw-cfc-event-card__organizer a:hover,
.mw-cfc-event-card__organizer a:focus-visible { color: #111; text-decoration: underline; }

.mw-cfc-event-card__title {
	font-size: 20px;
	font-weight: 600;
	line-height: 1.36;
	margin: 0 0 0.55rem;
}

.mw-cfc-event-card__title a { color: #111; }
.mw-cfc-event-card__title a:hover,
.mw-cfc-event-card__title a:focus-visible { color: var(--mw-cfc-accent); }

.mw-cfc-event-card__excerpt,
.mw-cfc-event-card__schedule {
	color: #444;
	font-size: 0.95rem;
	line-height: 1.45;
	margin: 0;
}

.mw-cfc-event-card__excerpt { margin-bottom: 0.55rem; }

.mw-cfc-event-card__schedule {
	display: flex;
	flex-wrap: wrap;
	font-weight: 600;
	gap: 0.3rem 0.85rem;
	margin-bottom: 0.22rem;
}

.mw-cfc-event-card__date,
.mw-cfc-event-card__time {
	align-items: center;
	display: inline-flex;
	gap: 0.35rem;
}

.mw-cfc-event-card__schedule-icon {
	fill: none;
	flex: 0 0 0.95rem;
	height: 0.95rem;
	stroke: var(--mw-cfc-accent);
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
	width: 0.95rem;
}

.mw-cfc-event-carousel__arrow {
	align-items: center;
	background: #fff;
	border: 1px solid #f7f7f7;
	border-radius: 50%;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	color: #111;
	cursor: pointer;
	display: flex;
	height: 40px;
	justify-content: center;
	opacity: 0;
	padding: 0;
	position: absolute;
	top: 6.35rem;
	transition: background-color 160ms ease, color 160ms ease, opacity 160ms ease;
	width: 40px;
	z-index: 2;
}

.mw-cfc-event-carousel__arrow svg {
	fill: none;
	height: 1.125rem;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2.25;
	width: 1.125rem;
}

.mw-cfc-event-carousel__arrow--previous { left: 0; transform: translateX(-50%); }
.mw-cfc-event-carousel__arrow--next { right: 0; transform: translateX(50%); }
.mw-cfc-layout-event-carousel:hover .mw-cfc-event-carousel__arrow,
.mw-cfc-layout-event-carousel:focus-within .mw-cfc-event-carousel__arrow { opacity: 1; }
.mw-cfc-event-carousel__arrow:hover,
.mw-cfc-event-carousel__arrow:focus-visible { background: #111; color: #fff; }
.mw-cfc-event-carousel__arrow:disabled { cursor: default; opacity: 0; }

.mw-cfc-event-carousel__dots {
	display: flex;
	gap: 0.55rem;
	justify-content: center;
	margin-top: 1.4rem;
}

.mw-cfc-event-carousel__mobile-more {
	background: var(--mw-cfc-accent);
	border: 1px solid var(--mw-cfc-accent);
	border-radius: 3px;
	color: #fff;
	cursor: pointer;
	display: none;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	margin-top: 1.5rem;
	padding: 0.8rem 1rem;
	transition: background-color 160ms ease, border-color 160ms ease;
	width: 100%;
}

.mw-cfc-event-carousel__mobile-more:hover,
.mw-cfc-event-carousel__mobile-more:focus-visible {
	background: #111;
	border-color: #111;
	color: #fff;
}

.mw-cfc-event-carousel__dots button {
	background: transparent;
	border: 1px solid #aeb4b8;
	border-radius: 50%;
	cursor: pointer;
	height: 0.72rem;
	padding: 0;
	width: 0.72rem;
}

.mw-cfc-event-carousel__dots button[aria-current="true"] {
	background: var(--mw-cfc-accent);
	border-color: var(--mw-cfc-accent);
}

@media (max-width: 1024px) and (min-width: 641px) {
	.mw-cfc-event-carousel__dots { margin-top: 1.8rem; }
	.mw-cfc-gap-medium .mw-cfc-event-carousel__group { gap: 30px; }

	.mw-cfc-gap-medium .mw-cfc-event-carousel__item:not(:last-child)::after {
		border-right: 1px solid #e8e8e8;
		bottom: 0;
		content: "";
		position: absolute;
		right: -15px;
		top: 0;
	}
}

@media (min-width: 1025px) {
	.mw-cfc-event-carousel__dots { margin-top: 1.8rem; }
	.mw-cfc-gap-medium .mw-cfc-event-carousel__group { gap: 50px; }

	.mw-cfc-gap-medium .mw-cfc-event-carousel__item:not(:last-child)::after {
		border-right: 1px solid #e8e8e8;
		bottom: 0;
		content: "";
		position: absolute;
		right: -25px;
		top: 0;
	}
}

@media (max-width: 640px) {
	.mw-cfc-event-carousel__group {
		flex-direction: column;
		gap: 1.5rem;
	}

	.mw-cfc-event-carousel__item { flex-basis: auto; }
	.mw-cfc-event-carousel__arrow { opacity: 0.96; top: 4.4rem; transform: none; }
	.mw-cfc-event-carousel__arrow--previous { left: 0.5rem; }
	.mw-cfc-event-carousel__arrow--next { right: 0.5rem; }
	.mw-cfc-layout-event-carousel.is-mobile-load-more .mw-cfc-event-carousel__viewport { overflow: visible; }
	.mw-cfc-layout-event-carousel.is-mobile-load-more .mw-cfc-event-carousel__track { display: block; transform: none !important; }
	.mw-cfc-layout-event-carousel.is-mobile-load-more .mw-cfc-event-carousel__group { display: none; flex: none; }
	.mw-cfc-layout-event-carousel.is-mobile-load-more .mw-cfc-event-carousel__group.is-mobile-visible { display: flex; }
	.mw-cfc-layout-event-carousel.is-mobile-load-more .mw-cfc-event-carousel__group.is-mobile-visible + .mw-cfc-event-carousel__group.is-mobile-visible { margin-top: 1.5rem; }
	.mw-cfc-layout-event-carousel.is-mobile-load-more .mw-cfc-event-carousel__arrow,
	.mw-cfc-layout-event-carousel.is-mobile-load-more .mw-cfc-event-carousel__dots { display: none; }
	.mw-cfc-layout-event-carousel.is-mobile-load-more .mw-cfc-event-carousel__mobile-more:not([hidden]) { display: block; }
	.mw-cfc-event-card__title { font-size: 1.125rem; }
	.mw-cfc-mobile-ratio-21-9 .mw-cfc-event-card__image { aspect-ratio: 21 / 9; }
	.mw-cfc-mobile-ratio-16-9 .mw-cfc-event-card__image { aspect-ratio: 16 / 9; }
	.mw-cfc-mobile-ratio-4-3 .mw-cfc-event-card__image { aspect-ratio: 4 / 3; }
	.mw-cfc-mobile-ratio-3-2 .mw-cfc-event-card__image { aspect-ratio: 3 / 2; }
	.mw-cfc-mobile-ratio-1-1 .mw-cfc-event-card__image { aspect-ratio: 1 / 1; }
	.mw-cfc-mobile-ratio-3-4 .mw-cfc-event-card__image { aspect-ratio: 3 / 4; }
}

@media (prefers-reduced-motion: reduce) {
	.mw-cfc-event-carousel__viewport,
	.mw-cfc-event-carousel__track,
	.mw-cfc-event-card__image img { transition: none; }
}
/* END Contextual Featured Content Event Carousel presentation (2026-10-15). */
