/*
 * Seven Dunes — Location page template styles.
 * Loaded for: page-templates/location.php
 */

/* ─── Map container ──────────────────────────────────────────────────────────── */

.sd-location {
	padding: 60px 0 80px;
}

.sd-location__header {
	text-align: center;
	margin-bottom: 40px;
}

.sd-location__title {
	font-family: "Manrope", system-ui, sans-serif;
	font-size: clamp(1.8rem, 4vw, 2.8rem);
	font-weight: 800;
	color: #3a3a3a;
	margin: 0 0 12px;
}

.sd-location__intro {
	font-size: 1rem;
	line-height: 1.7;
	color: #5f5f5f;
	max-width: 600px;
	margin: 0 auto;
}

/* ─── Filter buttons ─────────────────────────────────────────────────────────── */

.sd-location__filter-wrap {
	max-width: 900px;
	margin: 0 auto 24px;
	padding: 0 24px;
}

.sd-location__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.sd-location__filter {
	font-family: "Manrope", system-ui, sans-serif;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 8px 18px;
	border: 2px solid #3a3a3a;
	border-radius: 100px;
	background: transparent;
	color: #3a3a3a;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.sd-location__filter:hover,
.sd-location__filter.is-active {
	background: #f28f0d;
	border-color: #f28f0d;
	color: #fff;
}

/* ─── Map ────────────────────────────────────────────────────────────────────── */

.sd-location__map-wrap {
	position: relative;
	max-width: 900px;
	margin: 0 auto;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
}

#sd-location-map {
	width: 100%;
	height: 520px;
}

@media ( max-width: 640px ) {
	#sd-location-map {
		height: 380px;
	}
}

/* ─── Google Maps info window override ───────────────────────────────────────── */

.sd-map-info {
	font-family: "Inter", system-ui, sans-serif;
	min-width: 180px;
	max-width: 240px;
	padding: 4px 0;
}

.sd-map-info__type {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #f28f0d;
	margin: 0 0 4px;
}

.sd-map-info__title {
	font-family: "Manrope", system-ui, sans-serif;
	font-size: 1rem;
	font-weight: 800;
	color: #3a3a3a;
	margin: 0 0 6px;
}

.sd-map-info__excerpt {
	font-size: 0.85rem;
	line-height: 1.5;
	color: #5f5f5f;
	margin: 0 0 10px;
}

.sd-map-info__link {
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 700;
	color: #f28f0d;
	text-decoration: none;
}

.sd-map-info__link:hover {
	text-decoration: underline;
}

/* ─── Pulsing pin markers ─────────────────────────────────────────────────────── */

.sd-pin-wrap {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sd-pin-pulse {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 22px;
	height: 22px;
	transform: translate( -50%, -50% );
	border-radius: 50%;
	background: rgba( 58, 58, 58, 0.25 );
	animation: sd-pulse 2s ease-out infinite;
	pointer-events: none;
}

@keyframes sd-pulse {
	0%   { transform: translate( -50%, -50% ) scale( 1 );   opacity: 0.7; }
	70%  { transform: translate( -50%, -50% ) scale( 2.4 ); opacity: 0;   }
	100% { transform: translate( -50%, -50% ) scale( 2.4 ); opacity: 0;   }
}

/* ─── Marching ants route line ───────────────────────────────────────────────── */

.sd-route-marching {
	animation: sd-march 0.5s linear infinite;
}

@keyframes sd-march {
	to { stroke-dashoffset: -18; }
}

/* ─── Leaflet popup — Sand & Ember skin ──────────────────────────────────────── */

.sd-popup .leaflet-popup-content-wrapper {
	border-radius: 10px;
	padding: 0;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);
	border-left: 4px solid #f28f0d;
	overflow: hidden;
}

.sd-popup .leaflet-popup-content {
	margin: 0;
	width: auto !important;
}

.sd-popup .leaflet-popup-tip {
	background: #fff;
	box-shadow: none;
}

.sd-popup .leaflet-popup-tip-container {
	/* Shift tip to bottom-right corner to match popup offset */
	left:        auto;
	right:       10px;
	margin-left: 0;
}

.sd-popup .leaflet-popup-close-button {
	color: #bbb;
	font-size: 18px;
	line-height: 1;
	padding: 6px 8px;
	top: 4px;
	right: 4px;
}

.sd-popup .leaflet-popup-close-button:hover {
	color: #3a3a3a;
	background: none;
}

.sd-popup__inner {
	padding: 14px 36px 14px 16px;
	min-width: 220px;
	max-width: 260px;
	font-family: "Inter", system-ui, sans-serif;
}

.sd-popup__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 4px;
}

.sd-popup__type {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: #f28f0d;
	margin: 0;
}

.sd-popup__minimise {
	background: none;
	border: none;
	font-size: 0.65rem;
	color: #bbb;
	cursor: pointer;
	padding: 2px 4px;
	line-height: 1;
	margin-left: auto;
}

.sd-popup__minimise:hover {
	color: #3a3a3a;
}

.sd-popup__body {
	overflow: hidden;
	max-height: 300px;
	transition: max-height 0.22s ease, opacity 0.22s ease;
	opacity: 1;
}

.sd-popup__body.is-minimised {
	max-height: 0;
	opacity: 0;
}

.sd-popup__title {
	font-family: "Manrope", system-ui, sans-serif;
	font-size: 0.95rem;
	font-weight: 800;
	color: #3a3a3a;
	margin: 0 0 6px;
}

.sd-popup__excerpt {
	font-size: 0.8rem;
	line-height: 1.5;
	color: #5f5f5f;
	margin: 0 0 10px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.sd-popup__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	padding-top: 8px;
	border-top: 1px solid #f0ece6;
}

.sd-popup__time {
	font-size: 0.78rem;
	font-weight: 700;
	color: #3a3a3a;
	margin: 0;
}

.sd-popup__time--loading {
	color: #aaa;
	font-weight: 400;
}

.sd-popup__links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.sd-popup__readmore {
	font-size: 0.75rem;
	font-weight: 700;
	color: #3a3a3a;
	text-decoration: none;
	white-space: nowrap;
}

.sd-popup__readmore:hover {
	color: #f28f0d;
}

.sd-popup__link {
	font-size: 0.75rem;
	font-weight: 700;
	color: #f28f0d;
	text-decoration: none;
	white-space: nowrap;
}

.sd-popup__link:hover {
	text-decoration: underline;
}

/* ─── Legend ─────────────────────────────────────────────────────────────────── */

.sd-location__legend {
	display: flex;
	gap: 24px;
	justify-content: center;
	margin-top: 16px;
	flex-wrap: wrap;
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
}

.sd-location__legend-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.8rem;
	color: #5f5f5f;
	font-family: "Inter", system-ui, sans-serif;
}

.sd-location__legend-dot {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	flex-shrink: 0;
}

.sd-location__legend-dot--flat {
	background: #f28f0d;
}

.sd-location__legend-dot--directory {
	background: #3a3a3a;
}
