/**
 * CITY ON — refined mobile discovery UI (390×844 first).
 */

/* -------------------------------------------------------------------------
   Utilities
   ------------------------------------------------------------------------- */

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	position: fixed;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 1000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0.65rem 0.9rem;
	overflow: visible;
	clip: auto;
	white-space: normal;
	border-radius: 999px;
	background: var(--co-accent);
	color: #0a101c;
}

/* -------------------------------------------------------------------------
   Brand logo + integrated ON switch (compact)
   ------------------------------------------------------------------------- */

.brand-logo {
	display: grid;
	gap: 0.12rem;
	min-width: 0;
}

.brand-logo__lockup {
	display: inline-flex;
	align-items: center;
	gap: 0.32rem;
}

.brand-logo__city {
	font-family: var(--co-font-brand);
	font-size: 1.12rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1;
	color: var(--co-text);
	text-transform: uppercase;
}

.brand-logo__tagline {
	margin: 0;
	font-size: 0.6rem;
	letter-spacing: 0.03em;
	color: var(--co-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 11.5rem;
}

.brand-switch {
	position: relative;
	flex: 0 0 auto;
	padding: 0;
	border-radius: 999px;
	transition: transform 180ms ease;
}

.brand-switch:active {
	transform: scale(0.96);
}

.brand-switch__track {
	position: relative;
	display: block;
	width: 2.85rem;
	height: 1.28rem;
	border-radius: 999px;
	background: #2a3348;
	border: 1px solid rgba(255, 255, 255, 0.14);
	overflow: hidden;
	transition:
		background 220ms ease,
		border-color 220ms ease,
		box-shadow 220ms ease;
}

.brand-switch__label {
	position: absolute;
	top: 50%;
	font-family: var(--co-font-brand);
	font-size: 0.55rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1;
	transform: translateY(-50%);
	transition: opacity 180ms ease;
	pointer-events: none;
}

.brand-switch__label--on {
	left: 0.34rem;
	color: #0b1406;
	opacity: 0;
}

.brand-switch__label--off {
	right: 0.3rem;
	color: rgba(255, 255, 255, 0.5);
	opacity: 1;
}

.brand-switch__knob {
	position: absolute;
	top: 50%;
	left: 0.14rem;
	width: 0.98rem;
	height: 0.98rem;
	border-radius: 50%;
	background: #eef2f8;
	transform: translateY(-50%);
	transition: left 220ms cubic-bezier(0.22, 1, 0.36, 1);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.brand-switch.is-on .brand-switch__track {
	background: var(--co-accent);
	border-color: var(--co-accent-deep);
	box-shadow: 0 0 0 2px var(--co-accent-soft);
}

.brand-switch.is-on .brand-switch__label--on {
	opacity: 1;
}

.brand-switch.is-on .brand-switch__label--off {
	opacity: 0;
}

.brand-switch.is-on .brand-switch__knob {
	left: calc(100% - 1.12rem);
	background: #0b1406;
}

body.is-city-off .leaflet-marker-pane,
body.is-city-off .map-app__dock,
body.is-city-off .map-app__list {
	opacity: 0.22;
	filter: grayscale(0.7);
	pointer-events: none;
	transition: opacity 280ms ease, filter 280ms ease;
}

/* -------------------------------------------------------------------------
   Map app shell + Leaflet map container
   ------------------------------------------------------------------------- */

body.admin-bar.city-on-map-home {
	overflow: hidden;
}

body.admin-bar.city-on-map-home .site--map-home,
body.admin-bar.city-on-map-home .map-app {
	height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
	height: calc(100dvh - var(--wp-admin--admin-bar--height, 32px));
}

.map-app {
	position: relative;
	isolation: isolate;
	width: 100%;
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
	color: var(--co-text);
	background: var(--co-bg);
}

.city-on-map {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	background: #0a1220;
}

.city-on-map .leaflet-container {
	width: 100%;
	height: 100%;
	background: #0a1220;
	font: inherit;
}

/* Dark premium look without a keyed basemap provider (legacy; MapTiler dark style is preferred) */
.city-on-map[data-dark-tiles="css"] .leaflet-tile-pane {
	filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.92) saturate(0.55);
}

/* Dev warning when MapTiler key is missing — no OSM fallback */
.city-on-map-warning {
	position: absolute;
	z-index: 500;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	padding: 1.25rem;
	text-align: center;
	pointer-events: none;
	background: rgba(8, 12, 22, 0.72);
}

.city-on-map-warning__title {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 650;
	letter-spacing: 0.02em;
	color: var(--co-accent);
}

.city-on-map-warning__text {
	margin: 0;
	max-width: 18rem;
	font-size: 0.78rem;
	line-height: 1.45;
	color: var(--co-muted);
}

.city-on-divicon {
	background: transparent;
	border: 0;
}

.leaflet-top.leaflet-right {
	top: calc(4.4rem + var(--co-safe-top));
	right: 0.55rem;
}

.leaflet-control-zoom a {
	width: 2rem !important;
	height: 2rem !important;
	line-height: 2rem !important;
	background: rgba(18, 26, 42, 0.92) !important;
	color: var(--co-text) !important;
	border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

.leaflet-bar {
	border: 1px solid rgba(255, 255, 255, 0.12) !important;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35) !important;
	border-radius: 0.65rem !important;
	overflow: hidden;
}

.leaflet-control-attribution {
	max-width: calc(100vw - 1.2rem);
	margin: 0 0 calc(7.35rem + var(--co-safe-bottom)) 0.45rem !important;
	padding: 0.2rem 0.45rem !important;
	border-radius: 0.4rem;
	background: rgba(10, 16, 28, 0.88) !important;
	color: rgba(255, 255, 255, 0.52) !important;
	font-size: 0.58rem !important;
	line-height: 1.3 !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.leaflet-control-attribution a {
	color: var(--co-accent) !important;
}

.map-app.is-list-view .city-on-map .leaflet-tile-pane {
	filter: saturate(0.7) brightness(0.68);
}

/* Legacy stylized SVG map removed — keep selectors inert if present */
.map-app__canvas,
.cairo-map {
	display: none;
}


/* -------------------------------------------------------------------------
   Overlay header
   ------------------------------------------------------------------------- */

.map-app__header {
	position: absolute;
	z-index: 20;
	top: 0;
	left: 0;
	right: 0;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.55rem;
	padding:
		calc(0.7rem + var(--co-safe-top))
		0.85rem
		0.55rem;
	background: linear-gradient(to bottom, rgba(10, 16, 28, 0.9) 0%, rgba(10, 16, 28, 0.45) 70%, transparent 100%);
}

.map-app__brand {
	min-width: 0;
}

.map-app__header-actions {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding-top: 0.05rem;
}

.city-selector-wrap {
	position: relative;
}

.city-selector {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	max-width: 9.5rem;
	padding: 0.38rem 0.62rem;
	border-radius: 999px;
	background: rgba(18, 26, 42, 0.82);
	border: 1px solid var(--co-line);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.city-selector__pin {
	width: 0.4rem;
	height: 0.4rem;
	border-radius: 50%;
	background: var(--co-accent);
	box-shadow: 0 0 0 2px var(--co-accent-soft);
}

.city-selector__label {
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.city-selector__caret {
	width: 0.36rem;
	height: 0.36rem;
	border-right: 1.5px solid rgba(255, 255, 255, 0.65);
	border-bottom: 1.5px solid rgba(255, 255, 255, 0.65);
	transform: translateY(-12%) rotate(45deg);
}

.city-selector__menu {
	position: absolute;
	top: calc(100% + 0.35rem);
	right: 0;
	z-index: 40;
	min-width: 8.75rem;
	margin: 0;
	padding: 0.3rem;
	list-style: none;
	border-radius: 0.8rem;
	background: rgba(18, 26, 42, 0.94);
	border: 1px solid var(--co-line);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.city-selector__menu[hidden] {
	display: none;
}

.city-selector__menu a {
	display: block;
	padding: 0.5rem 0.7rem;
	border-radius: 0.55rem;
	font-size: 0.78rem;
	font-weight: 600;
}

.city-selector__menu a[aria-current='true'],
.city-selector__menu a:hover,
.city-selector__menu a:focus-visible {
	background: rgba(182, 255, 59, 0.16);
	color: var(--co-accent);
}

.menu-toggle {
	display: grid;
	gap: 0.24rem;
	place-content: center;
	width: 2.3rem;
	height: 2.3rem;
	border-radius: 999px;
	background: rgba(18, 26, 42, 0.82);
	border: 1px solid var(--co-line);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.menu-toggle__bar {
	display: block;
	width: 0.9rem;
	height: 1.5px;
	margin-inline: auto;
	border-radius: 999px;
	background: var(--co-text);
	transition: transform 200ms ease, opacity 200ms ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
	transform: translateY(0.3rem) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
	opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
	transform: translateY(-0.3rem) rotate(-45deg);
}

.map-app__menu {
	position: absolute;
	z-index: 25;
	top: calc(4.1rem + var(--co-safe-top));
	right: 0.85rem;
	width: min(15rem, calc(100% - 1.7rem));
	padding: 0.9rem;
	border-radius: var(--co-radius-md);
	background: var(--co-surface-solid);
	border: 1px solid var(--co-line);
	box-shadow: var(--co-shadow);
}

.map-app__menu[hidden] {
	display: none;
}

.map-app__menu-note {
	margin: 0;
	font-size: 0.82rem;
	color: var(--co-muted);
}

/* -------------------------------------------------------------------------
   Markers + clusters
   ------------------------------------------------------------------------- */

.map-app__markers {
	position: absolute;
	inset: 0;
	z-index: 10;
	pointer-events: none;
	transition: opacity 280ms ease, filter 280ms ease;
}

.map-marker,
.map-cluster {
	position: relative;
	pointer-events: auto;
	padding: 0;
	transform: none;
	transition: transform 180ms ease;
}

.map-marker {
	display: grid;
	place-items: center;
	width: 1.7rem;
	height: 1.7rem;
}

.map-marker.is-active {
	transform: scale(1.12);
	z-index: 3;
}

.map-marker__pulse {
	position: absolute;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.2;
	animation: co-pulse 2.6s ease-out infinite;
}

.map-marker__pin {
	position: relative;
	display: grid;
	place-items: center;
	width: 1.7rem;
	height: 1.7rem;
	border-radius: 50%;
	background: currentColor;
	border: 2px solid rgba(10, 16, 28, 0.92);
	box-shadow:
		0 6px 14px rgba(0, 0, 0, 0.4),
		0 0 0 3px color-mix(in srgb, currentColor 28%, transparent);
}

.map-marker__icon {
	display: grid;
	place-items: center;
	width: 0.95rem;
	height: 0.95rem;
	color: #0a101c;
}

.map-marker__icon svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
}

.map-marker--music { color: var(--co-music); }
.map-marker--electronic { color: var(--co-electronic); }
.map-marker--sport { color: var(--co-sport); }
.map-marker--theatre { color: var(--co-theatre); }
.map-marker--art { color: var(--co-art); }
.map-marker--cinema { color: var(--co-cinema); }
.map-marker--food { color: var(--co-food); }
.map-marker--family { color: var(--co-family); }
.map-marker--talks { color: var(--co-talks); }
.map-marker--other { color: rgba(255, 255, 255, 0.72); }

.map-cluster {
	z-index: 2;
	display: grid;
	place-items: center;
	width: 2.15rem;
	height: 2.15rem;
	border-radius: 50%;
	background: rgba(16, 24, 40, 0.92);
	border: 2px solid var(--co-accent);
	box-shadow:
		0 8px 18px rgba(0, 0, 0, 0.4),
		0 0 0 4px var(--co-accent-soft);
}

.map-cluster__count {
	font-family: var(--co-font-brand);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--co-accent);
	line-height: 1;
}

@keyframes co-pulse {
	0% {
		transform: scale(0.55);
		opacity: 0.35;
	}
	70% {
		transform: scale(1.45);
		opacity: 0;
	}
	100% {
		transform: scale(1.45);
		opacity: 0;
	}
}

/* -------------------------------------------------------------------------
   Bottom dock — WHEN / WHAT primary, Carte/Liste secondary
   ------------------------------------------------------------------------- */

.map-app__dock {
	position: absolute;
	z-index: 20;
	left: 0;
	right: 0;
	bottom: 0;
	display: grid;
	gap: 0.55rem;
	justify-items: center;
	padding:
		0.5rem
		0.85rem
		calc(0.85rem + var(--co-safe-bottom));
	background: linear-gradient(to top, rgba(10, 16, 28, 0.94) 0%, rgba(10, 16, 28, 0.55) 62%, transparent 100%);
	transition: opacity 280ms ease, filter 280ms ease;
}

.view-switch {
	display: inline-grid;
	grid-template-columns: 1fr 1fr;
	width: auto;
	min-width: 7.2rem;
	padding: 0.12rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.view-switch__btn {
	padding: 0.28rem 0.55rem;
	border-radius: 999px;
	font-size: 0.65rem;
	font-weight: 650;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--co-muted);
	transition: background 180ms ease, color 180ms ease;
}

.view-switch__btn.is-active {
	background: rgba(182, 255, 59, 0.92);
	color: #0b1406;
}

.filter-pills {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.55rem;
	width: 100%;
}

.filter-pill {
	display: grid;
	gap: 0.08rem;
	justify-items: start;
	min-height: 3.35rem;
	padding: 0.65rem 0.9rem;
	border-radius: 1.1rem;
	background: rgba(18, 26, 42, 0.9);
	border: 1px solid rgba(255, 255, 255, 0.14);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
	text-align: left;
	transition: border-color 180ms ease, transform 180ms ease;
}

.filter-pill:active {
	transform: translateY(1px);
}

.filter-pill.is-open,
.filter-pill[aria-expanded="true"] {
	border-color: rgba(182, 255, 59, 0.5);
}

.filter-pill__key {
	font-family: var(--co-font-brand);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	color: var(--co-accent);
}

.filter-pill__value {
	font-size: 0.86rem;
	font-weight: 560;
	color: var(--co-text);
}

/* -------------------------------------------------------------------------
   List panel
   ------------------------------------------------------------------------- */

.map-app__list {
	position: absolute;
	z-index: 15;
	left: 0;
	right: 0;
	top: calc(4.5rem + var(--co-safe-top));
	bottom: calc(7.1rem + var(--co-safe-bottom));
	padding: 0 0.85rem;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

.map-app__list[hidden] {
	display: none;
}

.event-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.55rem;
}

.event-list__item {
	display: grid;
	gap: 0.2rem;
	width: 100%;
	padding: 0.8rem 0.9rem;
	border-radius: var(--co-radius-md);
	background: rgba(18, 26, 42, 0.9);
	border: 1px solid var(--co-line);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	text-align: left;
	box-shadow: var(--co-shadow);
}

.event-list__category {
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.event-list__category--music { color: var(--co-music); }
.event-list__category--electronic { color: var(--co-electronic); }
.event-list__category--sport { color: var(--co-sport); }
.event-list__category--theatre { color: var(--co-theatre); }
.event-list__category--art { color: var(--co-art); }
.event-list__category--cinema { color: var(--co-cinema); }
.event-list__category--food { color: var(--co-food); }
.event-list__category--family { color: var(--co-family); }
.event-list__category--talks { color: var(--co-talks); }
.event-list__category--other { color: var(--co-muted); }

.event-list__title {
	font-size: 0.95rem;
	font-weight: 650;
}

.event-list__meta {
	font-size: 0.76rem;
	color: var(--co-muted);
}

.map-app.is-list-view .leaflet-marker-pane,
.map-app.is-list-view .marker-cluster {
	opacity: 0;
	pointer-events: none;
}

/* Leaflet.markercluster — prefer CITY ON cluster chrome */
.marker-cluster {
	background: transparent !important;
}

.marker-cluster div {
	background: transparent !important;
	margin: 0 !important;
	width: auto !important;
	height: auto !important;
}

.leaflet-cluster-anim .leaflet-marker-icon,
.leaflet-cluster-anim .leaflet-marker-shadow {
	transition: transform 0.22s ease-out, opacity 0.22s ease-in;
}


/* -------------------------------------------------------------------------
   Filter sheets (WHEN / WHAT)
   ------------------------------------------------------------------------- */

.filter-sheet,
.event-sheet {
	position: absolute;
	inset: 0;
	z-index: 40;
	overflow: hidden;
}

.filter-sheet[hidden],
.event-sheet[hidden] {
	display: none;
}

.filter-sheet__backdrop,
.event-sheet__backdrop {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: rgba(4, 8, 16, 0.42);
	opacity: 0;
	transition: opacity 220ms ease;
}

/*
 * Invisible backdrop must not steal the opening tap. Until .is-open the
 * panel is still off-screen; a full-screen button would eat that click.
 */
.filter-sheet__backdrop,
.event-sheet__backdrop,
.route-sheet__backdrop {
	pointer-events: none;
}

.filter-sheet.is-open .filter-sheet__backdrop,
.event-sheet.is-open .event-sheet__backdrop,
.route-sheet.is-open .route-sheet__backdrop {
	pointer-events: auto;
}

/* Filter chrome stays above Leaflet panes; map stays pannable when closed. */
.map-app__dock,
.map-app__header {
	touch-action: manipulation;
}

.map-app[data-filter-open] .city-on-map {
	pointer-events: none;
}

.filter-sheet.is-open .filter-sheet__backdrop,
.event-sheet.is-open .event-sheet__backdrop {
	opacity: 1;
}

.filter-sheet__panel,
.event-sheet__panel {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	border-radius: 1.25rem 1.25rem 0 0;
	background: linear-gradient(180deg, #1a2438 0%, #121a2b 100%);
	border: 1px solid var(--co-line);
	border-bottom: 0;
	box-shadow: 0 -18px 46px rgba(0, 0, 0, 0.45);
	transform: translateY(110%);
	transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.filter-sheet.is-open .filter-sheet__panel,
.event-sheet.is-open .event-sheet__panel {
	transform: translateY(0);
}

.filter-sheet__panel {
	padding: 0.5rem 0.95rem calc(1rem + var(--co-safe-bottom));
	max-height: 48%;
}

.filter-sheet__panel--categories {
	max-height: 56%;
}

.event-sheet__panel {
	display: flex;
	flex-direction: column;
	height: auto;
	max-height: 80vh;
	max-height: 80dvh;
	min-height: 0;
	padding: 0.45rem 1rem 0;
	overflow: hidden;
	overscroll-behavior: contain;
	z-index: 1;
	pointer-events: auto;
}

.filter-sheet__handle,
.event-sheet__handle {
	width: 2.2rem;
	height: 0.26rem;
	margin: 0.1rem auto 0.65rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.22);
	flex: 0 0 auto;
}

.filter-sheet__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.55rem;
}

.filter-sheet__title {
	margin: 0;
	font-family: var(--co-font-brand);
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.filter-sheet__close,
.event-sheet__close {
	width: 1.85rem;
	height: 1.85rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--co-line);
	font-size: 1.1rem;
	line-height: 1;
	color: var(--co-muted);
}

.event-sheet__close {
	position: absolute;
	top: 0.7rem;
	right: 0.75rem;
	z-index: 4;
}

.filter-sheet__options {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.4rem;
	overflow: auto;
	max-height: calc(48vh - 5rem);
}

.filter-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0.85rem 0.95rem;
	border-radius: 0.9rem;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	text-align: left;
	font-size: 0.95rem;
	font-weight: 560;
	transition: border-color 160ms ease, background 160ms ease;
}

.filter-option.is-selected,
.filter-option:hover {
	border-color: rgba(182, 255, 59, 0.4);
	background: rgba(182, 255, 59, 0.08);
}

.category-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.45rem;
	overflow: auto;
	max-height: calc(56vh - 5rem);
}

.category-chip {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	width: 100%;
	min-height: 2.75rem;
	padding: 0.55rem 0.65rem;
	border-radius: 0.9rem;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	text-align: left;
	font-size: 0.78rem;
	font-weight: 560;
	line-height: 1.2;
}

.category-chip.is-active {
	border-color: rgba(182, 255, 59, 0.45);
	background: rgba(182, 255, 59, 0.1);
}

.category-chip__dot {
	flex: 0 0 auto;
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
	background: var(--co-accent);
}

.category-chip__dot--all { background: var(--co-accent); }
.category-chip__dot--music { background: var(--co-music); }
.category-chip__dot--electronic { background: var(--co-electronic); }
.category-chip__dot--sport { background: var(--co-sport); }
.category-chip__dot--theatre { background: var(--co-theatre); }
.category-chip__dot--art { background: var(--co-art); }
.category-chip__dot--cinema { background: var(--co-cinema); }
.category-chip__dot--food { background: var(--co-food); }
.category-chip__dot--family { background: var(--co-family); }
.category-chip__dot--talks { background: var(--co-talks); }
.category-chip__dot--other { background: rgba(255, 255, 255, 0.42); }

.category-chip__count {
	margin-left: auto;
	font-size: 0.68rem;
	font-weight: 650;
	color: var(--co-muted);
}

.filter-sheet__toolbar {
	display: flex;
	gap: 0.75rem;
	margin: 0 0 0.55rem;
}

.filter-sheet__text-btn {
	padding: 0;
	font-size: 0.78rem;
	font-weight: 650;
	letter-spacing: 0.04em;
	color: var(--co-accent);
}

.filter-status {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	width: 100%;
	min-height: 1.1rem;
	padding: 0 0.15rem;
}

.filter-results {
	margin: 0;
	font-size: 0.78rem;
	font-weight: 560;
	color: var(--co-muted);
}

.filter-reset {
	padding: 0;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--co-accent);
	pointer-events: auto;
}

.filter-pill.is-filtered {
	border-color: rgba(182, 255, 59, 0.55);
	box-shadow: 0 0 0 1px rgba(182, 255, 59, 0.18);
}

.filter-calendar {
	margin-top: 0.65rem;
	padding: 0.7rem 0.7rem 0.85rem;
	border-radius: 0.9rem;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-calendar__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.45rem;
}

.filter-calendar__month {
	margin: 0;
	font-size: 0.82rem;
	font-weight: 650;
	text-transform: capitalize;
}

.filter-calendar__nav-btn {
	width: 1.85rem;
	height: 1.85rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.04);
	color: var(--co-text);
	font-size: 1.1rem;
	line-height: 1;
}

.filter-calendar__weekdays,
.filter-calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 0.2rem;
	text-align: center;
}

