/* Everything scoped to the plugin container */
.bgc-map-embed{
  color-scheme: light;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  --teal:#479EAD;
  --teal2:#80C0CA;
  --lime:#C6D655;
  --orange:#E89840;
  --bg:#F6F8FB;
  --card:#fff;
  --border:rgba(0,0,0,.08);
  --text:#0f172a;
  --muted:#475569;
}

/* Layout */
.bgc-map-embed{
  background:var(--bg);
  border-radius:18px;
  padding:18px;
}
.bgc-map-embed .bgc-map-panel{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px;
  margin-bottom:14px;
}
.bgc-map-embed .bgc-map-title{
  font-size:18px;
  font-weight:800;
}
.bgc-map-embed .bgc-map-sub{
  font-size:13px;
  color:var(--muted);
  margin-top:4px;
}
.bgc-map-embed .bgc-map-controls{
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:space-between;
  align-items:center;
}

/* Filters + buttons */
.bgc-map-embed .bgc-filters{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.bgc-map-embed .bgc-btn{
  all:unset;
  cursor:pointer;
  padding:10px 14px;
  border-radius:999px;
  background:#fff !important;
  color:var(--text) !important;
  border:1px solid var(--border) !important;
  font-size:13px;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  gap:8px;
  box-shadow:0 2px 6px rgba(0,0,0,.05);
  text-transform:none !important;
  letter-spacing:normal !important;
  text-decoration:none !important;
  line-height:1;
}
.bgc-map-embed .bgc-btn:hover{
  box-shadow:0 6px 14px rgba(0,0,0,.08);
}
.bgc-map-embed .bgc-btn[aria-pressed="true"]{
  border-color:var(--teal);
  box-shadow:0 8px 18px rgba(71,158,173,.25);
}
.bgc-map-embed .bgc-dot{
  width:10px;height:10px;border-radius:50%;
  box-shadow:0 0 0 2px rgba(15,23,42,.08);
}
.bgc-map-embed .bgc-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
}
.bgc-map-embed .bgc-status{
  font-size:12px;
  color:var(--muted);
  min-height:16px;
}

/* Map */
.bgc-map-embed .bgc-map{
  border-radius:16px;
  border:1px solid var(--border);
  box-shadow:0 10px 25px rgba(0,0,0,.08);
  background:#fff;
  overflow:hidden;
  min-height: 520px;
}

/* Legend */
.bgc-map-embed .bgc-legend{
  font-size:12px;
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  color:var(--muted);
}
.bgc-map-embed .bgc-legend span{
  display:flex;
  align-items:center;
  gap:6px;
}

/* Popup content */
.bgc-map-embed .leaflet-popup-content{ margin: 10px 12px; }
.bgc-map-embed .bgc-popup{ width: 230px; }
.bgc-map-embed .bgc-popup-img{
  width:100%;
  height:120px;
  object-fit:cover;
  border-radius:10px;
  display:block;
  background:#f1f5f9;
  margin-bottom:10px;
}
.bgc-map-embed .bgc-popup-title{
  font-weight:800;
  color:var(--text);
  font-size:14px;
  line-height:1.25;
}
.bgc-map-embed .bgc-popup-meta{
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}
.bgc-map-embed .bgc-popup-row{
  margin-top:8px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
.bgc-map-embed .bgc-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
  color:var(--text);
}
.bgc-map-embed .bgc-popup-link{
  display:inline-block;
  font-size:12px;
  font-weight:800;
  color:var(--teal);
  text-decoration:underline;
  text-underline-offset:2px;
}

/* Leaflet overrides (scoped) */
.bgc-map-embed .leaflet-control-zoom{
  border:none;
  box-shadow:0 10px 24px rgba(0,0,0,.15);
  border-radius:14px;
  overflow:hidden;
}
.bgc-map-embed .leaflet-control-zoom a{
  background:#fff !important;
  color:#000 !important;
  width:42px;
  height:42px;
  line-height:42px;
  border:none !important;
}
.bgc-map-embed .leaflet-popup-content-wrapper{
  border-radius:14px;
  box-shadow:0 12px 24px rgba(0,0,0,.2);
}

@media (max-width: 720px){
  .bgc-map-embed .bgc-actions{ width:100%; justify-content:space-between; }
}
