/* assets/church-map.css */

.nmcm-wrap{
  display:grid;
  grid-template-columns:360px 1fr;
  gap:12px;
  align-items:stretch;
  min-height:70vh;
}

.nmcm-mapcol{ position:relative; }
.nmcm-map{
  width:100%;
  border:1px solid #ddd;
  border-radius:10px;
  overflow:hidden;
}

.nmcm-sidebar{
  border:1px solid #ddd;
  border-radius:10px;
  background:#fff;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.nmcm-controls{
  padding:12px;
  border-bottom:1px solid #eee;
  display:grid;
  gap:8px;
}

.nmcm-label{ font-weight:700; font-size:13px; }
.nmcm-input{
  padding:10px 12px;
  border:1px solid #ccc;
  border-radius:8px;
  font:inherit;
}

.nmcm-divider{ height:1px; background:#eee; margin:6px 0; }

.nmcm-btn{
  padding:10px 12px;
  border:1px solid #111;
  border-radius:10px;
  background:#111;
  color:#fff;
  font:inherit;
  cursor:pointer;
}
.nmcm-btn-ghost{
  background:#fff;
  color:#111;
  border-color:#ccc;
}

.nmcm-filter-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.nmcm-link{
  border:0;
  background:transparent;
  padding:0;
  color:#111;
  text-decoration:underline;
  cursor:pointer;
  font:inherit;
  font-size:13px;
}

.nmcm-denoms{
  display:grid;
  gap:6px;
  max-height:180px;
  overflow:auto;
  border:1px solid #eee;
  border-radius:10px;
  padding:8px;
}

.nmcm-denom{
  display:flex;
  gap:8px;
  align-items:center;
  font-size:14px;
}
.nmcm-denom input{ transform: translateY(-1px); }

.nmcm-count{
  padding:10px 12px;
  font-size:13px;
  opacity:.8;
  border-bottom:1px solid #eee;
}

.nmcm-list{
  padding:8px 12px 12px;
  overflow:auto;
  flex:1;
  display:grid;
  gap:8px;
}

.nmcm-item{
  width:100%;
  text-align:left;
  padding:10px;
  border:1px solid #eee;
  border-radius:10px;
  background:#fff;
  cursor:pointer;
}
.nmcm-item-name{ font-weight:800; margin-bottom:4px; }
.nmcm-item-sub{ font-size:13px; opacity:.8; }

.nmcm-empty{ padding:10px; opacity:.75; }

.nmcm-panel{
  position:absolute;
  top:12px; right:12px;
  width:min(380px,90%);
  max-height:calc(70vh - 24px);
  overflow:auto;
  background:#fff;
  border:1px solid #ddd;
  border-radius:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.10);
  padding:14px;
}
.nmcm-close{
  position:absolute;
  top:8px; right:10px;
  border:0;
  background:transparent;
  font-size:22px;
  cursor:pointer;
}
.nmcm-title{ margin:0 0 8px 0; padding-right:28px; }
.nmcm-meta{ margin:6px 0; font-size:14px; }
.nmcm-links{ margin-top:10px; }

@media (max-width:900px){
  .nmcm-wrap{ grid-template-columns:1fr; }
}

/* Fix themes that override Leaflet marker <img> sizing (e.g. img{max-width:100%})
   IMPORTANT: do NOT override width/height; Leaflet sets those inline. */
#nmcm-map .leaflet-pane img,
#nmcm-map .leaflet-marker-icon,
#nmcm-map .leaflet-marker-shadow {
  max-width: none !important;
  max-height: none !important;
}

/* --- Option A: cluster bubble styling (Leaflet.markercluster) --- */
/* These classes apply when you provide `iconCreateFunction` that adds nmcm-cluster-... */
.nmcm-cluster{
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  border:2px solid #fff;
  box-shadow:0 10px 30px rgba(0,0,0,.10);
  line-height:1;
  user-select:none;
}
.nmcm-cluster span{
  display:block;
  padding:0 10px;
  font-size:13px;
}

/* Size tiers */
.nmcm-cluster--small{ width:38px; height:38px; }
.nmcm-cluster--med{ width:46px; height:46px; }
.nmcm-cluster--large{ width:56px; height:56px; }

/* Simple neutral palette (adjust if you want) */
.nmcm-cluster--small{ background:#111; color:#fff; }
.nmcm-cluster--med{ background:#333; color:#fff; }
.nmcm-cluster--large{ background:#555; color:#fff; }

.nmcm-popup { max-width: 260px; }
.nmcm-popup-img img { width: 100%; height: auto; display: block; border-radius: 10px; margin-bottom: 8px; }
.nmcm-popup-title { margin-bottom: 6px; }
.nmcm-popup-row { margin: 4px 0; }
.nmcm-popup-times { margin-top: 8px; }
.nmcm-popup-label { font-weight: 700; margin-bottom: 4px; }
.nmcm-popup-text { line-height: 1.3; }