.aramestan-public-map {
	--aramestan-map-brand: #08aaa0;
	--aramestan-map-brand-dark: #007f78;
	--aramestan-map-ink: #10264a;
	--aramestan-map-border: #d7e9e8;
	position: relative;
	isolation: isolate;
	padding: 18px;
	border: 1px solid var(--aramestan-map-border);
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(16, 38, 74, 0.07);
	font-family: Vazirmatn, system-ui, sans-serif;
}
.aramestan-map-popup-gallery{display:flex;gap:7px;max-width:240px;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-inline:contain}.aramestan-map-popup-gallery img{flex:0 0 100%;width:100%;max-height:150px;scroll-snap-align:start;object-fit:cover;border-radius:9px}

/* The path is drawn by JavaScript from entrance to plot in two seconds. */
.aramestan-public-map .aramestan-access-path {
	stroke-linecap: round;
	stroke-linejoin: round;
	filter: drop-shadow(0 2px 3px rgba(10, 36, 68, .32));
}

@media (prefers-reduced-motion: reduce) {
	.aramestan-public-map .aramestan-access-path { transition: none !important; }
}

.aramestan-map-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.aramestan-map-heading h2 {
	margin: 3px 0 0;
	color: var(--aramestan-map-ink);
	font-size: 21px;
}

.aramestan-map-eyebrow {
	color: var(--aramestan-map-brand-dark);
	font-size: 12px;
	font-weight: 800;
}

.aramestan-map-tabs {
	position: absolute;
	z-index: 650;
	top: 12px;
	right: 12px;
	display: flex;
	gap: 3px;
	margin: 0;
	padding: 3px;
	border: 1px solid #e1eeed;
	border-radius: 12px;
	background: rgba(247, 250, 251, .94);
	box-shadow: 0 3px 12px rgba(16, 38, 74, .1);
	backdrop-filter: blur(5px);
}

.aramestan-map-plot-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0 0 10px;
	direction: rtl;
}

.aramestan-map-plot-title {
	flex: 0 0 auto;
	padding: 7px 11px;
	border: 1px solid rgba(215, 233, 232, .95);
	border-radius: 10px;
	background: rgba(255, 255, 255, .95);
	color: var(--aramestan-map-ink);
	font-size: 13px;
	box-shadow: 0 3px 12px rgba(16, 38, 74, .1);
	backdrop-filter: blur(5px);
}

.aramestan-map-plot-picker {
	position: relative;
	flex: 0 1 250px;
}

.aramestan-map-plot-picker-control {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 38px;
	overflow: hidden;
	border: 1px solid #d5e6e5;
	border-radius: 11px;
	background: rgba(255, 255, 255, .97);
	box-shadow: 0 3px 12px rgba(16, 38, 74, .1);
	backdrop-filter: blur(5px);
}

.aramestan-map-plot-picker input,
.aramestan-map-plot-picker-toggle {
	min-width: 0;
	height: 36px;
	border: 0;
	background: transparent;
	color: var(--aramestan-map-ink);
	font: 700 11px Vazirmatn, system-ui, sans-serif;
}

.aramestan-map-plot-picker input {
	width: 100%;
	padding: 6px 10px;
	outline: none;
}

.aramestan-map-plot-picker-toggle {
	border-right: 1px solid #e1eeed;
	cursor: pointer;
}

.aramestan-map-plot-picker-control:focus-within {
	border-color: var(--aramestan-map-brand);
	box-shadow: 0 0 0 3px rgba(8, 170, 160, .14), 0 3px 12px rgba(16, 38, 74, .1);
}

.aramestan-map-plot-options {
	position: absolute;
	top: calc(100% + 5px);
	right: 0;
	left: 0;
	z-index: 700;
	display: grid;
	max-height: 218px;
	overflow-y: auto;
	padding: 5px;
	border: 1px solid #d5e6e5;
	border-radius: 11px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(16, 38, 74, .18);
}

