/* Nepal Map Pins — front end. Elementor style controls override these defaults. */

.nmp {
	--nmp-pin-size: 14px;
	--nmp-pin: #f3efe4;
	--nmp-pin-border: rgba(15, 59, 46, 0.6);
	--nmp-pin-border-w: 0px;
	--nmp-pin-active: #e8b04b;
	--nmp-pin-active-scale: 1.5;
	--nmp-pin-hover-scale: 1.25;
	--nmp-label-gap: 8px;
	--nmp-nav-offset: 28px;
	--nmp-bg: #0f3b2e;
	--nmp-water: #1a5644;
	--nmp-roads: rgba(243, 239, 228, 0.14);
	--nmp-borders: rgba(243, 239, 228, 0.25);
	--nmp-map-label: #f3efe4;
	--nmp-hub-size: 48px;
	--nmp-hub-bg: #f3efe4;
	--nmp-hub-fg: #0f3b2e;
	--nmp-hub-dot: 16px;
	--nmp-hub-dot-c: #f3efe4;
	position: relative;
}

.nmp .nmp-map {
	position: relative;
	z-index: 0;
	width: 100%;
	height: 620px;
	background: var(--nmp-bg);
	font: inherit;
	overflow: hidden;
}

.nmp .nmp-map:focus-visible {
	outline: 2px solid var(--nmp-pin-active);
	outline-offset: 2px;
}

/* Overlays drawn by the plugin */
.nmp .leaflet-nmpTint-pane,
.nmp .leaflet-nmpMask-pane { pointer-events: none; }
.nmp .nmp-tint { fill: #0f3b2e; fill-opacity: 0; }
.nmp .leaflet-nmpTint-pane { mix-blend-mode: color; }
.nmp .nmp-mask { fill: var(--nmp-mask, var(--nmp-bg)); fill-opacity: 0.7; }
.nmp .nmp-outline { stroke: rgba(243, 239, 228, 0.8); stroke-width: 1.5px; fill: transparent; }
.nmp .nmp-boundary { stroke: rgba(243, 239, 228, 0.45); stroke-width: 1px; fill: none; }

/* ---------- Pins ---------- */
.nmp .nmp-marker { background: none; border: 0; }
.nmp .nmp-marker:focus { outline: none; }

.nmp .nmp-pin {
	position: absolute;
	left: 0;
	top: 0;
	display: block;
	width: var(--nmp-pin-size);
	height: var(--nmp-pin-size);
	transform: translate(-50%, -50%);
	cursor: pointer;
}

.nmp .nmp-pin-shape {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: var(--pin-c, var(--nmp-pin));
	box-shadow: 0 0 0 var(--nmp-pin-border-w) var(--nmp-pin-border);
	transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1.3), background-color 0.2s;
}

.nmp .nmp-marker:hover .nmp-pin-shape,
.nmp .nmp-marker:focus-visible .nmp-pin-shape { transform: scale(var(--nmp-pin-hover-scale)); }

.nmp .nmp-marker.is-active .nmp-pin-shape {
	background: var(--nmp-pin-active);
	transform: scale(var(--nmp-pin-active-scale));
}

.nmp .nmp-marker:focus-visible .nmp-pin-shape {
	outline: 2px solid var(--nmp-pin-active);
	outline-offset: 3px;
}

/* Ring */
.nmp .nmp-pin--ring .nmp-pin-shape {
	background: transparent;
	box-shadow:
		inset 0 0 0 calc(var(--nmp-pin-size) * 0.22) var(--pin-c, var(--nmp-pin)),
		0 0 0 var(--nmp-pin-border-w) var(--nmp-pin-border);
}
.nmp .nmp-marker.is-active .nmp-pin--ring .nmp-pin-shape {
	background: transparent;
	box-shadow: inset 0 0 0 calc(var(--nmp-pin-size) * 0.22) var(--nmp-pin-active);
}

