/* =========================
   Layout general
========================= */
html, body {
  margin: 0;
  padding: 0;
  font-family: "Montserrat", sans-serif;
  background: #faf6f2;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Evita que estilos externos deformen elementos internos */
*,
*::before,
*::after { box-sizing: border-box; }

/* =========================
   Mapa (en widget Elementor)
========================= */
#map,
#map_ad60174bc9182d4d63bb225f1796bb96 {
  position: relative;
  width: 100%;
  height: 100vh;          /* ocupa la altura visible del navegador */
  z-index: 1;
}

/* =========================
   Panel de filtros
========================= */
#filter-container {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
  width: 240px;
  background: #fff;
  padding: 15px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
}

#filter-container h4 {
  margin: 0 0 10px;
  font: 700 16px/1 "Montserrat", sans-serif;
  color: #c2185b;
}
#filter-container label {
  display: block;
  margin: 8px 0 4px;
  font-weight: 600;
  font-size: 14px;
}
#filter-container select,
#filter-container input[type="checkbox"],
#filter-container button {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: #333;
}
#filter-container button {
  cursor: pointer;
  border-color: #bbb;
  background: #fafafa;
  transition: background .15s ease;
}
#filter-container button:hover { background: #f0f0f0; }

/* =========================
   Tooltip tipo Folium
========================= */
.foliumtooltip {
  background: rgba(255,255,255,.95);
  border: 1px solid #f8bbd0;
  border-radius: 10px;
  padding: 10px;
  color: #333;
  font-size: 14px;
  max-width: 250px;
}
.foliumtooltip table { margin: auto; }
.foliumtooltip tr { text-align: left; }
.foliumtooltip th { padding: 2px 8px 2px 0; }

/* =========================
   Galería en popups
========================= */
.popup-gallery {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.popup-gallery img {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e7e7e7;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

/* Botón “Ver más” en popup */
.popup-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  background: #f06292;
  color: #fff;
  font-size: 13px;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color .2s ease;
}
.popup-btn:hover { background: #d81b60; }

/* =========================
   Estilo de popups Leaflet
========================= */
.leaflet-container .leaflet-popup-content-wrapper {
  border-radius: 14px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.leaflet-container .leaflet-popup-content {
  margin: 10px 12px;
  width: 280px;          /* ancho objetivo del contenido */
  max-width: 90vw;       /* que no se desborde en móvil */
  line-height: 1.35;
  font-size: 14px;
  color: #333;
}
.leaflet-container a.leaflet-popup-close-button {
  width: 28px; height: 28px; line-height: 26px;
  color: #999;
}
.leaflet-container a.leaflet-popup-close-button:hover { color: #555; }
.leaflet-popup-content h4 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #222;
}

/* =========================
   Controles de edición (solo logueado)
========================= */
.rmp-admin { font-size: 13px; }
.rmp-admin hr { border: none; border-top: 1px solid #eee; margin: 8px 0; }

.rmp-admin .btn {
  display: inline-block;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid #d8d8d8;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: .15s ease;
}
.rmp-admin .btn:hover { background: #f6f6f6; }

.rmp-admin .rmp-del {
  background: #e53935 !important;
  border-color: #e53935 !important;
  color: #fff !important;
}
.rmp-admin .rmp-del:hover { filter: brightness(.95); }

.rmp-admin .rmp-save {
  background: #4caf50 !important;
  border-color: #4caf50 !important;
  color: #fff !important;
}

.rmp-admin .rmp-edit-form { margin-top: 6px; }
.rmp-admin .rmp-edit-form input[type="text"],
.rmp-admin .rmp-edit-form input[type="number"],
.rmp-admin .rmp-edit-form input[type="url"],
.rmp-admin .rmp-edit-form textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 4px 0;
  font-size: 13px;
  background: #fff;
  color: #333;
}

/* Evita que Elementor fuerce estilos raros dentro del popup */
.leaflet-popup-content * { box-sizing: border-box; }

.leaflet-popup,
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    z-index: 9999 !important;
}


/* =========================
   Panel editor flotante del front (si estás logueado)
========================= */
#rmp-editor.leaflet-control {
  z-index: 10000;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
  padding: 12px;
  width: 260px;
}
#rmp-editor h4 {
  margin: 0 0 8px;
  font-size: 14px;
}
#rmp-editor small { color: #777; }
#rmp-editor input,
#rmp-editor textarea,
#rmp-editor button {
  width: 100%;
  font-size: 12px;
  margin: .25rem 0;
  padding: .4rem .5rem;
  border: 1px solid #ddd;
  border-radius: 8px;
}
#rmp-editor button {
  background: #f06292;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: filter .15s ease;
}
#rmp-editor button:hover { filter: brightness(.95); }

/* =========================
   Ajustes responsive
========================= */
@media (max-width: 768px) {
  #filter-container {
    right: 10px;
    top: 10px;
    width: 210px;
    padding: 12px;
  }
  .leaflet-container .leaflet-popup-content {
    width: 260px;
  }
}

