/* Khối "ĐỊA ĐIỂM DỰ ÁN": bản đồ sáng, chấm vàng Gold, thẻ thông tin fade-in */
.sa-map { position: relative; z-index: 0; isolation: isolate; background: #eef0f2; }
.sa-map__canvas { width: 100%; height: var(--sa-map-h, 640px); background: #eef0f2; font-family: var(--sa-font, inherit); }
@media (max-width: 849px) { .sa-map__canvas { height: min(var(--sa-map-h, 640px), 540px); } }
@media (max-width: 549px) { .sa-map__canvas { height: var(--sa-map-h-m, 440px); } }
.sa-map .leaflet-container { font-family: var(--sa-font, inherit); background: #eef0f2; }
/* nền OpenStreetMap → xám sáng, tối giản (không màu sặc sỡ tranh với chấm vàng) */
.sa-map .leaflet-tile { filter: grayscale(1) brightness(1.03) contrast(1.12); } /* lọc từng ô nền (nhẹ hơn lọc cả lớp) */
.sa-map .leaflet-control-attribution { font-size: 10.5px; background: rgba(255, 255, 255, 0.8); }
.sa-map .leaflet-bar { border: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); border-radius: 0; }
.sa-map .leaflet-bar a { width: 40px; height: 40px; line-height: 40px; font-size: 20px; color: var(--sa-ink, #1f2024); border-bottom-color: #e3e5e8; }
.sa-map .leaflet-bar a:hover { background: var(--sa-yellow, #ffc20d); color: var(--sa-ink, #1f2024); }

/* số lượng dự án (góc trên trái, như bộ đếm của WOH) */
.sa-map__counter { position: absolute; z-index: 600; left: 24px; top: 22px; padding: 14px 20px 12px; background: rgba(255, 255, 255, 0.92); border-left: 4px solid var(--sa-yellow, #ffc20d); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1); pointer-events: none; line-height: 1.1; }
.sa-map__counter strong { display: block; font-size: 40px; font-weight: 800; color: var(--sa-gold-ink, #b98200); }
.sa-map__counter span { display: block; margin-top: 4px; font-size: 13.5px; font-weight: 600; color: var(--sa-ink, #1f2024); }
@media (max-width: 549px) { .sa-map__counter { left: 10px; top: 10px; padding: 8px 12px 7px; } .sa-map__counter strong { font-size: 26px; } .sa-map__counter span { font-size: 12px; } }

/* chấm vàng Gold + vòng lan nhẹ */
.sa-mk { background: none; border: 0; }
.sa-mk__dot { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--sa-yellow, #ffc20d); border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--sa-gold-ink, #b98200), 0 3px 8px rgba(0, 0, 0, 0.3); transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.25s; }
.sa-mk__pulse { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: rgba(255, 194, 13, 0.55); animation: sa-mk-pulse 2.6s ease-out infinite; }
.sa-mk:hover .sa-mk__dot,
.sa-mk.is-active .sa-mk__dot { transform: scale(1.5); background: #ffcf3a; }
.sa-mk.is-active .sa-mk__pulse,
.sa-mk:hover .sa-mk__pulse { animation-duration: 1.4s; }
@keyframes sa-mk-pulse { 0% { transform: scale(0.8); opacity: 0.9; } 70%, 100% { transform: scale(3); opacity: 0; } }
.sa-mk--cluster { display: flex; align-items: center; justify-content: center; }
.sa-mk--cluster .sa-mk__num { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--sa-yellow, #ffc20d); color: var(--sa-ink, #1f2024); font-size: 16px; font-weight: 800; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--sa-gold-ink, #b98200), 0 4px 12px rgba(0, 0, 0, 0.3); transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1); }
.sa-mk--cluster:hover .sa-mk__num { transform: scale(1.12); }
@media (prefers-reduced-motion: reduce) { .sa-mk__pulse { animation: none; opacity: 0; } }

/* thẻ thông tin: ảnh bên trái, nội dung bên phải, fade-in nhẹ */
.sa-map-pop .leaflet-popup-content-wrapper { padding: 0; border-radius: 0; border: 2px solid var(--sa-yellow, #ffc20d); box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28); animation: sa-pop-in 0.35s ease both; }
.sa-map-pop .leaflet-popup-content { margin: 0; width: auto !important; min-width: 340px; max-width: min(560px, calc(100vw - 48px)); }
.sa-map-pop .leaflet-popup-tip-container { display: none; } /* khung viền đủ 4 cạnh: bỏ mũi nhọn */
.sa-map-pop a.leaflet-popup-close-button { top: 6px; right: 6px; width: 26px; height: 26px; font: 700 20px/26px var(--sa-font, inherit); color: #6b7076; background: rgba(255, 255, 255, 0.85); border-radius: 50%; }
.sa-map-pop a.leaflet-popup-close-button:hover { color: var(--sa-ink, #1f2024); background: var(--sa-yellow, #ffc20d); }
@keyframes sa-pop-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sa-pop { display: flex; align-items: stretch; gap: 0; width: min(560px, calc(100vw - 48px)); }
.sa-pop__media { flex: 0 0 220px; display: block; position: relative; overflow: hidden; background: #e9ebee; }
.sa-pop__media img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 40%; transition: transform 0.6s; }
.sa-pop__media:hover img { transform: scale(1.06); }
.sa-pop__body { flex: 1; min-width: 0; padding: 14px 34px 14px 18px; font-size: 13.5px; line-height: 1.4; color: var(--sa-ink, #1f2024); }
.sa-pop__title { margin: 0 0 5px; font-size: 17px; line-height: 1.25; font-weight: 800; }
.sa-pop__title a { color: var(--sa-gold-ink, #b98200); text-decoration: none; }
.sa-pop__title a:hover { color: var(--sa-ink, #1f2024); }
.sa-pop__row { margin: 0 0 3px; color: #4a4f55; }
.sa-pop__row strong { color: var(--sa-ink, #1f2024); font-weight: 700; }
.sa-pop__status { display: inline-block; padding: 1px 9px; font-size: 12px; font-weight: 700; line-height: 1.6; }
.sa-pop__status.is-going { background: var(--sa-yellow, #ffc20d); color: var(--sa-ink, #1f2024); }
.sa-pop__status.is-done { background: var(--sa-navy, #0b2545); color: #fff; }
@media (max-width: 549px) {
	/* mobile: thẻ nằm ngang gọn (ảnh nhỏ bên trái) để không cao hơn khung bản đồ */
	.sa-pop { width: min(320px, calc(100vw - 56px)); }
	.sa-map-pop .leaflet-popup-content { min-width: 0; }
	.sa-pop__media { flex-basis: 92px; }
	.sa-pop__media img { min-height: 0; }
	.sa-pop__body { padding: 10px 30px 10px 12px; font-size: 12.5px; line-height: 1.4; }
	.sa-pop__title { margin-bottom: 4px; font-size: 14.5px; }
	.sa-pop__row { margin-bottom: 2px; }
	.sa-pop__row:nth-of-type(3) { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
}

/* nhãn biển / quần đảo (không tương tác) */
.sa-sea { background: none; border: 0; text-align: center; pointer-events: none; color: #6f747a; font-size: 12.5px; font-weight: 600; font-style: italic; line-height: 1.25; letter-spacing: 0.04em; }
.sa-sea span { display: block; }
.sa-sea small { display: block; font-size: 11px; font-weight: 500; font-style: normal; letter-spacing: 0; }

/* Leaflet đặt margin 1.3em cho p trong popup (độ ưu tiên cao hơn) → ghi đè để thẻ gọn */
.sa-map-pop .sa-pop p.sa-pop__row { margin: 0 0 2px; }
.sa-map-pop .sa-pop h4.sa-pop__title { margin: 0 0 5px; }
@media (max-width: 549px) {
	.sa-map-pop .sa-pop p.sa-pop__row { margin-bottom: 2px; }
	.sa-map-pop .sa-pop h4.sa-pop__title { margin-bottom: 4px; }
}

/* khung thay thế trong UX Builder */
.sa-map--builder { display: flex; align-items: center; justify-content: center; min-height: min(var(--sa-map-h, 640px), 360px); background: repeating-linear-gradient(45deg, #f3f4f6, #f3f4f6 14px, #eceef1 14px, #eceef1 28px); border: 2px dashed #c9ced4; text-align: center; color: var(--sa-ink, #1f2024); }
.sa-map--builder p { margin: 0; font-size: 16px; line-height: 1.6; }
