/* Mapa Día del Motociclista — mapa */
.ddm-mapa {
  --ddm-base: #d6d6d6;
  --ddm-hover: #ff8c1a;
  --ddm-eventos: #c62828;
  --ddm-borde: #ffffff;
  --ddm-sel: #222;
  position: relative;
  margin: 1.5em 0;
  font-size: 16px;
  line-height: 1.45;
  container-type: inline-size;
}
.ddm-mapa__barra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6em;
  margin-bottom: .6em;
}
.ddm-mapa__titulo { margin: 0 !important; flex: 1 1 auto; font-size: 1.35em; }
.ddm-mapa__select { max-width: 100%; min-width: 220px; padding: .45em .6em; border: 1px solid #ccc; border-radius: 6px; background: #fff; font-size: 15px; }
.ddm-mapa__volver[hidden] { display: none !important; }

.ddm-mapa__cuerpo { display: grid; grid-template-columns: 1fr; gap: 1em; align-items: start; }
/* Panel lateral solo si el contenedor (no la ventana) es ancho; si no, va debajo del mapa. */
@container (min-width: 880px) {
  .ddm-mapa__cuerpo--panel { grid-template-columns: minmax(0, 1fr) 340px; }
}
.ddm-mapa__lienzo {
  position: relative;
  background: linear-gradient(180deg, #f4f7fa, #e9eef3);
  border-radius: 12px;
  padding: 8px;
  overflow: hidden;
  min-height: 220px;
}
.ddm-svg { display: block; width: 100%; height: auto; max-height: 72vh; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ddm-area {
  fill: var(--ddm-base);
  stroke: var(--ddm-borde);
  stroke-width: .8;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill .15s ease;
  outline: none;
}
.ddm-svg--mun .ddm-area { stroke-width: .6; }
.ddm-area--ev { fill: var(--ddm-eventos); }
.ddm-area:hover, .ddm-area:focus { fill: var(--ddm-hover); }
.ddm-area--sel, .ddm-area--sel:hover { fill: var(--ddm-hover); stroke: var(--ddm-sel); stroke-width: 1.6; }
.ddm-entra { animation: ddmEntra .35s ease-out; }
@keyframes ddmEntra { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ddm-entra { animation: none; } .ddm-area { transition: none; } }

.ddm-mapa__tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: rgba(20, 20, 20, .92);
  color: #fff;
  padding: .4em .65em;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.ddm-mapa__tip[hidden] { display: none; }
.ddm-mapa__cargando {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .55); font-weight: 600; z-index: 4;
}

.ddm-mapa__panel {
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  padding: 1em;
  max-height: 72vh;
  overflow: auto;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .06);
}
.ddm-mapa__panel[hidden] { display: none; }
.ddm-panel-cab { display: flex; align-items: center; justify-content: space-between; gap: .5em; }
.ddm-panel-cab h4 { margin: 0 !important; font-size: 1.2em; }
.ddm-panel-x { border: 0; background: #eee; width: 32px; height: 32px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; color: #333; padding: 0; }
.ddm-panel-n { color: #666; margin: .3em 0 .8em; }
.ddm-mapa__panel .ddm-ev { margin-bottom: 1em; }

.ddm-mapa__pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4em 1em; margin-top: .5em; font-size: 14px; color: #555; }
.ddm-mapa__pie p { margin: 0; }
.ddm-sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin: 0 .3em 0 .6em; }
.ddm-sw--ev { background: var(--ddm-eventos); }
.ddm-sw--base { background: var(--ddm-base); border: 1px solid #bbb; }
.ddm-mapa__cta a { font-weight: 600; }

.ddm-mapa__lista { margin-top: 1.5em; }
.ddm-mapa__lista-tit { margin-bottom: .6em !important; }
.ddm-mapa__lista-tit small { font-weight: 400; color: #666; font-size: .7em; }
.ddm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1em; }

@media (max-width: 600px) {
  .ddm-mapa__select { min-width: 0; width: 100%; }
  .ddm-mapa__titulo { font-size: 1.15em; }
  .ddm-svg { max-height: none; }
}