/* Teardrop: tip sits on the coordinate */
.nmp .nmp-pin--drop { transform: translate(-50%, -50%) translateY(calc(var(--nmp-pin-size) * -0.75)); }
.nmp .nmp-pin--drop .nmp-pin-shape {
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	transform-origin: 0 100%;
	background:
		radial-gradient(circle at 50% 50%, var(--nmp-pin-border) 0 18%, transparent 19%),
		var(--pin-c, var(--nmp-pin));
}
.nmp .nmp-marker:hover .nmp-pin--drop .nmp-pin-shape,
.nmp .nmp-marker:focus-visible .nmp-pin--drop .nmp-pin-shape { transform: rotate(-45deg) scale(var(--nmp-pin-hover-scale)); }
.nmp .nmp-marker.is-active .nmp-pin--drop .nmp-pin-shape {
	background:
		radial-gradient(circle at 50% 50%, var(--nmp-pin-border) 0 18%, transparent 19%),
		var(--nmp-pin-active);
	transform: rotate(-45deg) scale(var(--nmp-pin-active-scale));
}

/* Custom image: bottom centre sits on the coordinate */
.nmp .nmp-pin--image { height: auto; transform: translate(-50%, -100%); }
.nmp .nmp-pin-img {
	display: block;
	width: 100%;
	height: auto;
	transform-origin: 50% 100%;
	transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1.3);
}
.nmp .nmp-marker:hover .nmp-pin-img { transform: scale(var(--nmp-pin-hover-scale)); }
.nmp .nmp-marker.is-active .nmp-pin-img { transform: scale(var(--nmp-pin-active-scale)); }

/* Pulse on the selected pin */
.nmp-pulse-yes .nmp .nmp-marker.is-active .nmp-pin--dot::after,
.nmp-pulse-yes .nmp .nmp-marker.is-active .nmp-pin--ring::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 1px solid var(--nmp-pin-active);
	animation: nmp-pulse 2s ease-out infinite;
	pointer-events: none;
}
@keyframes nmp-pulse {
	from { transform: scale(1); opacity: 0.9; }
	to { transform: scale(3.4); opacity: 0; }
}

/* ---------- Pin names ---------- */
.nmp .nmp-label {
	position: absolute;
	white-space: nowrap;
	pointer-events: none;
	font-size: 13px;
	line-height: 1.2;
	color: #f3efe4;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
	opacity: 0;
	transition: opacity 0.2s;
}
.nmp-label-right .nmp-label { left: calc(100% + var(--nmp-label-gap)); top: 50%; transform: translateY(-50%); }
.nmp-label-left .nmp-label { right: calc(100% + var(--nmp-label-gap)); top: 50%; transform: translateY(-50%); }
.nmp-label-top .nmp-label { bottom: calc(100% + var(--nmp-label-gap)); left: 50%; transform: translateX(-50%); }
.nmp-label-bottom .nmp-label { top: calc(100% + var(--nmp-label-gap)); left: 50%; transform: translateX(-50%); }

.nmp-labels-always .nmp-label,
.nmp-labels-hover .nmp-marker:hover .nmp-label,
.nmp-labels-hover .nmp-marker:focus-visible .nmp-label,
.nmp-labels-hover .nmp-marker.is-active .nmp-label { opacity: 1; }

