#nm-main-map {
    border: 1px solid #ccc;
    position: relative !important;
}

#nm-custom-form-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

#nm-user-form .nm-form-field {
    margin-bottom: 15px;
}

#nm-map-canvas {
    height: 400px;
}

/* Estilos para el modal lateral */
.nm-modal {
  display: none;
  position: absolute; /* Mantenemos absolute para que se posicione respecto al mapa */
  z-index: 1000;
  right: 0;
  top: 0;
  width: 400px;
  height: 100%;
  background-color: #fff;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  max-height: 100%;
}

.nm-modal.active {
  transform: translateX(0);
}

.nm-modal-content {
  padding: 25px;
  position: relative;
  height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Estilos mejorados para el contenido */
.nm-modal-content p {
  background: #f9f9f9;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #eee;
}

.nm-modal-content p:last-child {
  margin-bottom: 0;
}

.nm-modal-content strong {
  display: block;
  color: #333;
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nm-modal-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nm-modal-content a {
  display: inline-block;
  color: #0073aa;
  text-decoration: none;
  padding: 8px 15px;
  background: #f0f0f0;
  border-radius: 4px;
  margin-top: 5px;
  transition: all 0.3s ease;
}

.nm-modal-content a:hover {
  background: #0073aa;
  color: #fff;
}

/* Estilos para el scroll */
.nm-modal-content::-webkit-scrollbar {
  width: 8px;
}

.nm-modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.nm-modal-content::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.nm-modal-content::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Estilos para los campos secccion (headers del formulario)*/
.nm-modal-section {
    margin-bottom: 25px;
}

.nm-modal-header {
    border-bottom: 15px solid #198754;
    padding-bottom: 10px;
    margin: 20px 0 15px;
    color: #333;
    font-size: 1.2em;
}

.nm-modal-field {
    margin: 10px 0;
    padding-left: 15px;
}

.nm-modal-field:last-child {
    margin-bottom: 20px;
}
/* Botón de cierre mejorado */
.nm-modal-close {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  font-size: 24px;
  cursor: pointer;
  background: #333;
  color: white;
  border-radius: 50%;
  z-index: 1001;
}

.nm-modal-close:hover {
  background: #555;
}


/* Ajustes responsive */
@media screen and (max-width: 600px) {
  .nm-modal {
      width: 100%;

  }
}

/* Estilos para el modal de gráficos */

/* Estilos específicos para el modal de gráficos */
#nm-charts-modal {
    display: none;
    position: absolute;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

#nm-charts-modal.active {
    transform: translateY(0);
}

#nm-charts-modal .nm-modal-content {
    padding: 20px;
    height: 100%;
    box-sizing: border-box;
    position: relative;
}

/* Contenedor de gráficos con scroll horizontal */
#nm-charts-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
  gap: 30px;
  padding: 20px;
  height: calc(100% - 40px);
  overflow-y: auto;
}
/* Contenedor individual de cada gráfico */
#nm-charts-container > div {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  width: 100%;
  min-height: 400px;
}
/* Ajuste para los canvas de los gráficos */
#nm-charts-container canvas {
  width: 100% !important;
  height: 100% !important;
  max-height: 600px;
}


/* Estilos para el scroll horizontal */
#nm-charts-container::-webkit-scrollbar {
  height: 8px;
}

#nm-charts-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

#nm-charts-container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

#nm-charts-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Botón de cierre */
#nm-charts-modal .nm-modal-close {
  position: absolute;
  right: 20px;
  top: 10px;
  width: 30px;
  height: 30px;
  font-size: 20px;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 1001;
}

#nm-charts-modal .nm-modal-close:hover {
  background: #e5e5e5;
  color: #333;
}

/* Ajustes responsivos */
@media screen and (max-width: 768px) {
  #nm-charts-modal {
    position: fixed;
    top: 0;
    height: 100vh;
    width: 100vw;
    transform: translateY(100%);
  }

  #nm-charts-modal.active {
    transform: translateY(0);
  }

  #nm-charts-container {
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px;
  }

  #nm-charts-container > div {
    min-width: 100%;
    height: auto;
    margin-bottom: 20px;
  }

  #nm-charts-container canvas {
    height: 400px !important;
  }

  #nm-charts-container {
    grid-template-columns: 1fr;
}

#nm-charts-container > div {
    min-height: 300px;
}
}