.filter-calendar__weekdays {
	margin-bottom: 0.25rem;
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--co-muted);
}

.filter-calendar__day {
	min-height: 1.85rem;
	border-radius: 0.45rem;
	border: 0;
	background: transparent;
	color: var(--co-text);
	font-size: 0.78rem;
}

.filter-calendar__day.is-empty {
	visibility: hidden;
}

.filter-calendar__day.is-today {
	box-shadow: inset 0 0 0 1px rgba(182, 255, 59, 0.45);
}

.filter-calendar__day.is-selected,
.filter-calendar__day:hover {
	background: rgba(182, 255, 59, 0.16);
	color: var(--co-accent);
}

.filter-sheet__panel:has([data-when-calendar]:not([hidden])) {
	max-height: 72%;
}

@media (max-width: 767px) {
	/*
	 * .map-app / .site--map-home used height:100vh + overflow:hidden.
	 * 100vh is often taller than the visible mobile viewport, so the
	 * absolutely positioned dock (WHEN / WHAT) was clipped below the fold.
	 * Size the shell to the dynamic viewport and pin the dock to it.
	 */
	html,
	body.city-on-map-home {
		height: 100%;
		height: 100dvh;
		max-height: 100dvh;
		overflow: hidden;
	}

	.site--map-home,
	.site-main--map,
	.map-app {
		height: 100%;
		height: 100dvh;
		max-height: 100dvh;
	}

	.map-app__header {
		z-index: 1100;
	}

	.map-app__dock {
		position: fixed;
		left: 16px;
		right: 16px;
		bottom: calc(16px + env(safe-area-inset-bottom, 0px));
		z-index: 1100;
		width: auto;
		transform: none;
		padding: 0.45rem 0 0;
	}

	.filter-sheet,
	.event-sheet,
	.route-sheet {
		position: fixed;
		inset: 0;
		z-index: 1200;
		transform: none;
	}

	.route-sheet {
		z-index: 1300;
	}

	.filter-sheet__panel {
		display: flex;
		flex-direction: column;
		max-height: min(72dvh, calc(100% - 4.5rem));
		overflow: hidden;
	}

	.filter-sheet__panel--categories {
		max-height: min(78dvh, calc(100% - 4.5rem));
	}

	.filter-sheet__panel:has([data-when-calendar]:not([hidden])) {
		max-height: min(82dvh, calc(100% - 3.5rem));
	}

	.filter-sheet__options,
	.filter-sheet .category-grid {
		flex: 1 1 auto;
		min-height: 0;
		max-height: none;
		overflow: auto;
		-webkit-overflow-scrolling: touch;
	}

	.filter-pill,
	.filter-option,
	.category-chip,
	.filter-sheet__close,
	.filter-sheet__text-btn,
	.event-sheet__route,
	.event-sheet__nav,
	.event-sheet__tickets,
	.route-sheet__option,
	.route-sheet__cancel {
		touch-action: manipulation;
	}
}

