/**
 * @file
 * Estilos para el mapa de localidades de Bogotá.
 */

/* Contenedor del mapa - Responsive */
@media (max-width: 768px) {
  .mapcontainer {
    margin: 0 !important;
    padding: 2px !important;
    width: 100% !important;
    overflow: hidden !important;
    text-align: center;
    max-width: 100vw;
    box-sizing: border-box;
  }
}

/* Posicionamiento del mapa */
.mapael .map {
  position: relative;
  z-index: 1000;
  margin-left: 120px;
}

@media (max-width: 768px) {
  .mapael .map {
    margin-left: 0 !important;
    margin: 0 auto;
    transform: translateX(-10px);
  }
}

/* Botones de zoom */
.mapael .zoomButton {
  background-color: #fff;
  border: 1px solid #ccc;
  color: #000;
  width: 15px;
  height: 15px;
  line-height: 15px;
  text-align: center;
  border-radius: 3px;
  cursor: pointer;
  position: absolute;
  font-weight: 700;
  left: 10px;
  z-index: 1000;
  user-select: none;
}

.mapael .zoomIn {
  top: 10px;
}

.mapael .zoomOut {
  top: 30px;
}

.mapael .zoomReset {
  top: 50px;
}

/* Leyenda */
.legend,
.mapaellegend {
  margin-left: 60px;
  font-size: 12px;
  color: #2e2e2e;
}

/* Contenedor de información ESGD */
.contesgdmap {
  text-align: center;
  box-sizing: border-box;
  width: 100%;
  padding: 0 5px;
}

@media (max-width: 768px) {
  .contesgdmap {
    float: none !important;
    width: 100% !important;
    margin-left: 0 !important;
  }
}

.contesgdmap h1 {
  font-size: 16px;
  font-weight: 200;
  border-top: solid 1px #bf0a00;
  border-bottom: solid 1px #bf0a00;
  margin: 0;
  padding: 3px;
  color: #bf0a00;
}

/* Tooltip del mapa */
.mapael.mapTooltip {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #bf0a00;
  border-radius: 5px;
  padding: 10px;
  font-size: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: 400px;
  box-sizing: border-box;
  text-align: center;
}

@media (max-width: 768px) {
  .mapael.mapTooltip {
    max-width: calc(100vw - 20px);
    width: calc(100vw - 20px);
    font-size: 10px;
    padding: 12px;
    border-radius: 12px;
    position: fixed !important;
    bottom: 15px !important;
    left: 10px !important;
    right: 10px !important;
    top: auto !important;
    transform: none !important;
    background: linear-gradient(145deg, #fff 0, #f0f2f5 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(10px);
  }

  .contesgdmap {
    margin: 0 !important;
    width: 100% !important;
    font-size: 9px;
    margin-bottom: 6px !important;
    text-align: center;
    float: none !important;
    box-sizing: border-box;
    padding: 0 4px;
  }

  .contesgdmap h1 {
    font-size: 10px !important;
    padding: 3px !important;
    margin: 2px 0 !important;
    border-top: solid 1px #bf0a00;
    border-bottom: solid 1px #bf0a00;
    text-align: center;
    font-weight: 700;
    width: 100%;
    box-sizing: border-box;
  }

  .contesgdmap:last-child {
    margin-bottom: 0 !important;
  }
}
