/* Outside Adventures — adventure map styles. Enqueued only on pages that
   render a Leaflet map (uk-adventure-map and the activity hubs).
   Versioned via filename; bump v1 → v2 etc. on each meaningful change. */

/* ---------- Container layout ------------------------------------------- */

.oa-leaflet-map {
	background: var(--paper);
	border-radius: 12px;
	overflow: hidden;
	position: relative;
	box-shadow: 0 1px 0 rgba(19,19,19,.04), 0 8px 24px -16px rgba(19,19,19,.18);
}

.oa-map-canvas-wrap {
	position: relative;
}

.oa-map-canvas {
	width: 100%;
	height: 560px;
	background: #DCE7F0;
}

@media (max-width: 820px) {
	.oa-map-canvas { height: 460px; }
}
@media (max-width: 540px) {
	.oa-map-canvas { height: 380px; }
}

/* Activity-hub variant — sits in the cat-layout right column, so it should
   fill that column rather than impose a hard 560px height. */
.cat-layout .map-col .oa-leaflet-map .oa-map-canvas {
	height: 100%;
	min-height: 460px;
}
.cat-layout .map-col .oa-leaflet-map {
	height: 100%;
	min-height: 460px;
	display: flex;
	flex-direction: column;
}
.cat-layout .map-col .oa-leaflet-map .oa-map-canvas-wrap {
	flex: 1 1 auto;
	min-height: 0;
}

/* ---------- Filter pills ----------------------------------------------- */

.oa-map-filters {
	padding: 14px 16px 4px;
	border-bottom: 1px solid rgba(19,19,19,.06);
	background: var(--paper);
}

.oa-map-filter-group + .oa-map-filter-group { margin-top: 10px; }

.oa-map-filter-label {
	font-family: 'JetBrains Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 6px;
}

.oa-map-filter-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding-bottom: 10px;
}