.map-app__empty[data-filter-empty] {
	pointer-events: auto;
	z-index: 19;
}

.map-app__empty .filter-reset {
	margin-top: 0.65rem;
}

/* -------------------------------------------------------------------------
   Event bottom sheet (~35–40%)
   ------------------------------------------------------------------------- */

.event-sheet__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding-right: 0.15rem;
}

.event-sheet__category {
	margin: 0 0 0.25rem;
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--co-accent);
}

.event-sheet__title {
	margin: 0 2rem 0.45rem 0;
	font-family: var(--co-font-brand);
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.15;
}

.event-sheet__description {
	margin: 0 0 0.65rem;
	font-size: 0.82rem;
	line-height: 1.4;
	color: var(--co-muted);
}

.event-sheet__recurrence {
	display: block;
	margin-top: 0.15rem;
}

.event-sheet__recurrence[hidden] {
	display: none !important;
}

.event-sheet__tickets[hidden] {
	display: none !important;
}

.event-sheet__actions {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0.45rem;
	flex: 0 0 auto;
	width: 100%;
	position: relative;
	z-index: 3;
	margin-top: 0.15rem;
	padding: 0.55rem 0 calc(0.95rem + var(--co-safe-bottom));
	background: linear-gradient(180deg, rgba(18, 26, 42, 0) 0%, #121a2b 0.45rem);
}

.event-sheet__actions[hidden] {
	display: none !important;
}

.event-sheet__route[hidden],
.event-sheet__nav[hidden] {
	display: none !important;
}

.map-app__empty {
	position: absolute;
	z-index: 18;
	left: 50%;
	top: 42%;
	transform: translate(-50%, -50%);
	width: min(18rem, calc(100% - 2rem));
	padding: 1rem 1.1rem;
	border-radius: var(--co-radius-md);
	background: rgba(18, 26, 42, 0.92);
	border: 1px solid var(--co-line);
	box-shadow: var(--co-shadow);
	text-align: center;
	pointer-events: none;
}

.map-app__empty-title {
	margin: 0 0 0.35rem;
	font-family: var(--co-font-brand);
	font-size: 0.95rem;
	font-weight: 700;
}

.map-app__empty-text,
.event-list__empty {
	margin: 0;
	font-size: 0.82rem;
	color: var(--co-muted);
}

.event-list__empty {
	padding: 1rem;
	text-align: center;
}

.event-sheet__meta {
	display: grid;
	gap: 0.35rem;
	margin: 0 0 0.35rem;
}

.event-sheet__meta div {
	display: grid;
	grid-template-columns: 3.6rem 1fr;
	gap: 0.4rem;
	align-items: baseline;
}

.event-sheet__meta dt {
	margin: 0;
	font-size: 0.66rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--co-muted);
}

