/* ==========================================================================
   What's On — Event listing with sidebar filters and calendar
   ========================================================================== */

/* --- Featured hero band (editorial pull above the grid) --------------- */
.whats-on__feature {
	margin: 0 0 var(--space-2xl);
}
.whats-on__feature-link {
	display: block;
	color: inherit;
	text-decoration: none;
	transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.whats-on__feature-link:hover { transform: translateY(-2px); }

.whats-on__feature-link > * {
	display: grid;
}
.whats-on__feature-link {
	display: grid;
	grid-template-columns: 1fr;
	background: var(--color-dark);
	color: var(--color-bg);
	overflow: hidden;
	min-height: 380px;
	border: 1px solid var(--color-border);
}
@media (min-width: 900px) {
	.whats-on__feature-link {
		grid-template-columns: 1.2fr 1fr;
		min-height: 440px;
	}
}

.whats-on__feature-media {
	background-size: cover;
	background-position: center;
	background-color: var(--color-primary);
	position: relative;
	min-height: 260px;
}
.whats-on__feature-media::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom right, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.45));
}
.whats-on__feature-flag {
	position: absolute;
	top: var(--space-md);
	left: var(--space-md);
	background: var(--color-accent);
	color: var(--color-dark);
	padding: 6px 14px;
	font-size: 10px;
	font-weight: var(--weight-bold);
	letter-spacing: 0.25em;
	text-transform: uppercase;
	z-index: 1;
}
.whats-on__feature-body {
	padding: var(--space-2xl);
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: var(--space-sm);
}
@media (min-width: 900px) {
	.whats-on__feature-body { padding: var(--space-3xl); }
}
.whats-on__feature-eyebrow {
	font-size: var(--text-xs);
	font-weight: var(--weight-bold);
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--color-accent);
	margin: 0 0 var(--space-xs);
}
.whats-on__feature-title {
	font-size: clamp(1.75rem, 4.5vw, 3.25rem);
	font-weight: var(--weight-black);
	letter-spacing: -0.03em;
	line-height: 1;
	color: var(--color-bg);
	margin: 0;
}
.whats-on__feature-date {
	font-size: var(--text-base);
	font-weight: var(--weight-semibold);
	color: rgba(255, 255, 255, 0.85);
	margin: var(--space-sm) 0 0;
	letter-spacing: 0.02em;
}
.whats-on__feature-summary {
	font-size: var(--text-base);
	line-height: var(--leading-normal);
	color: rgba(255, 255, 255, 0.8);
	max-width: 48ch;
	margin: var(--space-md) 0;
}
.whats-on__feature-meta {
	display: flex;
	align-items: center;
	gap: var(--space-md);
	margin: 0 0 var(--space-lg);
}
.whats-on__feature-price {
	font-size: var(--text-base);
	font-weight: var(--weight-bold);
	color: var(--color-bg);
	letter-spacing: 0.02em;
}
.whats-on__feature-cta {
	align-self: flex-start;
}

/* --- Wide event card (spans two columns in the grid) ------------------ */
.whats-on__event-wrapper--wide {
	grid-column: span 1;
}
@media (min-width: 1024px) {
	.whats-on__event-wrapper--wide { grid-column: span 2; }
	.whats-on__event-wrapper--wide .event-card__link {
		display: grid;
		grid-template-columns: 1.1fr 1fr;
		gap: var(--space-xl);
		align-items: stretch;
	}
	.whats-on__event-wrapper--wide .event-card__image {
		aspect-ratio: auto;
		min-height: 360px;
	}
	.whats-on__event-wrapper--wide .event-card__body {
		justify-content: center;
		padding-right: var(--space-md);
	}
	.whats-on__event-wrapper--wide .event-card__title {
		font-size: clamp(1.5rem, 2.4vw, 2.25rem);
		line-height: 1.05;
	}
	.whats-on__event-wrapper--wide .event-card__summary {
		-webkit-line-clamp: 4;
		font-size: var(--text-base);
		max-width: 48ch;
	}
}

/* --------------------------------------------------------------------------
   1. LAYOUT — Two-column with sidebar
   -------------------------------------------------------------------------- */

.whats-on {
	padding-bottom: var(--space-3xl);
}

.whats-on__layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-xl);
}

@media (min-width: 768px) {
	.whats-on__layout {
		grid-template-columns: 1fr 280px;
		gap: var(--space-2xl);
	}
}

