/* =============================================================================
   Across Car — Concesionarios
   Panel de búsqueda + listado a la izquierda, mapa a la derecha (escala de
   grises, pines en rojo de marca). Tokens en tokens.css.
   ============================================================================= */

.acc-mapa {
  color: var(--acc-ink);
  background: var(--acc-white);
  max-width: 1500px;
  margin: 0 auto;
  padding-inline: clamp(16px, 3vw, 40px);
  padding-block: clamp(24px, 3vw, 48px);
  font-size: 16px;
  line-height: 1.5;
  box-sizing: border-box;
}
.acc-mapa *,
.acc-mapa *::before,
.acc-mapa *::after { box-sizing: border-box; }
.acc-mapa .acc-ico { width: 18px; height: 18px; flex: none; }
.acc-mapa .acc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.acc-mapa p { margin: 0; }

/* Reset de botones frente al kit de Elementor (ver wizard.css). */
.acc-mapa button { font: inherit; color: inherit; text-transform: none; letter-spacing: inherit; line-height: inherit; text-align: inherit; background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 0; cursor: pointer; white-space: normal; }
.acc-mapa button:hover,
.acc-mapa button:focus { background: none; color: inherit; border-style: none; border-radius: 0; text-decoration: none; }
.acc-mapa a,
.acc-mapa a:hover,
.acc-mapa a:focus { font: inherit; line-height: inherit; color: var(--acc-ink); text-decoration: none; }

.acc-mapa .acc-mapa__head { margin-bottom: clamp(20px, 2.4vw, 32px); }
.acc-mapa .acc-mapa__title {
  font-family: var(--acc-font);
  font-size: clamp(30px, 3.2vw, 48px);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -0.06em;
  color: var(--acc-ink);
  text-transform: none;
  margin: 0;
  text-wrap: balance;
}
.acc-mapa .acc-mapa__lead { margin-top: 8px; font-size: 16px; line-height: 22px; color: var(--acc-muted); letter-spacing: -0.03em;  }

.acc-mapa .acc-mapa__layout {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 28px);
  align-items: start;
}

/* ---- Panel ------------------------------------------------------------------ */
.acc-mapa .acc-mapa__panel { display: flex; flex-direction: column; min-width: 0; height: min(720px, 80vh); }
.acc-mapa .acc-mapa__finder { display: flex; gap: 8px; flex-wrap: wrap; }
.acc-mapa .acc-mapa__search { position: relative; flex: 1 1 180px; display: flex; align-items: center; }
.acc-mapa #acc-mapa-geo { flex-basis: 100%; justify-content: center; }
.acc-mapa .acc-mapa__search .acc-ico { position: absolute; left: 14px; color: var(--acc-muted); pointer-events: none; }
.acc-mapa .acc-mapa__search input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--acc-ink);
  background: var(--acc-white);
  border: 1px solid var(--acc-line-strong);
  border-radius: var(--acc-radius-btn);
  padding: 11px 14px 11px 40px;
  line-height: 1.4;
  box-shadow: none;
}
.acc-mapa .acc-mapa__search input:focus { outline: none; border-color: var(--acc-slate); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc-slate) 14%, transparent); }
.acc-mapa .acc-mapa__btn,
.acc-mapa .acc-mapa__btn:hover,
.acc-mapa .acc-mapa__btn:focus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--acc-ink);
  border: 1px solid var(--acc-line-strong);
  border-radius: var(--acc-radius-btn);
  transition: border-color var(--acc-ease);
}
.acc-mapa .acc-mapa__btn:hover { border-color: var(--acc-slate); }
.acc-mapa .acc-mapa__btn:disabled { opacity: 0.5; }

.acc-mapa .acc-mapa__status { font-size: 14px; color: var(--acc-muted); margin-top: 10px; }
.acc-mapa .acc-mapa__status:empty { margin: 0; }
.acc-mapa .acc-mapa__clear,
.acc-mapa .acc-mapa__clear:hover,
.acc-mapa .acc-mapa__clear:focus { font-weight: 500; color: var(--acc-ink); text-decoration: underline; text-decoration-color: var(--acc-line-strong); text-underline-offset: 3px; }

.acc-mapa .acc-mapa__paises { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0 4px; flex: none; }
.acc-mapa .acc-mapa__paises::-webkit-scrollbar { display: none; }
.acc-mapa .acc-mapa__chip,
.acc-mapa .acc-mapa__chip:hover,
.acc-mapa .acc-mapa__chip:focus {
  flex: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border: 1px solid var(--acc-line);
  border-radius: var(--acc-radius-btn);
  color: var(--acc-ink-soft);
  white-space: nowrap;
  transition: border-color var(--acc-ease), background-color var(--acc-ease), color var(--acc-ease);
}
.acc-mapa .acc-mapa__chip:hover { border-color: var(--acc-line-strong); color: var(--acc-ink); }
.acc-mapa .acc-mapa__chip span { color: var(--acc-muted); font-variant-numeric: tabular-nums; }
.acc-mapa .acc-mapa__chip[aria-pressed='true'] { background: var(--acc-slate); border-color: var(--acc-slate); color: var(--acc-white); }
.acc-mapa .acc-mapa__chip[aria-pressed='true'] span { color: color-mix(in srgb, var(--acc-white) 70%, transparent); }