.event-sheet__meta dd {
	margin: 0;
	font-size: 0.88rem;
	font-weight: 560;
}

.event-sheet__tickets {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 8rem;
	width: auto;
	min-width: 0;
	min-height: 2.7rem;
	padding-inline: 0.85rem;
	border-radius: 999px;
	background: var(--co-accent);
	color: #0b1406;
	font-family: var(--co-font-brand);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	pointer-events: auto;
	position: relative;
	z-index: 2;
	box-shadow: 0 0 0 3px var(--co-accent-soft);
	transition: transform 160ms ease, filter 160ms ease;
}

.event-sheet__tickets:hover,
.event-sheet__tickets:focus-visible {
	filter: brightness(1.05);
}

.event-sheet__tickets:active {
	transform: scale(0.985);
}

.event-sheet__route,
.event-sheet__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 7rem;
	width: auto;
	min-width: 0;
	min-height: 2.7rem;
	padding-inline: 0.75rem;
	border: 1px solid rgba(182, 255, 59, 0.45);
	border-radius: 999px;
	background: transparent;
	color: var(--co-accent);
	font-family: var(--co-font-brand);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	pointer-events: auto;
	transition: background 160ms ease, border-color 160ms ease;
}

.event-sheet__nav {
	display: none;
}

.event-sheet__route {
	transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.event-sheet__route:hover,
.event-sheet__route:focus-visible,
.event-sheet__nav:hover,
.event-sheet__nav:focus-visible {
	background: var(--co-accent-soft);
	border-color: var(--co-accent);
}

.event-sheet__route:active {
	transform: scale(0.985);
}

.event-sheet__route[aria-expanded='true'] {
	background: var(--co-accent-soft);
}

@media (max-width: 360px) {
	.event-sheet__actions {
		flex-direction: column;
	}

	.event-sheet__tickets,
	.event-sheet__route,
	.event-sheet__nav {
		flex: 1 1 auto;
		width: 100%;
	}
}

/*
 * Mobile event sheet: two sibling boxes that do not overlap.
 * The backdrop fills only the space above the panel, so it cannot sit
 * on the action row. The open panel is not a transformed layer.
 */
@media (max-width: 767px) {
	.event-sheet {
		display: flex;
		flex-direction: column;
		position: fixed;
		inset: 0;
		z-index: 1200;
		overflow: hidden;
		transform: none;
	}

	.event-sheet__backdrop {
		position: relative;
		inset: auto;
		flex: 1 1 auto;
		align-self: stretch;
		width: 100%;
		min-height: 2.5rem;
		height: auto;
		margin: 0;
		padding: 0;
		border: 0;
		z-index: 1;
	}

	.event-sheet__panel {
		position: relative;
		left: auto;
		right: auto;
		bottom: auto;
		flex: 0 1 auto;
		width: 100%;
		z-index: 2;
	}

	.event-sheet.is-open .event-sheet__panel {
		transform: none;
	}

	.event-sheet__body {
		pointer-events: auto;
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: auto;
	}

	.event-sheet__actions {
		position: relative;
		z-index: 3;
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 0.35rem;
		flex: 0 0 auto;
		pointer-events: auto;
	}

	.event-sheet__tickets {
		grid-column: 1 / -1;
	}

	.event-sheet__route {
		display: none !important;
	}

	.event-sheet__nav:not([hidden]) {
		display: flex;
		min-width: 0;
		font-size: 0.6rem;
		letter-spacing: 0.04em;
		padding-inline: 0.3rem;
		white-space: nowrap;
	}

	.event-sheet__nav:active {
		transform: none;
	}

	.route-sheet {
		display: none !important;
	}
}

/* -------------------------------------------------------------------------
   Route chooser (Google Maps / Waze)
   ------------------------------------------------------------------------- */

.route-sheet {
	position: absolute;
	inset: 0;
	z-index: 50;
}

.route-sheet[hidden] {
	display: none;
}

.route-sheet__backdrop {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: rgba(4, 8, 16, 0.5);
	opacity: 0;
	transition: opacity 220ms ease;
	border: 0;
	padding: 0;
	cursor: pointer;
}

.route-sheet.is-open .route-sheet__backdrop {
	opacity: 1;
}

.route-sheet__panel {
	position: absolute;
	left: 0.55rem;
	right: 0.55rem;
	bottom: calc(0.55rem + var(--co-safe-bottom));
	padding: 0.45rem 0.75rem 0.75rem;
	border-radius: var(--co-radius-lg);
	background: var(--co-surface-solid);
	border: 1px solid var(--co-line);
	box-shadow: var(--co-shadow);
	transform: translateY(110%);
	transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	z-index: 1;
	pointer-events: auto;
}

.route-sheet.is-open .route-sheet__panel {
	transform: translateY(0);
}

.route-sheet__handle {
	width: 2rem;
	height: 0.24rem;
	margin: 0.05rem auto 0.35rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.22);
}

