/**
 * Localizador de Tiendas con Promociones — Estilos
 * v3.3.0
 */

/* ── Reseteo de interferencias de Elementor / temas ── */
.slp-app,
.slp-app * { box-sizing: border-box; }

.slp-app {
  /* Truco para contenedores shrink-to-fit (Elementor "Inline/Auto") */
  width: 100vw;
  max-width: 100%;
  min-width: 100%;
  font-family: inherit;
  display: block;
}

.elementor-widget-shortcode .elementor-widget-container,
.elementor-widget-text-editor .elementor-widget-container,
.elementor-shortcode {
  width: 100%;
}

/* ── Filtros ── */
.slp-app .slp-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  align-items: flex-end;
  width: 100%;
}
.slp-app .slp-fg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 150px;
  min-width: 140px;
}
.slp-app .slp-fg label {
  font-size: 11px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}
.slp-app .slp-fg select,
.slp-app .slp-fg input {
  padding: 8px 12px;
  border: 1.5px solid #ddd;
  border-radius: 7px;
  font-size: 13px;
  width: 100%;
  min-width: 0;
  color: #333;
  background: #fff;
}

/* Flecha personalizada del dropdown:
   se oculta la nativa y se dibuja una propia con SVG.
   Ajustá la distancia desde el borde derecho con background-position. */
.slp-app .slp-fg select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23333' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;  /* ← distancia desde el borde derecho */
  padding-right: 38px;                      /* espacio para que el texto no pise la flecha */
}
/* Quitar la flecha nativa en IE/Edge legacy */
.slp-app .slp-fg select::-ms-expand { display: none; }
.slp-app .slp-fg select:focus,
.slp-app .slp-fg input:focus {
  outline: none;
  border-color: #999;
}

/* ── Botón "Cerca de mí": fondo #FFDD00, texto negro ── */
.slp-app .slp-geo-btn {
  padding: 8px 14px;
  background: #FFDD00;
  color: #111;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  width: 100%;
  transition: background .15s;
}
.slp-app .slp-geo-btn:hover { background: #edc900; }
.slp-app .slp-count { font-size: 12px; color: #888; margin: 0 0 8px; }

/* ── Layout principal ── */
.slp-app .slp-layout {
  display: flex;
  width: 100%;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.slp-app .slp-list {
  width: 310px;
  min-width: 260px;
  max-width: 310px;
  overflow-y: auto;
  background: #fff;
  flex-shrink: 0;
}
.slp-app .slp-mapwrap {
  flex: 1 1 0%;
  position: relative;
  min-width: 0;
  min-height: 300px;
}
.slp-app .slp-map {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
}

/* ── Acordeón de zonas ── */
.slp-app .slp-zone-group {
  border-bottom: 1px solid #eee;
}
.slp-app .slp-zone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  background: #fafafa;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  text-align: left;
  transition: background .15s;
}
.slp-app .slp-zone-header:hover { background: #f0f0f0; }
.slp-app .slp-zone-name { text-transform: uppercase; letter-spacing: .03em; }
.slp-app .slp-zone-meta { display: flex; align-items: center; gap: 8px; }
.slp-app .slp-zone-count {
  background: #FFDD00;
  color: #111;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
  min-width: 26px;
  text-align: center;
}
.slp-app .slp-zone-arrow {
  font-size: 12px;
  color: #999;
  transition: transform .2s;
}
.slp-app .slp-zone-group.open .slp-zone-arrow { transform: rotate(180deg); }
.slp-app .slp-zone-body {
  display: none;
}
.slp-app .slp-zone-group.open .slp-zone-body {
  display: block;
}

/* ── Cards de stores ── */
.slp-app .slp-card {
  padding: 13px 16px;
  border-bottom: 1px solid #f3f3f3;
  cursor: pointer;
  transition: background .12s;
}
.slp-app .slp-card:last-child { border-bottom: none; }
.slp-app .slp-card:hover { background: #fffbe6; }
.slp-app .slp-card.active {
  background: #fff8d6;
  border-left: 3px solid #FFDD00;
}
.slp-app .slp-card h4 {
  margin: 0 0 3px;
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
}
.slp-app .slp-card p {
  margin: 0 0 2px;
  font-size: 12px;
  color: #555;
  line-height: 1.5;
}

/* ── Etiquetas de promoción ── */
.slp-app .slp-tags {
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.slp-app .slp-tag {
  background: #FFDD00;
  color: #111;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
}

/* ── Botones de redes: fondo #EFEFEF, iconos negros ── */
.slp-app .slp-social {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.slp-app .slp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: #EFEFEF;
  color: #111;                /* los SVG usan currentColor */
  border-radius: 7px;
  text-decoration: none;
  transition: background .15s;
}
.slp-app .slp-btn:hover { background: #e0e0e0; color: #111; }
.slp-app .slp-btn svg {
  width: 15px;
  height: 15px;
  display: block;
}

/* ── Mensajes ── */
.slp-app .slp-msg {
  padding: 24px;
  text-align: center;
  color: #aaa;
  font-size: 13px;
}

/* ── Popup Leaflet ── */
.leaflet-popup .slp-popup {
  font-size: 13px;
  line-height: 1.5;
  min-width: 190px;
}
.leaflet-popup .slp-pop-social {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}
.leaflet-popup .slp-pop-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #EFEFEF;
  color: #111;
  border-radius: 6px;
}
.leaflet-popup .slp-pop-link svg {
  width: 14px;
  height: 14px;
  display: block;
}


/* ── Clusters de marcadores: círculo negro con cantidad ── */
.slp-cluster {
  background: #000;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform .15s;
}
.slp-cluster:hover {
  transform: scale(1.08);
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .slp-app .slp-layout {
    flex-direction: column;
    height: auto !important;
  }
  .slp-app .slp-list {
    width: 100%;
    max-width: 100%;
    max-height: 280px;
  }
  .slp-app .slp-mapwrap {
    height: 300px;
    position: relative;
  }
  .slp-app .slp-fg { flex: 1 1 100%; }
}
