/**
 * Heritage Journey Interactive Map – Geopark TT25
 * UNESCO-level Heritage Journey Experience UI.
 * Theme tokens only: earth-brown, desert-amber, fossil-light, stone-gray, steppe-green.
 */

/* Full-width page template */
.page-template-page-heritage-journey-full main .wp-block-group.alignfull,
.page-template-page-heritage-journey-full main .wp-block-post-content {
	max-width: none;
}
.page-template-page-heritage-journey-full main .wp-block-group.alignfull {
	padding-left: 0;
	padding-right: 0;
}

/* Section */
.heritage-journey-section {
	padding-left: 0;
	padding-right: 0;
	background: #fff;
}

/* Accent strip (reference: thin earthy color bands at top) */
.heritage-journey-accent-strip {
	display: flex;
	width: 100%;
	height: 8px;
	overflow: hidden;
}
.heritage-accent-band {
	display: block;
	flex: 1;
	height: 100%;
}
.heritage-accent-band--dark {
	background: var(--wp--preset--color--basalt-dark, #2B2B2B);
}
.heritage-accent-band--amber {
	background: var(--wp--preset--color--desert-amber, #C87A2A);
}
.heritage-accent-band--green {
	background: var(--wp--preset--color--steppe-green, #6F8F4E);
}

/* Heritage Hero Header (UNESCO institutional aesthetic) */
.heritage-journey-hero {
	background: linear-gradient(180deg, var(--wp--preset--color--fossil-light, #F7F3EC) 0%, #fff 100%);
}

.heritage-hero-inner {
	text-align: center;
	max-width: 900px;
	margin: 0 auto;
	position: relative;
}

.heritage-hero-compass {
	display: inline-block;
	margin-bottom: 0.5rem;
	color: var(--wp--preset--color--stone-gray, #8C8C8C);
	opacity: 0.8;
}

.heritage-hero-compass svg {
	display: block;
}

.heritage-hero-title {
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 600;
	color: var(--wp--preset--color--earth-brown, #5A2E12);
	margin: 0 0 0.5rem;
	line-height: 1.3;
}
.heritage-hero-title:first-of-type {
	margin-top: 0;
}

.heritage-hero-subtitle {
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--wp--preset--color--stone-gray, #8C8C8C);
	margin: 0;
	max-width: 42em;
	margin-left: auto;
	margin-right: auto;
}

/* Legacy intro (kept for backwards compat) */
.heritage-journey-intro { text-align: center; }
.heritage-journey-title-line { display: none; }
.heritage-journey-subtitle { display: none; }

/* Map: full width with padding, rounded corners (reference style) */
.heritage-journey-layout {
	position: relative;
	display: block;
	min-height: 75vh;
	padding-top: var(--wp--preset--spacing--40, 24px);
}

.heritage-journey-map-wrap {
	position: relative;
	width: 100%;
	min-height: 75vh;
	padding: 0 var(--wp--preset--spacing--40, 24px);
	padding-bottom: var(--wp--preset--spacing--40, 24px);
	max-width: 1600px;
	margin: 0 auto;
}
.heritage-map-container,
#heritage-journey-map {
	min-height: 75vh;
	width: 100%;
	background: var(--wp--preset--color--fossil-light, #F7F3EC);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(90, 46, 18, 0.08);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--earth-brown, #5A2E12) 12%, transparent);
}

#heritage-journey-map {
	position: relative;
}

/* Map legend (floating, bottom-left) */
.heritage-map-legend {
	position: absolute;
	bottom: 12px;
	left: 12px;
	z-index: 500;
	padding: 10px 14px;
	background: color-mix(in srgb, var(--wp--preset--color--fossil-light, #F7F3EC) 92%, rgba(255,255,255,0.9));
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--stone-gray, #8C8C8C) 35%, transparent);
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(90, 46, 18, 0.08);
	font-size: 0.75rem;
	color: var(--wp--preset--color--earth-brown, #5A2E12);
	line-height: 1.6;
}

.heritage-legend-item {
	display: flex;
	align-items: center;
	gap: 8px;
}

.heritage-legend-dot {
	display: inline-block;
	width: 14px;
	height: 10px;
	border-radius: 4px;
	flex-shrink: 0;
}

/* Map control buttons (top-right) */
.heritage-map-controls {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 500;
	display: flex;
	flex-direction: column;
	gap: 6px;
	pointer-events: none;
}

.heritage-map-controls .heritage-map-ctrl {
	pointer-events: auto;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--stone-gray, #8C8C8C) 50%, transparent);
	border-radius: 50%;
	color: var(--wp--preset--color--earth-brown, #5A2E12);
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
	box-shadow: 0 1px 3px rgba(90, 46, 18, 0.08);
}

.heritage-map-controls .heritage-map-ctrl:hover {
	background: var(--wp--preset--color--fossil-light, #F7F3EC);
	border-color: var(--wp--preset--color--earth-brown, #5A2E12);
}

.heritage-map-controls .heritage-map-ctrl:focus-visible {
	outline: 2px solid var(--wp--preset--color--earth-brown, #5A2E12);
	outline-offset: 2px;
}


/* Site list: slide-over drawer (right) */
.heritage-journey-list-wrap {
	position: fixed;
	top: 0;
	right: 0;
	width: 100%;
	max-width: 360px;
	height: 100vh;
	background: #fff;
	box-shadow: -4px 0 20px rgba(90, 46, 18, 0.12);
	display: flex;
	flex-direction: column;
	z-index: 1000;
	transform: translateX(100%);
	transition: transform 0.25s ease-out;
	overflow: hidden;
}
.heritage-journey-list-wrap.is-open {
	transform: translateX(0);
	aria-hidden: false;
}

.heritage-journey-list-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: var(--wp--preset--spacing--30, 20px);
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--stone-gray, #8C8C8C) 50%, transparent);
	flex-shrink: 0;
}

.heritage-list-header-content {
	flex: 1;
	min-width: 0;
}

.heritage-list-title-text {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--wp--preset--color--earth-brown, #5A2E12);
	display: block;
}

.heritage-list-subtext {
	font-size: 0.75rem;
	color: var(--wp--preset--color--stone-gray, #8C8C8C);
	margin: 4px 0 0;
	font-weight: 400;
}

.heritage-list-close {
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	color: var(--wp--preset--color--stone-gray, #8C8C8C);
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 4px;
	transition: color 0.2s, background 0.2s;
}
.heritage-list-close:hover {
	color: var(--wp--preset--color--earth-brown, #5A2E12);
	background: var(--wp--preset--color--fossil-light, #F7F3EC);
}

.heritage-journey-list-scroll {
	flex: 1;
	overflow-y: auto;
	padding: var(--wp--preset--spacing--20, 10px);
}

/* Loading skeleton (replaced by JS when data loads) */
.heritage-list-skeleton {
	animation: heritage-skeleton-fade 0.4s ease-out;
}

@keyframes heritage-skeleton-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

.heritage-skeleton-item {
	height: 72px;
	margin-bottom: 10px;
	background: linear-gradient(90deg, color-mix(in srgb, var(--wp--preset--color--stone-gray, #8C8C8C) 15%, #fff) 0%, color-mix(in srgb, var(--wp--preset--color--stone-gray, #8C8C8C) 8%, #fff) 50%, color-mix(in srgb, var(--wp--preset--color--stone-gray, #8C8C8C) 15%, #fff) 100%);
	background-size: 200% 100%;
	animation: heritage-skeleton-shimmer 1.5s ease-in-out infinite;
	border-radius: 6px;
}

@keyframes heritage-skeleton-shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* Filter bar: Tourism Category Tabs + sticky on mobile (stack above map so dropdown is visible) */
.heritage-journey-filters {
	position: relative;
	z-index: 600;
	background: #fff;
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--stone-gray, #8C8C8C) 40%, transparent);
	padding: var(--wp--preset--spacing--40, 24px);
	margin-bottom: 0;
}

.heritage-filters-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--40, 24px);
	row-gap: var(--wp--preset--spacing--30, 20px);
	max-width: 1200px;
	margin: 0 auto;
}

/* Single row: tabs + Search + Services + Stops in one row */
.heritage-filters-single-row {
	flex-wrap: nowrap;
	justify-content: center;
	align-items: center;
	gap: var(--wp--preset--spacing--30, 20px);
}
.heritage-filters-single-row .heritage-filter-tabs-wrap {
	flex: 1 1 auto;
	min-width: 0;
	justify-content: center;
}
.heritage-filter-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

/* Action buttons: Search, Services – same style as Stops */
.heritage-action-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 24px;
	background: var(--wp--preset--color--earth-brown, #5A2E12);
	border: none;
	color: var(--wp--preset--color--fossil-light, #F7F3EC);
	font-size: 0.8125rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, transform 0.15s;
}
.heritage-action-btn:hover {
	background: var(--wp--preset--color--basalt-dark, #2B2B2B);
}
.heritage-action-btn:focus-visible {
	outline: 2px solid var(--wp--preset--color--earth-brown, #5A2E12);
	outline-offset: 2px;
}

/* Tourism Category Tabs (UNESCO style) */
.heritage-filter-tabs-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.heritage-tab,
.heritage-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 16px;
	border-radius: 6px;
	background: #fff;
	border: 1px solid var(--wp--preset--color--earth-brown, #5A2E12);
	color: var(--wp--preset--color--earth-brown, #5A2E12);
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.heritage-tab:hover,
.heritage-chip:hover {
	background: var(--wp--preset--color--fossil-light, #F7F3EC);
}
.heritage-tab:has(input:checked),
.heritage-chip:has(input:checked) {
	background: var(--wp--preset--color--earth-brown, #5A2E12);
	border-color: var(--wp--preset--color--earth-brown, #5A2E12);
	color: var(--wp--preset--color--fossil-light, #F7F3EC);
}
.heritage-tab:focus-within,
.heritage-chip:focus-within {
	outline: 2px solid var(--wp--preset--color--earth-brown, #5A2E12);
	outline-offset: 2px;
}
.heritage-tab input,
.heritage-chip input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.heritage-tab-icon {
	font-size: 1rem;
	line-height: 1;
	display: inline-flex;
	flex-shrink: 0;
}
.heritage-tab-icon svg {
	display: block;
}
/* Geo Sites: mountain icon in brown (matches map pins) */
.heritage-tab:not(:has(input:checked))[data-tab="geo-sites"] .heritage-tab-icon--geo {
	color: var(--wp--preset--color--earth-brown, #5A2E12);
}
/* Paleontologic: dinosaur icon in blue */
.heritage-tab:not(:has(input:checked))[data-tab="paleontologic"] .heritage-tab-icon--paleontologic {
	color: #2563A8;
}
/* Tourism Services: house icon in orange */
.heritage-tab:not(:has(input:checked))[data-tab="tourism-service"] .heritage-tab-icon--tourism {
	color: var(--wp--preset--color--desert-amber, #C87A2A);
}

/* Services content inside dialog (toggle + service type checkboxes) */
.heritage-dialog-content .heritage-service-toggle-wrap {
	margin-bottom: var(--wp--preset--spacing--30, 20px);
}

/* Service Providers toggle (separate layer) */
.heritage-service-toggle-wrap {
	display: flex;
	align-items: center;
}

.heritage-toggle-label {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--wp--preset--color--earth-brown, #5A2E12);
}

.heritage-toggle-label input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.heritage-toggle-track {
	position: relative;
	width: 44px;
	height: 24px;
	background: color-mix(in srgb, var(--wp--preset--color--stone-gray, #8C8C8C) 40%, #fff);
	border: 1px solid var(--wp--preset--color--stone-gray, #8C8C8C);
	border-radius: 12px;
	transition: background 0.2s, border-color 0.2s;
}

.heritage-toggle-thumb {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 18px;
	height: 18px;
	background: var(--wp--preset--color--earth-brown, #5A2E12);
	border-radius: 50%;
	transition: transform 0.2s;
}

.heritage-toggle-label input:checked + .heritage-toggle-track {
	background: var(--wp--preset--color--earth-brown, #5A2E12);
	border-color: var(--wp--preset--color--earth-brown, #5A2E12);
}

.heritage-toggle-label input:checked + .heritage-toggle-track .heritage-toggle-thumb {
	transform: translateX(20px);
	background: var(--wp--preset--color--fossil-light, #F7F3EC);
}

.heritage-toggle-label input:focus-visible + .heritage-toggle-track {
	outline: 2px solid var(--wp--preset--color--earth-brown, #5A2E12);
	outline-offset: 2px;
}

/* Secondary filters row: Soum, Search, Sites – clear spacing so dropdown doesn’t cover search */
/* Service type: custom dropdown (legacy; dialogs used for Search/Services now) */
.heritage-service-type-dropdown,
.heritage-soum-dropdown {
	position: relative;
}
.heritage-service-type-trigger,
.heritage-soum-trigger {
	display: inline-flex;
	align-items: center;
	padding: 8px 14px;
	border-radius: 24px;
	background: var(--wp--preset--color--fossil-light, #F7F3EC);
	border: 1px solid var(--wp--preset--color--stone-gray, #8C8C8C);
	color: var(--wp--preset--color--earth-brown, #5A2E12);
	font-size: 0.8125rem;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
	min-width: 120px;
	text-align: left;
	justify-content: space-between;
}
.heritage-service-type-trigger::after,
.heritage-soum-trigger::after {
	content: "";
	display: inline-block;
	width: 0.4em;
	height: 0.4em;
	margin-left: 6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s;
}
.heritage-service-type-dropdown.is-open .heritage-service-type-trigger::after,
.heritage-soum-dropdown.is-open .heritage-soum-trigger::after {
	transform: rotate(-135deg);
}
.heritage-service-type-trigger:hover,
.heritage-soum-trigger:hover {
	border-color: var(--wp--preset--color--earth-brown, #5A2E12);
}
/* Service type panel: inside dialog (static) or legacy dropdown */
.heritage-service-type-panel,
.heritage-soum-panel {
	position: absolute;
	top: 100%;
	right: 0;
	left: auto;
	margin-top: 4px;
	padding: 8px;
	background: #fff;
	border: 1px solid var(--wp--preset--color--stone-gray, #8C8C8C);
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(90, 46, 18, 0.12);
	min-width: 160px;
	max-height: 280px;
	overflow-y: auto;
	z-index: 700;
	display: none;
}
.heritage-service-type-dropdown.is-open .heritage-service-type-panel,
.heritage-soum-dropdown.is-open .heritage-soum-panel {
	display: block;
}
.heritage-dialog .heritage-service-type-panel {
	position: static;
	display: block;
	margin-top: 0;
	max-height: none;
	border: none;
	box-shadow: none;
	padding: 0;
}
.heritage-service-type-panel label,
.heritage-soum-panel label {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	border-radius: 4px;
	font-size: 0.875rem;
	color: var(--wp--preset--color--earth-brown, #5A2E12);
	cursor: pointer;
	transition: background 0.15s;
}
.heritage-service-type-panel label:hover,
.heritage-soum-panel label:hover {
	background: var(--wp--preset--color--fossil-light, #F7F3EC);
}
.heritage-service-type-panel input,
.heritage-soum-panel input {
	margin: 0;
}

/* Search input */
.heritage-search-input {
	padding: 8px 14px;
	border-radius: 24px;
	border: 1px solid var(--wp--preset--color--stone-gray, #8C8C8C);
	font-size: 0.8125rem;
	color: var(--wp--preset--color--earth-brown, #5A2E12);
	min-width: 180px;
	transition: border-color 0.2s;
}
.heritage-search-input:focus {
	outline: none;
	border-color: var(--wp--preset--color--earth-brown, #5A2E12);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--wp--preset--color--earth-brown, #5A2E12) 20%, transparent);
}
.heritage-search-input::placeholder {
	color: var(--wp--preset--color--stone-gray, #8C8C8C);
}
.heritage-dialog-content .heritage-search-input {
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

/* Search and Services dialogs (same visual level as Stops) */
.heritage-dialog {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--wp--preset--spacing--40, 24px);
	visibility: hidden;
	opacity: 0;
	transition: visibility 0.2s, opacity 0.2s;
}
.heritage-dialog.is-open {
	visibility: visible;
	opacity: 1;
}
.heritage-dialog-overlay {
	position: absolute;
	inset: 0;
	background: rgba(90, 46, 18, 0.2);
	cursor: pointer;
}
.heritage-dialog-panel {
	position: relative;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(90, 46, 18, 0.15);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--stone-gray, #8C8C8C) 40%, transparent);
	max-width: 400px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
}
.heritage-dialog-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: var(--wp--preset--spacing--40, 24px);
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--stone-gray, #8C8C8C) 35%, transparent);
}
.heritage-dialog-title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--wp--preset--color--earth-brown, #5A2E12);
}
.heritage-dialog-close {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: none;
	background: transparent;
	color: var(--wp--preset--color--earth-brown, #5A2E12);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	border-radius: 6px;
	transition: background 0.2s;
}
.heritage-dialog-close:hover {
	background: var(--wp--preset--color--fossil-light, #F7F3EC);
}
.heritage-dialog-content {
	padding: var(--wp--preset--spacing--40, 24px);
}

/* List toggle button */
.heritage-list-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 24px;
	background: var(--wp--preset--color--earth-brown, #5A2E12);
	border: none;
	color: var(--wp--preset--color--fossil-light, #F7F3EC);
	font-size: 0.8125rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, transform 0.15s;
}
.heritage-list-toggle:hover {
	background: var(--wp--preset--color--basalt-dark, #2B2B2B);
}
.heritage-list-toggle-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.4em;
	height: 1.4em;
	padding: 0 4px;
	background: rgba(255,255,255,0.25);
	border-radius: 12px;
	font-size: 0.75rem;
}

/* List items */
.heritage-list-item {
	margin-bottom: var(--wp--preset--spacing--20, 10px);
}

.heritage-list-item.active .heritage-list-link {
	background: color-mix(in srgb, var(--wp--preset--color--desert-amber, #C87A2A) 12%, #fff);
	border-color: var(--wp--preset--color--desert-amber, #C87A2A);
}

.heritage-list-link {
	display: flex;
	gap: var(--wp--preset--spacing--20, 10px);
	padding: var(--wp--preset--spacing--20, 10px);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--stone-gray, #8C8C8C) 35%, transparent);
	border-radius: 6px;
	text-decoration: none;
	color: var(--wp--preset--color--earth-brown, #5A2E12);
	transition: background 0.2s, border-color 0.2s;
}

.heritage-list-link:hover {
	background: var(--wp--preset--color--fossil-light, #F7F3EC);
}

.heritage-list-thumb {
	flex-shrink: 0;
	width: 64px;
	height: 64px;
	overflow: hidden;
	border-radius: 6px;
	background: var(--wp--preset--color--fossil-light, #F7F3EC);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--stone-gray, #8C8C8C) 40%, transparent);
}

.heritage-list-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.heritage-list-noimg {
	display: block;
	width: 100%;
	height: 100%;
	background: color-mix(in srgb, var(--wp--preset--color--earth-brown, #5A2E12) 10%, var(--wp--preset--color--fossil-light, #F7F3EC));
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238C8C8C' stroke-width='1.5' stroke-opacity='0.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E");
	background-size: 28px;
	background-position: center;
	background-repeat: no-repeat;
}

.heritage-list-body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
}

.heritage-list-title {
	font-weight: 600;
	font-size: 0.875rem;
	line-height: 1.3;
}

.heritage-list-meta {
	font-size: 0.75rem;
	color: var(--wp--preset--color--stone-gray, #8C8C8C);
	margin-top: 2px;
}

.heritage-list-more {
	display: block;
	width: 100%;
	margin-top: var(--wp--preset--spacing--20, 10px);
	padding: 10px;
	background: var(--wp--preset--color--fossil-light, #F7F3EC);
	border: 1px solid var(--wp--preset--color--stone-gray, #8C8C8C);
	border-radius: 4px;
	color: var(--wp--preset--color--earth-brown, #5A2E12);
	font-size: 0.875rem;
	cursor: pointer;
}

.heritage-list-more:hover {
	background: color-mix(in srgb, var(--wp--preset--color--earth-brown, #5A2E12) 8%, #fff);
}

/* Popup */
.heritage-popup {
	font-family: inherit;
	font-size: 14px;
	color: var(--wp--preset--color--earth-brown, #5A2E12);
}

.heritage-popup-image {
	width: 100%;
	height: 140px;
	margin: -8px -12px 10px -12px;
	border-radius: 6px 6px 0 0;
	overflow: hidden;
	background: var(--wp--preset--color--fossil-light, #F7F3EC);
}

.heritage-popup-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.heritage-popup-image--placeholder {
	min-height: 80px;
	background: color-mix(in srgb, var(--wp--preset--color--stone-gray, #8C8C8C) 20%, var(--wp--preset--color--fossil-light, #F7F3EC));
}

.heritage-popup a.heritage-popup-link {
	display: inline-block;
	padding: 6px 14px;
	background: var(--wp--preset--color--desert-amber, #C87A2A);
	color: var(--wp--preset--color--fossil-light, #F7F3EC);
	text-decoration: none;
	border-radius: 4px;
	font-size: 13px;
}

.heritage-popup a.heritage-popup-link:hover {
	opacity: 0.9;
}

/* Leaflet overrides */
.leaflet-popup-content-wrapper {
	border-radius: 6px;
	box-shadow: 0 2px 10px rgba(90, 46, 18, 0.15);
}

.leaflet-container a.leaflet-popup-close-button {
	color: var(--wp--preset--color--earth-brown, #5A2E12);
}

/* Cluster icons: brown rounded rectangles (custom iconCreateFunction) */
.heritage-cluster-rect {
	background-color: var(--wp--preset--color--earth-brown, #5A2E12);
	border: 2px solid color-mix(in srgb, var(--wp--preset--color--fossil-light, #F7F3EC) 90%, transparent);
	border-radius: 8px;
	box-shadow: 0 2px 6px rgba(90, 46, 18, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	min-height: 28px;
}

.heritage-cluster-rect .heritage-cluster-rect-inner {
	color: var(--wp--preset--color--fossil-light, #F7F3EC);
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1;
}

/* Legacy circle clusters (if plugin falls back) */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
	background-color: color-mix(in srgb, var(--wp--preset--color--earth-brown, #5A2E12) 70%, transparent);
	border-radius: 8px;
}

.marker-cluster div {
	background-color: var(--wp--preset--color--earth-brown, #5A2E12);
	color: var(--wp--preset--color--fossil-light, #F7F3EC);
	font-weight: 600;
	border-radius: 6px;
}

/* Mobile: horizontal scroll tabs, bottom sheet, sticky filter, map 70vh */
@media (max-width: 781px) {
	.heritage-journey-filters {
		position: sticky;
		top: 0;
		z-index: 600;
	}

	.heritage-filters-inner {
		flex-direction: column;
		align-items: stretch;
	}

	.heritage-filter-tabs-wrap {
		overflow-x: auto;
		overflow-y: hidden;
		flex-wrap: nowrap;
		justify-content: flex-start;
		padding-bottom: 4px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
	}

	.heritage-filter-tabs-wrap::-webkit-scrollbar {
		height: 4px;
	}

	.heritage-tab,
	.heritage-chip {
		flex-shrink: 0;
	}

	.heritage-filters-single-row {
		flex-wrap: wrap;
	}
	.heritage-filter-actions {
		flex-wrap: wrap;
	}

	.heritage-journey-layout {
		min-height: 70vh;
	}

	.heritage-journey-map-wrap {
		min-height: 70vh;
	}

	#heritage-journey-map,
	.heritage-map-container {
		min-height: 70vh;
	}

	/* List as bottom sheet (not right panel) */
	.heritage-journey-list-wrap {
		top: auto;
		bottom: 0;
		right: 0;
		left: 0;
		max-width: 100%;
		max-height: 50vh;
		height: auto;
		transform: translateY(100%);
		border-radius: 12px 12px 0 0;
	}

	.heritage-journey-list-wrap.is-open {
		transform: translateY(0);
	}

	.heritage-map-legend {
		bottom: 8px;
		left: 8px;
		padding: 8px 10px;
		font-size: 0.6875rem;
	}

	.heritage-map-controls {
		top: 8px;
		right: 8px;
	}

	.heritage-map-controls .heritage-map-ctrl {
		width: 36px;
		height: 36px;
	}

	.heritage-map-controls .heritage-map-ctrl svg {
		width: 18px;
		height: 18px;
	}
}
