/* AutoSPC — gợi ý địa điểm + bản đồ chọn toạ độ (OpenStreetMap / Leaflet) */
.lp-wrap { position: relative; }

.lp-list {
  position: absolute; z-index: 999; top: calc(100% + 4px); left: 0; right: 0;
  max-height: 260px; overflow-y: auto;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .14);
}
.lp-item { padding: 8px 10px; cursor: pointer; border-bottom: 1px solid #f1f5f9; }
.lp-item:last-child { border-bottom: 0; }
.lp-item.is-on, .lp-item:hover { background: #fff4e6; }
.lp-main { font-size: 14px; color: #1e293b; }
.lp-sub  { font-size: 12px; color: #64748b; margin-top: 1px; }

.lp-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.lp-btn {
  padding: 5px 10px; font-size: 12px; cursor: pointer;
  color: #c2410c; background: #fff7ed;
  border: 1px solid #fed7aa; border-radius: 6px;
}
.lp-btn:hover { background: #ffedd5; }
.lp-btn.is-on { background: #ffedd5; border-color: #fdba74; }
.lp-btn:disabled { opacity: .6; cursor: default; }
.lp-coords { font-size: 12px; color: #475569; }
.lp-link { color: #2563eb; }

/* ---- cửa sổ bản đồ toàn màn hình ---- */
.lp-modal {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  z-index: 10000; padding: 16px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, .55);
}
.lp-dialog {
  width: min(96vw, 1000px); height: min(88vh, 740px);
  display: flex; flex-direction: column;
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .35);
}
.lp-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid #e2e8f0;
}
.lp-title { flex: 1; font-size: 15px; font-weight: 800; color: #14316b; }
.lp-close {
  border: 0; background: transparent; cursor: pointer;
  font-size: 26px; line-height: 1; color: #64748b; padding: 0 6px;
}
.lp-close:hover { color: #0f172a; }

.lp-map {
  flex: 1; min-height: 0; width: 100%;
  font-size: 13px; color: #64748b; background: #f8fafc;
}

.lp-foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; border-top: 1px solid #e2e8f0;
}
.lp-hint { flex: 1; min-width: 180px; margin: 0; font-size: 12px; color: #64748b; line-height: 1.5; }
.lp-mcoords { font-size: 12.5px; font-weight: 700; color: #334155; }
.lp-done {
  padding: 8px 20px; font-size: 13px; font-weight: 700; cursor: pointer;
  color: #fff; background: #14316b; border: 0; border-radius: 8px;
}
.lp-done:hover { background: #1d4ed8; }

html.lp-noscroll, body.lp-noscroll { overflow: hidden; }

/* Leaflet nằm gọn trong khung, không đè lên dropdown gợi ý */
.lp-map .leaflet-container { height: 100%; width: 100%; font: inherit; }
.lp-map .leaflet-control-attribution { font-size: 10px; }
.lp-map .leaflet-pane,
.lp-map .leaflet-top,
.lp-map .leaflet-bottom { z-index: 400; }

@media (max-width: 640px) {
  .lp-modal  { padding: 0; }
  .lp-dialog { width: 100vw; height: 100dvh; border-radius: 0; }
  .lp-title  { font-size: 14px; }
}