.oa-map-pill {
	font-family: 'Manrope', sans-serif;
	font-size: 13px;
	line-height: 1;
	padding: 7px 11px;
	border: 1px solid rgba(19,19,19,.18);
	background: transparent;
	color: var(--ink);
	border-radius: 999px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.oa-map-pill:hover {
	background: rgba(19,19,19,.05);
	border-color: rgba(19,19,19,.4);
}

.oa-map-pill.is-active {
	background: var(--ink);
	color: var(--cream);
	border-color: var(--ink);
}

.oa-map-pill-count {
	font-size: 11px;
	opacity: 0.6;
	font-variant-numeric: tabular-nums;
}

.oa-map-pill.is-active .oa-map-pill-count { opacity: 0.85; }

.oa-map-reset {
	font-family: 'JetBrains Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	background: transparent;
	border: 0;
	color: var(--muted);
	cursor: pointer;
	padding: 4px 0 8px;
	margin-top: 2px;
}
.oa-map-reset:hover { color: var(--ink); }

@media (max-width: 540px) {
	.oa-map-filters { padding: 12px 12px 2px; }
	.oa-map-filter-row { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
	.oa-map-filter-row::-webkit-scrollbar { display: none; }
	.oa-map-pill { white-space: nowrap; flex: 0 0 auto; }
}

/* ---------- Counter chip ----------------------------------------------- */

.oa-map-counter {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 800;
	background: var(--ink);
	color: var(--cream);
	font-family: 'JetBrains Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.04em;
	padding: 6px 10px;
	border-radius: 6px;
	font-variant-numeric: tabular-nums;
	pointer-events: none;
	box-shadow: 0 2px 8px rgba(19,19,19,.25);
}

.oa-map-counter.is-empty { background: var(--muted); }

/* ---------- Empty state ------------------------------------------------ */

.oa-map-empty {
	padding: 40px 24px;
	text-align: center;
	color: var(--muted);
	font-family: 'Manrope', sans-serif;
}

/* ---------- Pin (Leaflet divIcon) -------------------------------------- */

.oa-pin {
	background: transparent !important;
	border: 0 !important;
	filter: drop-shadow(0 2px 4px rgba(0,0,0,.25));
	transition: transform 0.15s;
}
.oa-pin:hover { transform: scale(1.1); transform-origin: 14px 36px; }

/* ---------- Popup ------------------------------------------------------ */

.leaflet-popup.oa-pop .leaflet-popup-content-wrapper {
	background: var(--paper);
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(19,19,19,.22), 0 2px 6px rgba(19,19,19,.08);
	padding: 0;
	overflow: hidden;
}

.leaflet-popup.oa-pop .leaflet-popup-content {
	margin: 0;
	width: 300px !important;
	font-family: 'Manrope', sans-serif;
	color: var(--ink);
}

.leaflet-popup.oa-pop .leaflet-popup-tip { background: var(--paper); }

.oa-pop-img {
	height: 140px;
	background-size: cover;
	background-position: center;
	background-color: #DCE7F0;
}

.oa-pop-body { padding: 14px 16px 16px; }

.oa-pop-chips {
	display: flex;
	gap: 6px;
	margin-bottom: 8px;
	flex-wrap: wrap;
}

.oa-pop-chip {
	font-family: 'JetBrains Mono', monospace;
	font-size: 10px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 3px 7px;
	border-radius: 4px;
	line-height: 1.2;
}

.oa-pop-chip-activity {
	background: var(--ink);
	color: var(--cream);
}

.oa-pop-chip-region {
	background: rgba(19,19,19,.08);
	color: var(--muted);
}

.oa-pop-title {
	font-family: 'Bricolage Grotesque', 'Manrope', serif;
	font-size: 18px;
	line-height: 1.18;
	margin: 0 0 6px;
	font-weight: 600;
}

.oa-pop-title a {
	color: var(--ink);
	text-decoration: none;
}
.oa-pop-title a:hover { color: var(--blue); }

.oa-pop-excerpt {
	font-size: 13px;
	line-height: 1.45;
	color: var(--muted);
	margin: 0 0 10px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.oa-pop-cta {
	display: inline-block;
	font-family: 'JetBrains Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--blue);
	text-decoration: none;
	padding-top: 2px;
	border-top: 1px solid rgba(19,19,19,.08);
	padding-top: 10px;
	width: 100%;
}
.oa-pop-cta:hover { color: var(--ink); }

/* ---------- Leaflet cluster styles (override defaults to match brand) -- */

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
	background: rgba(46,123,214,.32);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
	background: var(--blue);
	color: var(--cream);
	font-family: 'JetBrains Mono', monospace;
	font-weight: 600;
}

/* ---------- Adventure-map page (uk-adventure-map) ---------------------- */

/* The page hero stays as-is; the map section replaces the old SVG board. */

.ukmap-section .oa-leaflet-map {
	margin-top: 0;
}

/* Side rail of region links (legacy markup retained for SEO; tucked under
   the map on small viewports). */

.ukmap-sub {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: 24px;
	margin-top: 28px;
	align-items: start;
}

@media (max-width: 980px) {
	.ukmap-sub { grid-template-columns: 1fr; }
}

.ukmap-sub .ukmap-side {
	background: var(--paper);
	border-radius: 12px;
	padding: 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ukmap-sub .ukmap-region {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 10px 0;
	border-bottom: 1px solid rgba(19,19,19,.06);
	color: var(--ink);
	text-decoration: none;
}
.ukmap-sub .ukmap-region:last-child { border-bottom: 0; }
.ukmap-sub .ukmap-region h3 {
	font-family: 'Bricolage Grotesque', serif;
	font-size: 15px;
	font-weight: 600;
	margin: 0;
}
.ukmap-sub .ukmap-region .ct {
	font-family: 'JetBrains Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--muted);
}
.ukmap-sub .ukmap-region:hover { background: rgba(19,19,19,.03); }

/* ---------- Legacy region-pin map cleanup ------------------------------ */

/* When the Leaflet map renders on activity hubs, the old .map-card SVG block
   is no longer printed by the PHP template. No further CSS cleanup needed —
   this is just a marker comment for future code spelunking. */

/* ---------- Leaflet defaults overridden for legibility ---------------- */

.leaflet-container {
	font-family: 'Manrope', sans-serif !important;
}

.leaflet-control-attribution {
	font-size: 10px !important;
	background: rgba(251,247,238,.75) !important;
}

.leaflet-bar a,
.leaflet-bar a:hover {
	background: var(--paper);
	color: var(--ink);
	border-bottom-color: rgba(19,19,19,.1);
}


/* Keep Leaflet (panes z400 / controls z1000) beneath the fixed nav (z50): cap the map in its own stacking context */
.oa-map-canvas-wrap{position:relative;z-index:0;}