@media (min-width: 1024px) {
	.whats-on__layout {
		grid-template-columns: 1fr 320px;
	}
}

/* --------------------------------------------------------------------------
   2. VIEW CONTROLS — Count + grid/list toggle
   -------------------------------------------------------------------------- */

.whats-on__view-controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: var(--space-lg);
	padding-bottom: var(--space-md);
	border-bottom: 1px solid var(--color-border);
}

.whats-on__result-count {
	font-size: var(--text-sm);
	color: var(--color-text-muted);
	font-weight: var(--weight-medium);
}

.whats-on__view-toggle {
	display: flex;
	gap: 2px;
	background-color: var(--color-bg-soft);
	border-radius: var(--radius-sm);
	padding: 2px;
}

.whats-on__view-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: none;
	border: none;
	border-radius: var(--radius-sm);
	cursor: pointer;
	color: var(--color-text-muted);
	transition: background-color var(--transition-base), color var(--transition-base);
}

.whats-on__view-btn:hover {
	color: var(--color-dark);
}

.whats-on__view-btn--active,
.whats-on__view-btn[aria-pressed="true"] {
	background-color: var(--color-bg);
	color: var(--color-dark);
	box-shadow: var(--shadow-sm);
}

.whats-on__view-btn:focus-visible {
	outline: 2px solid var(--color-focus);
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   3. LIST VIEW — Alternative to grid
   -------------------------------------------------------------------------- */

.whats-on__grid--list {
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
}

.whats-on__grid--list .event-card {
	flex-direction: row;
}

.whats-on__grid--list .event-card__link {
	flex-direction: row;
}

.whats-on__grid--list .event-card__image {
	width: 200px;
	min-width: 200px;
	aspect-ratio: auto;
	height: 100%;
	min-height: 150px;
}

@media (max-width: 479px) {
	.whats-on__grid--list .event-card__link {
		flex-direction: column;
	}

	.whats-on__grid--list .event-card__image {
		width: 100%;
		min-width: auto;
		aspect-ratio: 16 / 8;
		height: auto;
		min-height: auto;
	}
}

/* Hidden wrapper for filtered-out events */
.whats-on__event-wrapper[hidden] {
	display: none;
}

/* --------------------------------------------------------------------------
   4. NO RESULTS
   -------------------------------------------------------------------------- */

.whats-on__no-results {
	text-align: center;
	padding: var(--space-3xl) var(--space-xl);
}

.whats-on__no-results h2 {
	font-size: var(--text-2xl);
	margin-bottom: var(--space-sm);
}

.whats-on__no-results p {
	color: var(--color-text-muted);
	margin-bottom: var(--space-lg);
}

/* --------------------------------------------------------------------------
   5. MOBILE FILTER CONTROLS
   -------------------------------------------------------------------------- */

.whats-on__mobile-controls {
	margin-bottom: var(--space-lg);
}

.whats-on__filter-toggle {
	gap: var(--space-sm);
}

/* --------------------------------------------------------------------------
   6. SIDEBAR
   -------------------------------------------------------------------------- */

.whats-on__sidebar-inner {
	position: sticky;
	top: calc(var(--header-height) + var(--space-lg));
}

/* Mobile: sidebar becomes a full-screen overlay */
@media (max-width: 767px) {
	.whats-on__sidebar {
		position: fixed;
		inset: 0;
		z-index: var(--z-overlay);
		background-color: var(--color-bg);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		transform: translateX(100%);
		visibility: hidden;
	}

	@media (prefers-reduced-motion: no-preference) {
		.whats-on__sidebar {
			transition: transform var(--transition-slow), visibility var(--transition-slow);
		}
	}

	.whats-on__sidebar.is-open {
		transform: translateX(0);
		visibility: visible;
	}

	.whats-on__sidebar-inner {
		position: static;
		padding: var(--space-md) var(--container-padding) var(--space-3xl);
	}
}

.whats-on__sidebar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--space-md) 0;
	border-bottom: 1px solid var(--color-border);
	margin-bottom: var(--space-lg);
}

.whats-on__sidebar-title {
	font-size: var(--text-xl);
}

.whats-on__sidebar-close {
	background: none;
	border: none;
	cursor: pointer;
	padding: var(--space-xs);
	color: var(--color-text);
	border-radius: var(--radius-sm);
}

.whats-on__sidebar-close:focus-visible {
	outline: 2px solid var(--color-focus);
	outline-offset: 2px;
}

