.agenda_mapa {
  position: relative;
  width: 100%;
  height: 580px;
  margin: 0 auto 4em;
  overflow: hidden;
}

#agenda_mapa_canvas {
  width: 100%;
  height: 100%;
}

/* Estilo del mapa base: más pálido y desaturado, parecido al de Google My Maps */
.agenda_mapa .leaflet-tile-pane {
  filter: grayscale(.7) contrast(.88) brightness(1.1);
}

.agenda_mapa .leaflet-container {
  background: #e5e3df;
  font-family: Roboto, Arial, sans-serif;
}

.agenda_mapa_aviso {
  position: absolute;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  font: 500 20px Roboto, Arial, sans-serif;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.agenda_mapa_aviso.visible {
  opacity: 1;
}

/* Panel de detalle: réplica del panel de Google My Maps */
.agenda_mapa_panel {
  visibility: hidden;
  transform: translateX(-100%);
  transition: transform .3s ease, visibility 0s linear .3s;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 293px;
  max-width: 100%;
  height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
  font-family: Roboto, Arial, sans-serif;
  color: #202124;
  text-align: left;
}

.agenda_mapa_panel.abierto {
  visibility: visible;
  transform: translateX(0);
  transition: transform .3s ease, visibility 0s;
}

.agenda_panel_header {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 8px;
  background: #db4437;
  color: #fff;
}

.agenda_panel_header button,
.agenda_panel_header a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  flex: none;
}

.agenda_panel_header button:hover,
.agenda_panel_header a:hover {
  background: rgba(255, 255, 255, .15);
}

.agenda_panel_titulo {
  flex: 1;
  min-width: 0;
  margin: 0 8px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda_panel_cuerpo {
  padding: 16px 20px 20px;
  background: #f5f5f5;
}

.agenda_panel_label {
  margin: 12px 0 4px;
  font-size: 12px;
  color: #70757a;
}

.agenda_panel_label:first-child,
.agenda_panel_cuerpo > img + .agenda_panel_label {
  margin-top: 0;
}

.agenda_panel_valor {
  font-size: 14px;
  line-height: 20px;
  color: #202124;
}

.agenda_panel_cuerpo > img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 200px;
  margin-bottom: 12px;
  object-fit: contain;
}

.agenda_panel_valor a {
  color: #1a73e8;
  text-decoration: none;
}

@media (max-width: 768px) {
  .agenda_mapa {
    height: 480px;
  }

  .agenda_mapa_panel {
    top: auto;
    bottom: 0;
    width: 100%;
    height: 60%;
    transform: translateY(100%);
  }

  .agenda_mapa_panel.abierto {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .agenda_mapa_panel,
  .agenda_mapa_panel.abierto {
    transition: none;
  }
}