.route-sheet__title {
	margin: 0 0 0.2rem;
	text-align: center;
	font-family: var(--co-font-brand);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--co-muted);
}

.route-sheet__option {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 2.55rem;
	border-radius: var(--co-radius-md);
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--co-line);
	color: var(--co-text);
	font-family: var(--co-font-brand);
	font-size: 0.92rem;
	font-weight: 650;
	letter-spacing: 0.02em;
	text-decoration: none;
	transition: background 160ms ease, border-color 160ms ease;
}

.route-sheet__option[hidden] {
	display: none !important;
}

.route-sheet__option:hover,
.route-sheet__option:focus-visible {
	background: var(--co-accent-soft);
	border-color: rgba(182, 255, 59, 0.4);
	color: var(--co-accent);
}

.route-sheet__cancel {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 2.3rem;
	margin-top: 0.1rem;
	border: 0;
	border-radius: var(--co-radius-md);
	background: transparent;
	color: var(--co-muted);
	font-size: 0.82rem;
	font-weight: 560;
	cursor: pointer;
}

.route-sheet__cancel:hover,
.route-sheet__cancel:focus-visible {
	color: var(--co-text);
}

/* -------------------------------------------------------------------------
   Interior pages
   ------------------------------------------------------------------------- */

.site-header__inner,
.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 1rem;
}