.aramestan-map-plot-options[hidden] { display: none; }
.aramestan-map-plot-options button {
	padding: 7px 9px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #314a62;
	font: 700 11px Vazirmatn, system-ui, sans-serif;
	text-align: right;
	cursor: pointer;
}
.aramestan-map-plot-options button:hover,
.aramestan-map-plot-options button:focus-visible,
.aramestan-map-plot-options button[aria-selected="true"] {
	background: #e8faf7;
	color: var(--aramestan-map-brand-dark);
	outline: none;
}

.aramestan-map-tabs button,
.aramestan-map-tabs a {
	min-height: 32px;
	padding: 6px 9px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #65778c;
	font: 700 11px Vazirmatn, system-ui, sans-serif;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.aramestan-map-tabs .is-active {
	background: #fff;
	color: var(--aramestan-map-brand-dark);
	box-shadow: 0 3px 12px rgba(16, 38, 74, 0.08);
}

.aramestan-map-help {
	margin: 12px 0;
	color: #65778c;
	font-size: 13px;
	line-height: 1.8;
}

.aramestan-map-cemetery-picker { position: relative; max-width: 400px; margin: 0 0 14px; }
.aramestan-map-cemetery-picker .aramestan-map-plot-picker-control { grid-template-columns: minmax(0,1fr) 44px 88px; box-shadow: none; }
.aramestan-map-cemetery-picker input,
.aramestan-map-cemetery-picker .aramestan-map-plot-picker-toggle { height: 46px; font: 500 14px "Vazirmatn",Tahoma,sans-serif; }
.aramestan-map-cemetery-picker input { min-width: 0; width: 100%; padding: 8px 14px; border: 0; outline: 0; background: transparent; color: var(--aramestan-map-ink); }
.aramestan-map-cemetery-picker .aramestan-map-plot-options button { font: 500 13px "Vazirmatn",Tahoma,sans-serif; }
.aramestan-map-cemetery-picker .aramestan-map-plot-go { margin: 4px; border: 0; border-radius: 8px; background: var(--aramestan-map-brand-dark); color: #fff; font: 700 12px "Vazirmatn",Tahoma,sans-serif; cursor: pointer; }
.aramestan-map-cemetery-picker .aramestan-map-plot-go:focus-visible { outline: 3px solid #73dcd4; outline-offset: 2px; }

.aramestan-map-frame {
	position: relative;
	overflow: hidden;
	border: 1px solid #d5e6e5;
	border-radius: 18px;
	background: #edf7f5;
	box-shadow: 0 5px 18px rgba(16, 38, 74, 0.08);
}

.aramestan-map-canvas {
	min-height: 500px;
	background: #edf7f5;
	color: #315760;
}

.aramestan-map-canvas > span {
	display: grid;
	min-height: 500px;
	place-items: center;
}

.aramestan-map-controls {
	position: absolute;
	z-index: 500;
	top: 16px;
	left: 16px;
	display: grid;
	overflow: hidden;
	border: 1px solid #d4e3e3;
	border-radius: 13px;
	background: #fff;
	box-shadow: 0 4px 14px rgba(16, 38, 74, 0.16);
}

.aramestan-map-controls button,
.aramestan-map-reset {
	display: grid;
	width: 42px;
	height: 42px;
	padding: 0;
	place-items: center;
	border: 0;
	background: #fff;
	color: var(--aramestan-map-ink);
	font: 700 24px/1 Arial, sans-serif;
	cursor: pointer;
}
.aramestan-facility-marker{display:grid!important;place-items:center;border:2px solid #fff;border-radius:50%;background:#087fca;color:#fff;box-shadow:0 3px 12px rgba(10,67,120,.34);transition:width .18s ease,height .18s ease,margin .18s ease}.aramestan-facility-marker svg{width:58%;height:58%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.aramestan-facility-marker.is-water{background:#08a79d}.aramestan-facility-marker.is-electricity{background:#ef8c24}.aramestan-facility-marker.is-restroom{background:#5867c7}.aramestan-facility-marker.is-entrance{background:#17694f}.aramestan-facility-marker.is-hall{background:#9a57bd}.aramestan-facility-marker.is-metro{background:#2854a4}.aramestan-map-popup{display:grid;gap:7px;min-width:150px;font-family:Vazirmatn,system-ui,sans-serif}.aramestan-map-popup p{margin:0;line-height:1.7;color:#526579}.aramestan-map-popup img{width:100%;max-height:130px;object-fit:cover;border-radius:9px}.aramestan-map-popup a{color:#087f76;font-weight:750}.aramestan-map-legend{position:absolute;z-index:500;right:12px;bottom:12px;display:flex;max-width:calc(100% - 75px);gap:6px;overflow:auto;padding:6px;border-radius:12px;background:rgba(255,255,255,.92);box-shadow:0 3px 14px #10264a22}.aramestan-map-legend span{display:flex;align-items:center;gap:4px;white-space:nowrap;color:#42576b;font-size:10px}.aramestan-map-legend svg{width:16px;height:16px;fill:none;stroke:#087f76;stroke-width:1.8}
.aramestan-facility-marker.is-route-origin{border-color:#ffd35a;box-shadow:0 0 0 4px rgba(255,211,90,.35),0 4px 16px rgba(10,67,120,.42)}.aramestan-route-origin-anchor{overflow:visible!important;border:0!important;background:transparent!important}.aramestan-route-origin-anchor>span{position:relative;display:block;width:100%;height:100%}.aramestan-route-origin-anchor i{position:absolute;inset:0;font-style:normal}.aramestan-route-origin-anchor b{position:absolute;left:50%;z-index:2;width:max-content;max-width:180px;padding:5px 8px;transform:translateX(-50%);border:1px solid #ffd35a;border-radius:9px;background:#fff;color:#123b68;box-shadow:0 3px 12px rgba(18,59,104,.18);font:800 11px/1.6 Vazirmatn,system-ui,sans-serif;white-space:nowrap}
.aramestan-facility-marker.is-wheelchair_ramp{background:#176eb1}.aramestan-facility-marker.is-stairs{background:#5f6b7a}
.aramestan-facility-marker.is-bus_station{background:#21768f}.aramestan-facility-marker.is-restroom svg text{fill:currentColor;stroke:none;font:900 10px/1 Arial,sans-serif;letter-spacing:-.6px}.aramestan-map-popup-phone{direction:ltr;text-align:right}.aramestan-map-legend button{display:flex;align-items:center;gap:4px;white-space:nowrap;padding:5px 7px;border:1px solid transparent;border-radius:9px;background:transparent;color:#42576b;font:inherit;cursor:pointer}.aramestan-map-legend button:hover,.aramestan-map-legend button:focus-visible{background:#e9f8f6;outline:2px solid #0aa89e;outline-offset:1px}.aramestan-map-legend button.is-active{border-color:#0aa89e;background:#dff7f3;color:#087f76}.aramestan-map-legend button svg{width:16px;height:16px;fill:none;stroke:#087f76;stroke-width:1.8}
.aramestan-map-legend{left:8px;right:8px;bottom:24px;width:auto;max-width:none;gap:5px;padding:2px 0;border:0;border-radius:0;background:transparent;box-shadow:none;scrollbar-width:thin}.aramestan-map-legend button{flex:0 0 auto;min-height:30px;padding:4px 8px;border-color:#dde8e7;border-radius:999px;background:#fff;font-size:10px;line-height:1.2;box-shadow:0 1px 4px rgba(18,59,104,.12)}.aramestan-map-legend button svg{width:14px;height:14px}.aramestan-map-legend button b{font-weight:750}.aramestan-map-legend button.is-active{box-shadow:0 2px 7px rgba(10,168,158,.2)}
.aramestan-map-legend[hidden]{display:none}
.aramestan-map-selection{position:absolute;z-index:550;right:14px;top:58px;max-width:min(330px,calc(100% - 92px));padding:9px 12px;border:1px solid #f0ca91;border-radius:11px;background:#fff9ed;color:#744a16;font-size:12px;line-height:1.7;box-shadow:0 4px 14px #10264a18}.aramestan-access-path.is-approximate{opacity:.82}

.aramestan-map-controls button + button {
	border-top: 1px solid #e2ebeb;
}

.aramestan-map-controls button:hover,
.aramestan-map-controls button:focus-visible,
.aramestan-map-reset:hover,
.aramestan-map-reset:focus-visible {
	background: #e8faf7;
	outline: none;
}

.aramestan-map-reset {
	position: absolute;
	z-index: 500;
	right: 16px;
	bottom: 16px;
	border-radius: 50%;
	background: var(--aramestan-map-brand);
	color: #fff;
	box-shadow: 0 5px 16px rgba(0, 135, 127, 0.28);
}
.aramestan-map-reset svg {
	display: block;
	width: 25px;
	height: 25px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.aramestan-map-fallback {
	margin-top: 18px;
	padding: 11px 14px;
	border: 1px solid #dce9e8;
	border-radius: 13px;
	background: #fafcfc;
}

.aramestan-map-fallback summary {
	color: var(--aramestan-map-brand-dark);
	font-size: 13px;
	font-weight: 750;
	cursor: pointer;
}

.aramestan-map-fallback[open] summary {
	margin-bottom: 12px;
}

.aramestan-public-map.has-tile-error .aramestan-map-fallback {
	border-color: #efc98d;
	background: #fff9ef;
}

.aramestan-map-fallback ul {
	columns: 2;
	margin: 0;
	padding-inline-start: 20px;
}

.aramestan-map-fallback li {
	margin: 5px 0;
}

.aramestan-public-map-empty {
	padding: 18px;
	border: 1px dashed #b5c9c7;
	border-radius: 16px;
}

.aramestan-map-canvas .leaflet-control-attribution {
	padding: 2px 6px;
	background: rgba(255, 255, 255, 0.88);
	font: 10px/1.5 Vazirmatn, system-ui, sans-serif;
}

.aramestan-map-canvas .leaflet-control-attribution a {
	color: var(--aramestan-map-brand-dark);
}

.aramestan-map-canvas .leaflet-tooltip,
.aramestan-map-canvas .leaflet-popup-content-wrapper {
	border: 0;
	border-radius: 12px;
	font-family: Vazirmatn, system-ui, sans-serif;
	box-shadow: 0 6px 20px rgba(16, 38, 74, 0.15);
}

.aramestan-map-popup {
	display: grid;
	gap: 7px;
	min-width: 120px;
	direction: rtl;
	text-align: right;
}

.aramestan-map-popup a {
	color: var(--aramestan-map-brand-dark);
	font-weight: 750;
	text-decoration: none;
}

.aramestan-cemetery-marker { border: 0; background: transparent; }
.aramestan-cemetery-marker-content { display: flex; width: max-content; max-width: 168px; align-items: center; gap: 7px; direction: rtl; }
.aramestan-cemetery-marker-content i { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border: 3px solid #fff; border-radius: 50%; background: var(--aramestan-map-brand); color: #fff; box-shadow: 0 5px 14px rgba(0,117,110,.3); }
.aramestan-cemetery-marker-content svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.aramestan-cemetery-marker-content b { overflow: hidden; padding: 7px 10px; border: 1px solid rgba(8,170,160,.3); border-radius: 10px; background: rgba(255,255,255,.96); color: var(--aramestan-map-ink); font: 750 12px/1.6 Vazirmatn,system-ui,sans-serif; text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 5px 14px rgba(16,38,74,.13); }

@media (max-width: 767px) {
	.aramestan-public-map {
		padding: 13px;
		border-radius: 18px;
	}

	.aramestan-map-heading h2 {
		font-size: 18px;
	}

	.aramestan-map-canvas,
	.aramestan-map-canvas > span {
		min-height: 430px;
	}

	.aramestan-map-help {
		font-size: 12px;
	}

	.aramestan-map-tabs {
		top: 9px;
		right: 9px;
	}

	.aramestan-map-plot-toolbar {
		gap: 7px;
	}

	.aramestan-map-plot-picker {
		flex-basis: 210px;
	}

	.aramestan-map-tabs button,
	.aramestan-map-tabs a {
		min-height: 30px;
		padding: 5px 7px;
		font-size: 10px;
	}

	.aramestan-map-fallback ul {
		columns: 1;
	}
}
