/**
 * Map view: canvas, price pins, popups. Token-driven. There is no
 * frontend toggle (Phase 13.3, ADR-036) — the map either renders or it
 * doesn't, per Settings → Maps → Listing Archive Layout.
 */

.rb-map__region {
	margin-top: var(--rb-space-4);
}

.rb-map__canvas {
	height: 520px;
	border: 1px solid var(--rb-border);
	border-radius: var(--rb-radius-lg);
	overflow: hidden;
	background: var(--rb-muted);
	z-index: 0; /* stay under the sticky header */
}

.rb-map__status {
	margin: var(--rb-space-2) 0 0;
	font-size: 13px;
	color: var(--rb-text-secondary);
}

/* --- Price pins --- */
.rb-map__pin {
	display: inline-block;
	padding: 4px 10px;
	border-radius: var(--rb-radius-pill);
	background: var(--rb-primary);
	color: var(--rb-text-invert);
	font-family: var(--rb-font-body);
	font-size: 12.5px;
	font-weight: 600;
	white-space: nowrap;
	box-shadow: var(--rb-shadow-sm);
	border: 1.5px solid var(--rb-bg);
	transform: translate(-50%, -100%);
	cursor: pointer;
}
.rb-map__pin--under-contract { background: var(--rb-warning); }
.rb-map__pin--sold           { background: var(--rb-secondary); color: var(--rb-accent); }
.rb-map__pin--off-market     { background: var(--rb-gray-600); }

/* Keyboard focus on markers */
.leaflet-marker-icon:focus-visible {
	outline: 2px solid var(--rb-primary);
	outline-offset: 2px;
}

/* --- Popup --- */
.rb-map__popup {
	display: flex;
	gap: var(--rb-space-3);
	align-items: flex-start;
	font-family: var(--rb-font-body);
}
.rb-map__popup img {
	border-radius: var(--rb-radius-sm);
	object-fit: cover;
	flex-shrink: 0;
}
.rb-map__popup-price {
	margin: 0;
	font-weight: 600;
	color: var(--rb-text);
	font-size: 15px;
}
.rb-map__popup-title {
	display: block;
	margin: 2px 0;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.35;
	color: var(--rb-text);
}
.rb-map__popup-title:hover {
	color: var(--rb-primary);
}
.rb-map__popup-meta {
	margin: 0;
	font-size: 12.5px;
	color: var(--rb-text-secondary);
}
.rb-map__popup-approx {
	margin: 4px 0 0;
	font-size: 12px;
	font-style: italic;
	color: var(--rb-text-secondary);
}

.leaflet-popup-content-wrapper {
	border-radius: var(--rb-radius-md);
	box-shadow: var(--rb-shadow-md);
}

@media (max-width: 767px) {
	.rb-map__canvas {
		height: 420px;
	}
}