.site-header,
.site-footer {
	background: var(--co-navy);
	border-bottom: 1px solid var(--co-line);
}

.site-footer {
	border-bottom: 0;
	border-top: 1px solid var(--co-line);
}

.entry-header {
	margin-block: 1.5rem 0.75rem;
}

.entry-content {
	margin-block-end: 2rem;
}

.no-results {
	padding-block: 2rem;
}

/* -------------------------------------------------------------------------
   Desktop preparation
   ------------------------------------------------------------------------- */

@media (min-width: 768px) {
	.map-app__header {
		padding-inline: 1.35rem;
	}

	.map-app__dock {
		position: fixed;
		left: 50%;
		right: auto;
		bottom: 72px;
		width: min(26rem, calc(100% - 3rem));
		transform: translateX(-50%);
		padding-inline: 0;
		padding-bottom: 0;
		background: transparent;
		z-index: 30;
	}

	.view-switch,
	.filter-pill {
		background: rgba(18, 26, 42, 0.92);
		box-shadow: var(--co-shadow);
	}

	.map-app__list {
		left: 50%;
		width: min(26rem, calc(100% - 3rem));
		transform: translateX(-50%);
		padding-inline: 0;
	}

	.filter-sheet__panel,
	.filter-sheet__panel--categories,
	.filter-sheet__panel:has([data-when-calendar]:not([hidden])) {
		left: 50%;
		right: auto;
		top: 46%;
		bottom: auto;
		display: flex;
		flex-direction: column;
		width: min(26rem, calc(100% - 2rem));
		max-height: calc(92dvh - 48px);
		margin-bottom: 0;
		overflow: hidden;
		transform: translate(-50%, calc(-50% + 100dvh));
		border-radius: var(--co-radius-lg);
		border-bottom: 1px solid var(--co-line);
	}

	.filter-sheet.is-open .filter-sheet__panel {
		transform: translate(-50%, -50%);
	}

	.filter-sheet__options,
	.filter-sheet .category-grid {
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
		max-height: calc(100dvh - 120px);
	}

	/*
	 * Desktop (≥768px) event card — floating overlay, not a bottom sheet.
	 * position:fixed is relative to the visual viewport so Windows/browser
	 * chrome and WP admin-bar page offset cannot push CTAs off-screen.
	 * overflow:visible on .map-app so the card is not clipped by the map shell.
	 */
	.map-app {
		overflow: visible;
	}

	.event-sheet {
		position: fixed;
		inset: 0;
		z-index: 60;
		overflow: visible;
		pointer-events: none;
	}

	.event-sheet.is-open {
		pointer-events: auto;
	}

	.event-sheet__backdrop {
		background: rgba(4, 8, 16, 0.22);
	}

	.event-sheet__handle {
		display: none;
	}

	.event-sheet__close {
		position: absolute;
		top: 0.7rem;
		right: 0.75rem;
		z-index: 5;
	}

	.event-sheet__panel {
		position: fixed;
		left: auto;
		right: 24px;
		bottom: 80px;
		top: auto;
		display: flex;
		flex-direction: column;
		width: min(420px, calc(100vw - 48px));
		min-width: min(380px, calc(100vw - 48px));
		max-width: 440px;
		margin: 0;
		height: auto;
		max-height: calc(100vh - 120px);
		max-height: calc(100dvh - 120px);
		min-height: 0;
		padding: 0.7rem 1rem 0;
		overflow: hidden;
		border-radius: var(--co-radius-lg);
		border-bottom: 1px solid var(--co-line);
		box-shadow: var(--co-shadow);
		transform: translateY(14px);
		opacity: 0;
		pointer-events: auto;
	}

	.event-sheet.is-open .event-sheet__panel {
		transform: none;
		opacity: 1;
	}

	body.admin-bar .event-sheet__panel {
		max-height: calc(100vh - 120px - var(--wp-admin--admin-bar--height, 32px));
		max-height: calc(100dvh - 120px - var(--wp-admin--admin-bar--height, 32px));
	}

	.event-sheet__body {
		flex: 1 1 auto;
		min-height: 0;
		overflow-x: hidden;
		overflow-y: auto;
	}

	.event-sheet__actions {
		position: sticky;
		bottom: 0;
		z-index: 3;
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		flex: 0 0 auto;
		margin-top: auto;
		padding-bottom: 0.85rem;
	}

	.event-sheet__nav {
		display: none !important;
	}

	/*
	 * The open event sheet is z-index 60 and covers the viewport.
	 * The chooser must sit above it or provider clicks hit that backdrop.
	 */
	.route-sheet {
		z-index: 80;
	}

	.route-sheet__panel {
		left: 50%;
		right: auto;
		width: min(18rem, calc(100% - 2.5rem));
		bottom: auto;
		top: 50%;
		transform: translate(-50%, calc(-50% + 1.25rem)) scale(0.96);
		opacity: 0;
		pointer-events: none;
		transition:
			transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
			opacity 180ms ease;
		box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
	}

	.route-sheet.is-open .route-sheet__panel {
		transform: translate(-50%, -50%) scale(1);
		opacity: 1;
		pointer-events: auto;
	}

	.route-sheet__handle {
		display: none;
	}

	.brand-logo__tagline {
		max-width: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