.acc-mapa .acc-mapa__list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
  border-top: 1px solid var(--acc-line);
  scrollbar-width: thin;
  scrollbar-color: var(--acc-line-strong) transparent;
}
.acc-mapa .acc-mapa__empty { padding: 20px 0; color: var(--acc-muted); }

.acc-mapa .acc-dealer {
  margin: 0;
  padding: 14px 10px 14px 12px;
  border-bottom: 1px solid var(--acc-line);
  transition: background-color var(--acc-ease);
}
.acc-mapa .acc-dealer.is-active { background: var(--acc-ground); }
.acc-mapa .acc-dealer__main,
.acc-mapa .acc-dealer__main:hover,
.acc-mapa .acc-dealer__main:focus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  width: 100%;
  text-align: left;
}
.acc-mapa .acc-dealer__name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.acc-mapa .acc-dealer__main:hover .acc-dealer__name { text-decoration: underline; text-decoration-color: var(--acc-red); text-underline-offset: 3px; }
.acc-mapa .acc-dealer__addr { grid-column: 1; font-size: 14px; color: var(--acc-muted); }
.acc-mapa .acc-dealer__km {
  grid-column: 2;
  grid-row: 1;
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.acc-mapa .acc-dealer__actions { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; }
.acc-mapa .acc-dealer__actions a,
.acc-mapa .acc-dealer__actions a:hover,
.acc-mapa .acc-dealer__actions a:focus {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 500;
  color: var(--acc-ink);
}
.acc-mapa .acc-dealer__actions a:hover { text-decoration: underline; text-decoration-color: var(--acc-line-strong); text-underline-offset: 3px; }
.acc-mapa .acc-dealer__actions .acc-ico { width: 16px; height: 16px; color: var(--acc-red); }

/* ---- Mapa ------------------------------------------------------------------- */
.acc-mapa .acc-mapa__canvas {
  height: min(720px, 80vh);
  border-radius: var(--acc-radius-lg);
  overflow: hidden;
  background: var(--acc-ground);
  z-index: 0;
}
.acc-mapa .acc-mapa__canvas .leaflet-tile-pane { filter: grayscale(1) contrast(0.92) brightness(1.04); }
.acc-mapa .leaflet-container { font-family: var(--acc-font); }
.acc-mapa .leaflet-control-zoom { border: 0; box-shadow: var(--acc-shadow); border-radius: 12px; overflow: hidden; }
.acc-mapa .leaflet-control-zoom a,
.acc-mapa .leaflet-control-zoom a:hover,
.acc-mapa .leaflet-control-zoom a:focus { color: var(--acc-ink); width: 36px; height: 36px; line-height: 36px; }
.acc-mapa .leaflet-control-attribution { font-size: 10px; }

.acc-mapa .acc-pin { color: var(--acc-red); }
.acc-mapa .acc-pin svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 3px 6px color-mix(in srgb, var(--acc-slate) 35%, transparent));
  transition: transform 0.25s var(--acc-out);
  transform-origin: 50% 100%;
}
.acc-mapa .acc-pin.is-active { color: var(--acc-slate); }
.acc-mapa .acc-pin.is-active svg { transform: scale(1.2); }

.acc-mapa .leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: var(--acc-shadow-lg); }
.acc-mapa .leaflet-popup-content { margin: 12px 16px; font-size: 14px; line-height: 1.45; }
.acc-mapa .acc-popup__name { font-weight: 700; font-size: 15px; color: var(--acc-ink); }
.acc-mapa .acc-popup__addr { color: var(--acc-muted); margin-top: 2px; }
.acc-mapa .acc-popup__go,
.acc-mapa .acc-popup__go:hover,
.acc-mapa .acc-popup__go:focus { display: inline-block; margin-top: 6px; font-weight: 500; color: var(--acc-ink); text-decoration: underline; text-decoration-color: var(--acc-red); text-underline-offset: 3px; }

/* ---- Responsive ------------------------------------------------------------- */
@media (max-width: 899px) {
  .acc-mapa .acc-mapa__layout { grid-template-columns: minmax(0, 1fr); }
  .acc-mapa .acc-mapa__canvas { order: -1; height: 46vh; min-height: 300px; }
  .acc-mapa .acc-mapa__panel { height: auto; }
  .acc-mapa .acc-mapa__list { overflow: visible; }
}