.whats-on__sidebar-actions {
	padding: var(--space-lg) 0;
	border-top: 1px solid var(--color-border);
	margin-top: var(--space-lg);
}

/* --------------------------------------------------------------------------
   7. FILTER GROUPS
   -------------------------------------------------------------------------- */

.filter-group {
	margin-bottom: var(--space-xl);
}

.filter-group__title {
	font-family: var(--font-body);
	font-size: var(--text-sm);
	font-weight: var(--weight-semibold);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--color-text-muted);
	margin-bottom: var(--space-md);
}

/* Filter chips (radio buttons styled as pills) */
.filter-group__options {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
}

.filter-chip {
	cursor: pointer;
}

.filter-chip__label {
	display: inline-block;
	padding: 0.375em 0.875em;
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-full);
	color: var(--color-text);
	background-color: var(--color-bg);
	transition: background-color var(--transition-base), border-color var(--transition-base), color var(--transition-base);
}

.filter-chip__label:hover {
	border-color: var(--color-primary);
	color: var(--color-primary);
}

.filter-chip input:checked + .filter-chip__label {
	background-color: var(--color-primary);
	border-color: var(--color-primary);
	color: var(--color-bg);
}

.filter-chip input:focus-visible + .filter-chip__label {
	outline: 3px solid var(--color-focus);
	outline-offset: 2px;
}

/* Filter checkboxes */
.filter-checkbox {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	cursor: pointer;
	padding: 0.25em 0;
	width: 100%;
}

.filter-checkbox__mark {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	border: 2px solid var(--color-border-dark);
	border-radius: 3px;
	background-color: var(--color-bg);
	transition: background-color var(--transition-base), border-color var(--transition-base);
	position: relative;
}

.filter-checkbox__mark::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 5px;
	width: 5px;
	height: 9px;
	border: solid var(--color-bg);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	opacity: 0;
	transition: opacity var(--transition-fast);
}

.filter-checkbox input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.filter-checkbox input:checked + .filter-checkbox__mark {
	background-color: var(--color-primary);
	border-color: var(--color-primary);
}

.filter-checkbox input:checked + .filter-checkbox__mark::after {
	opacity: 1;
}

.filter-checkbox input:focus-visible + .filter-checkbox__mark {
	outline: 3px solid var(--color-focus);
	outline-offset: 2px;
}

.filter-checkbox__label {
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
	color: var(--color-text);
}

/* --------------------------------------------------------------------------
   8. CALENDAR WIDGET
   -------------------------------------------------------------------------- */

.calendar-widget {
	background-color: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	padding: var(--space-md);
}

.calendar-widget__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: var(--space-md);
}

.calendar-widget__month {
	font-family: var(--font-heading);
	font-size: var(--text-base);
	font-weight: var(--weight-bold);
}

.calendar-widget__nav {
	display: flex;
	gap: var(--space-xs);
}

.calendar-widget__nav-btn {
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	cursor: pointer;
	color: var(--color-text);
	font-size: var(--text-sm);
	transition: background-color var(--transition-base);
}

.calendar-widget__nav-btn:hover {
	background-color: var(--color-bg-soft);
}

.calendar-widget__nav-btn:focus-visible {
	outline: 2px solid var(--color-focus);
	outline-offset: 2px;
}

.calendar-widget__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 1px;
	text-align: center;
}

.calendar-widget__day-header {
	font-size: var(--text-xs);
	font-weight: var(--weight-semibold);
	color: var(--color-text-muted);
	padding: var(--space-xs) 0;
	text-transform: uppercase;
}

.calendar-widget__day {
	padding: var(--space-xs);
	font-size: var(--text-sm);
	border-radius: var(--radius-sm);
	background: none;
	border: none;
	cursor: default;
	color: var(--color-text-light);
}

.calendar-widget__day--current-month {
	color: var(--color-text);
}

.calendar-widget__day--has-events {
	cursor: pointer;
	font-weight: var(--weight-semibold);
	color: var(--color-primary);
	background-color: rgba(27, 77, 62, 0.08);
}

.calendar-widget__day--has-events:hover {
	background-color: rgba(27, 77, 62, 0.15);
}

.calendar-widget__day--selected {
	background-color: var(--color-primary);
	color: var(--color-bg);
}

.calendar-widget__day--today {
	border: 2px solid var(--color-accent);
}

.calendar-widget__day:focus-visible {
	outline: 2px solid var(--color-focus);
	outline-offset: 1px;
}
