/* ========================================================
   CPM CDD Mapa — estilos del mapa y popups
   ======================================================== */

.cpm-cdd-mapa-wrap {
  width: 100%;
  margin: 1.5em 0;
}

.cpm-cdd-mapa {
  width: 100%; /* sobreescrito por inline style si se configura */
  border-radius: 6px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  z-index: 0; /* evita que tape el header */
}

/* Ícono SVG custom */
.cpm-cdd-marker {
  background: transparent !important;
  border: none !important;
}

/* ── Popup ─────────────────────────────────────── */
.cpm-cdd-popup {
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  color: #222;
}

.cpm-cdd-popup__thumb {
  margin: -12px -16px 10px;
  overflow: hidden;
  border-radius: 4px 4px 0 0;
}

.cpm-cdd-popup__thumb img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.cpm-cdd-popup__title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}

.cpm-cdd-popup__title a {
  color: #c0392b;
  text-decoration: none;
}

.cpm-cdd-popup__title a:hover {
  text-decoration: underline;
}

.cpm-cdd-popup__info {
  margin: 0 0 8px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
}

.cpm-cdd-popup__info dt {
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}

.cpm-cdd-popup__info dd {
  margin: 0;
  color: #222;
}

.cpm-cdd-popup__desc {
  margin: 8px 0;
  font-size: 12px;
  color: #444;
  max-height: 80px;
  overflow-y: auto;
  border-top: 1px solid #eee;
  padding-top: 6px;
}

.cpm-cdd-popup__link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #c0392b;
  text-decoration: none;
  border-top: 1px solid #eee;
  padding-top: 6px;
  width: 100%;
}

.cpm-cdd-popup__link:hover {
  text-decoration: underline;
}

/* ── Mobile ──────────────────────────────────────── */
@media (max-width: 600px) {
  .cpm-cdd-mapa {
    width: 100% !important;
  }

  .cpm-cdd-popup__info {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .cpm-cdd-popup__info dt {
    margin-top: 6px;
    white-space: normal;
  }

  .cpm-cdd-popup__info dd {
    padding-left: 8px;
    border-left: 2px solid #eee;
  }
}

/* ── Tooltip ─────────────────────────────────────── */
.leaflet-tooltip {
  font-size: 12px;
  font-weight: 600;
  background: rgba(30, 30, 30, 0.85);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.leaflet-tooltip::before {
  border-top-color: rgba(30, 30, 30, 0.85);
}

/* ── Cluster ─────────────────────────────────────── */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-clip: padding-box;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  font-weight: 700;
  font-size: 13px;
}