/* ---------- Popup card ---------- */
.nmp .leaflet-popup-content-wrapper {
	padding: 0;
	overflow: hidden;
	border-radius: 4px;
	background: #f3efe4;
	box-shadow: 0 22px 44px -18px rgba(0, 0, 0, 0.55);
}
.nmp .leaflet-popup-tip { background: #f3efe4; box-shadow: none; }
.nmp .leaflet-popup-content { margin: 0; font-size: 14px; line-height: 1.5; }
.nmp .leaflet-popup-content p { margin: 0; }

.nmp .nmp-popup-img {
	display: block;
	width: 100%;
	height: 160px;
	object-fit: cover;
	border-radius: 4px 4px 0 0;
}
.nmp .nmp-popup-body { padding: 18px 20px 20px; }
.nmp .leaflet-popup-content .nmp-popup-sub { margin: 0 0 6px; font-size: 12px; letter-spacing: 0.02em; color: #5a6b62; }
.nmp .leaflet-popup-content .nmp-popup-title { margin: 0 0 8px; font-size: 20px; line-height: 1.2; font-weight: 500; color: #0f3b2e; }
.nmp .leaflet-popup-content .nmp-popup-text { margin: 0 0 14px; color: #2c3a33; }
.nmp .leaflet-popup-content .nmp-popup-text:last-child { margin-bottom: 0; }
.nmp .nmp-popup-link {
	display: inline-block;
	color: #0f3b2e;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
	transition: color 0.2s, background-color 0.2s;
}
.nmp .nmp-popup-link:hover,
.nmp .nmp-popup-link:focus-visible { color: #b07a16; }

.nmp a.leaflet-popup-close-button {
	top: 8px;
	right: 8px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(10, 30, 24, 0.45);
	color: #fff;
	font: 400 18px/27px system-ui, sans-serif;
	text-align: center;
	z-index: 2;
}
.nmp a.leaflet-popup-close-button:hover { background: rgba(10, 30, 24, 0.7); color: #fff; }
.nmp a.leaflet-popup-close-button:focus-visible { outline: 2px solid var(--nmp-pin-active); }

/* ---------- Controls ---------- */
.nmp .leaflet-bar { border: 0; box-shadow: none; }
.nmp .leaflet-bar a {
	width: 32px;
	height: 32px;
	line-height: 30px;
	color: #f3efe4;
	background-color: rgba(0, 0, 0, 0.25);
	border: 1px solid rgba(243, 239, 228, 0.35);
	border-radius: 0;
	backdrop-filter: blur(4px);
}
.nmp .leaflet-bar a + a { margin-top: -1px; }
.nmp .leaflet-bar a:first-child { border-radius: 3px 3px 0 0; }
.nmp .leaflet-bar a:last-child { border-radius: 0 0 3px 3px; }
.nmp .leaflet-touch .leaflet-bar a { width: 34px; height: 34px; line-height: 32px; }
.nmp .leaflet-control-attribution { font-size: 10px; background: transparent; color: rgba(255, 255, 255, 0.55); }
.nmp .leaflet-control-attribution a { color: inherit; }

/* ---------- Prev / next ---------- */
.nmp .nmp-nav {
	position: absolute;
	z-index: 801;
	display: flex;
	align-items: center;
	gap: 16px;
}
.nmp-nav-top-left .nmp-nav { top: var(--nmp-nav-offset); left: var(--nmp-nav-offset); }
.nmp-nav-top-right .nmp-nav { top: var(--nmp-nav-offset); right: var(--nmp-nav-offset); }
.nmp-nav-bottom-left .nmp-nav { bottom: var(--nmp-nav-offset); left: var(--nmp-nav-offset); }
.nmp-nav-bottom-right .nmp-nav { bottom: var(--nmp-nav-offset); right: var(--nmp-nav-offset); }
.nmp-nav-bottom-center .nmp-nav { bottom: var(--nmp-nav-offset); left: 50%; transform: translateX(-50%); }
.nmp-nav-below .nmp-nav { position: static; margin-top: var(--nmp-nav-offset); }
.nmp-nav-bottom-right .nmp-nav { flex-direction: row-reverse; text-align: right; }

.nmp .nmp-arrows { display: flex; gap: 2px; }

.nmp .nmp-arrow,
.nmp .nmp-arrow:hover,
.nmp .nmp-arrow:focus {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	font-size: 26px;
	line-height: 1;
	color: #f3efe4;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	text-transform: none;
	cursor: pointer;
}
.nmp .nmp-arrow { transition: color 0.2s, transform 0.25s, background-color 0.2s; }
.nmp .nmp-arrow:hover,
.nmp .nmp-arrow:focus-visible { color: #e8b04b; }
.nmp .nmp-prev:hover { transform: translateX(-3px); }
.nmp .nmp-next:hover { transform: translateX(3px); }
.nmp .nmp-arrow:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.nmp .nmp-arrow:disabled { opacity: 0.3; cursor: default; transform: none; }
.nmp .nmp-arrow svg { width: 1em; height: 1em; display: block; }
.nmp .nmp-arrow i { font-size: inherit; }

.nmp .nmp-status { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nmp .nmp-count { font-size: 12px; font-variant-numeric: tabular-nums; color: rgba(243, 239, 228, 0.6); }
.nmp .nmp-current { font-size: 16px; line-height: 1.25; color: #f3efe4; }
.nmp .nmp-current:empty { display: none; }

/* ---------- Kathmandu hub ---------- */
.nmp .nmp-hub-marker { cursor: default; }
.nmp .nmp-hub-marker.leaflet-interactive { cursor: pointer; }
.nmp .nmp-hub { position: absolute; left: 0; top: 0; display: block; width: 0; height: 0; }
.nmp .nmp-hub-dot {
	position: absolute;
	left: 0;
	top: 0;
	width: var(--nmp-hub-dot);
	height: var(--nmp-hub-dot);
	border-radius: 50%;
	background: var(--nmp-hub-dot-c);
	transform: translate(-50%, -50%);
	box-shadow: 0 0 0 calc(var(--nmp-hub-dot) * 0.35) color-mix(in srgb, var(--nmp-hub-dot-c) 22%, transparent);
}
.nmp .nmp-hub-badge {
	position: absolute;
	left: 0;
	bottom: calc(var(--nmp-hub-dot) / 2 + 6px + var(--nmp-hub-size) * 0.25);
	display: grid;
	place-items: center;
	height: calc(var(--nmp-hub-size) * 0.7);
	padding: 0 calc(var(--nmp-hub-size) * 0.32);
	border-radius: 999px;
	white-space: nowrap;
	background: var(--nmp-hub-bg);
	color: var(--nmp-hub-fg);
	font-size: calc(var(--nmp-hub-size) * 0.32);
	font-weight: 600;
	line-height: 1;
	transform: translateX(-50%);
	box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5);
}
.nmp .nmp-hub-badge--image {
	width: var(--nmp-hub-size);
	height: var(--nmp-hub-size);
	padding: 0;
	border-radius: 50%;
}
.nmp .nmp-hub-badge::after {
	content: "";
	position: absolute;
	left: 50%;
	top: calc(100% - 1px);
	border-style: solid;
	border-width: calc(var(--nmp-hub-size) * 0.26) calc(var(--nmp-hub-size) * 0.17) 0;
	border-color: var(--nmp-hub-bg) transparent transparent;
	transform: translateX(-50%);
}
.nmp .nmp-hub-badge img { width: 62%; height: 62%; object-fit: contain; }
.nmp .nmp-hub-name {
	position: absolute;
	left: calc(var(--nmp-hub-dot) / 2 + 10px);
	top: 0;
	transform: translateY(-50%);
	white-space: nowrap;
	font-size: 14px;
	font-weight: 500;
	color: #f3efe4;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
	pointer-events: none;
}

/* Lines, distances, rings */
.nmp .nmp-line {
	fill: none;
	stroke: rgba(243, 239, 228, 0.35);
	stroke-width: 1px;
	stroke-dasharray: 2 5;
	stroke-linecap: round;
	transition: stroke 0.2s, stroke-width 0.2s, opacity 0.2s;
}
.nmp .nmp-line.is-active { stroke: #e8b04b; stroke-width: 2px; }
.nmp .nmp-line.is-hidden { opacity: 0; }
.nmp-draw-yes .nmp .nmp-line.is-drawing {
	stroke-dasharray: 1 !important;
	stroke-dashoffset: 1;
	animation: nmp-draw 0.9s ease-out forwards;
}
@keyframes nmp-draw { to { stroke-dashoffset: 0; } }

.nmp .nmp-dist-mark, .nmp .nmp-ring-mark { background: none; border: 0; }
.nmp .nmp-dist {
	position: absolute;
	left: 0;
	top: 0;
	transform: translate(-50%, -50%);
	padding: 3px 8px;
	border-radius: 999px;
	white-space: nowrap;
	font-size: 12px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	line-height: 1.3;
	color: #0f3b2e;
	background: #e8b04b;
	transition: opacity 0.2s;
}
.nmp .nmp-dist-mark.is-hidden .nmp-dist { opacity: 0; }
.nmp .nmp-ring { fill: none; stroke: rgba(243, 239, 228, 0.3); stroke-width: 1px; stroke-dasharray: 1 6; }
.nmp .nmp-ring-label {
	position: absolute;
	left: 0;
	top: 0;
	transform: translate(-50%, -130%);
	white-space: nowrap;
	font-size: 11px;
	font-variant-numeric: tabular-nums;
	color: rgba(243, 239, 228, 0.3);
}
.nmp .leaflet-popup-content .nmp-popup-dist { margin: -4px 0 10px; font-size: 13px; font-weight: 500; color: #9a6a12; }
.nmp .nmp-current-dist { font-size: 13px; color: #e8b04b; font-variant-numeric: tabular-nums; }
.nmp .nmp-current-dist:empty { display: none; }

/* Editor empty state */
.nmp .nmp-empty {
	position: absolute;
	inset: 0;
	z-index: 900;
	display: grid;
	place-items: center;
	padding: 24px;
	text-align: center;
	font-size: 14px;
	color: #f3efe4;
	background: rgba(15, 59, 46, 0.6);
	pointer-events: none;
}

/* Bigger invisible tap area around small pins */
.nmp .nmp-pin::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: max(44px, 100%);
	height: max(44px, 100%);
	transform: translate(-50%, -50%);
}

/* Two-finger hint (phones) */
.nmp .nmp-hint {
	position: absolute;
	inset: 0;
	z-index: 1000;
	display: grid;
	place-items: center;
	padding: 24px;
	text-align: center;
	font-size: 15px;
	color: #fff;
	background: rgba(0, 0, 0, 0.45);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s;
}
.nmp .nmp-hint.is-on { opacity: 1; }

@media (max-width: 767px) {
	.nmp .nmp-nav { gap: 10px; }
	.nmp .nmp-current { font-size: 14px; }
	.nmp .nmp-arrow { min-width: 44px; min-height: 44px; }
	.nmp .leaflet-popup-content .nmp-popup-title { font-size: 18px; }

	/* Arrows as a bar along the bottom edge */
	.nmp-mbar .nmp-nav,
	.nmp-mbar.nmp-nav-bottom-center .nmp-nav,
	.nmp-mbar.nmp-nav-bottom-right .nmp-nav,
	.nmp-mbar.nmp-nav-top-left .nmp-nav,
	.nmp-mbar.nmp-nav-top-right .nmp-nav {
		top: auto;
		left: 0;
		right: 0;
		bottom: 0;
		transform: none;
		flex-direction: row;
		text-align: left;
		padding: 18px 12px 10px;
		background-image: linear-gradient(to top, color-mix(in srgb, var(--nmp-bg) 92%, transparent) 55%, transparent);
		border-radius: 0;
	}
	.nmp-mbar.nmp-nav-below .nmp-nav { position: static; background-image: none; padding: 12px 0 0; }
	.nmp-mbar:not(.nmp-nav-below) .leaflet-bottom .leaflet-control-attribution { margin-bottom: 64px; }
}

@media (prefers-reduced-motion: reduce) {
	.nmp *,
	.nmp *::after { transition: none !important; animation: none !important; }
}
