
     
      .main-content{
        padding: 20px !important;
      }
      #container {
        display: flex;
        height: 100vh;
        gap: 12px;
        padding: 0px;
        box-sizing: border-box;
        /* background-color: #ededed; */
      }
      #panel {
            width: 300px !important;
          /* width: var(--panel-width); */
          /* min-width: 340px; */
          background: var(--bg);
          /* border-radius: 8px; */
          /* padding: 12px; */
          box-sizing: border-box;
          /* box-shadow: 0 6px 18px rgb(16 24 40 / 45%); */
          overflow: auto;
          /* border: 1px solid #e3e3e3; */
      }
      #mapWrap {
        flex: 1;
        /* border-radius: 8px; */
        overflow: hidden;
        /* box-shadow: 0 6px 18px rgb(16 24 40 / 45%); */
        position: relative;
      }
      #map,
      #map3d {
        width: 100%;
        height: 100%;
        display: block;
      }
      h1 {
        margin: 0 0 8px 0;
        font-size: 16px;
      }
      .muted {
        color: var(--muted);
        font-size: 13px;
        margin-bottom: 8px;
      }
      textarea {
        width: 100%;
        height: 100px;
        font-family: monospace;
        font-size: 13px;
        padding: 8px;
        box-sizing: border-box;
        border-radius: 6px;
        border: 1px solid #e6eef9;
      }
      input[type="text"],
      select,
      input[type="file"] {
        width: 100%;
        padding: 8px;
        box-sizing: border-box;
        border-radius: 6px;
        border: 1px solid #e6eef9;
        font-size: 13px;
        margin-top: 6px;
      }
      button {
        display: block;
        width: 100%;
        padding: 8px 12px;
        margin-top: 8px;
        border-radius: 6px;
        border: none;
        background: #2b7cff;
        color: #fff;
        cursor: pointer;
        font-weight: 600;
      }
      .btn-secondary {
        background: #eef3ff;
        color: #111;
        border: 1px solid #d8e6ff;
      }
      .controls-row {
        display: flex;
        gap: 8px;
      }
      .controls-row button {
        flex: 1;
        margin-top: 0;
      }
      label.small {
        font-size: 12px;
        color: var(--muted);
        display: block;
        margin-top: 8px;
      }
      #infoPanel {
        margin-top: 8px;
        background: #fafafa;
        border: 1px dashed #e6eef9;
        padding: 8px;
        border-radius: 6px;
        font-size: 13px;
      }
      table.props {
        border-collapse: collapse;
        width: 100%;
        margin-top: 6px;
      }
      table.props th,
      table.props td {
        text-align: left;
        padding: 6px 8px;
        border-bottom: 1px solid #f0f4fb;
        vertical-align: top;
        font-size: 13px;
      }
      table.props th {
        width: 36%;
        color: #333;
        font-weight: 600;
      }
      .search-wrap {
        position: relative;
        margin-top: 8px;
      }
      #suggestions {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        z-index: 1200;
        background: #fff;
        border: 1px solid #e6eef9;
        border-radius: 6px;
        box-shadow: 0 8px 20px rgba(16, 24, 40, 0.08);
        max-height: 240px;
        overflow: auto;
        display: none;
      }
      .suggestion-item {
        padding: 8px 10px;
        cursor: pointer;
        font-size: 10px;
        border-bottom: 1px solid #f3f7fb;
        line-height: 11px !important;
      }
      .suggestion-item:last-child {
        border-bottom: none;
      }
      .suggestion-item:hover {
        background: #f4f8ff;
      }
      #filterContainer {
        margin-top: 8px;
        max-height: 160px;
        overflow: auto;
        border: 1px solid #f0f4fb;
        padding: 8px;
        border-radius: 6px;
        background: #fff;
      }
      .filter-row {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 2px;
      }
      .filter-row input {
        transform: scale(1.05);
      }
      #legend {
        margin-top: 8px;
        /* max-height: 140px; */
        overflow: auto;
      }
      .layer-highlight {
          transition: fill-color 0.8s ease, color 0.8s ease; /* Aumentar a 0.8s */
      }
     @keyframes shake {
        0% { transform: translate(1px, 0); }
        50% { transform: translate(-1px, 0); }
        100% { transform: translate(0, 0); }
      }

      .layer-shake {
          animation: shake 2s; /* Duración del efecto shake */
      }
      .legend-item {
        display: flex;
        align-items: center;
        /* gap: 8px; */
        padding: 1px;
        border-radius: 6px;
        cursor: pointer;
        transition: background 0.18s ease, transform 0.18s ease;
        font-size: 10px !important;
      }
      .legend-item:hover {
        background: #f4f8ff;
        /* transform: translateY(-2px); */
        background-color: rgb(219, 219, 219) !important;
      }
      .legend-swatch {
        width: 18px;
        height: 12px;
        border-radius: 4px;
        border: 1px solid rgba(0, 0, 0, 0.12);
        box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset;
      }
      .charts {
        margin-top: 10px;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
      }
      .chart-card {
        background: #fff;
        border-radius: 8px;
        padding: 8px;
        box-shadow: 0 4px 12px rgba(16, 24, 40, 0.04);
        transition: transform 0.18s ease, box-shadow 0.18s ease;
      }
      .chart-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 28px rgba(16, 24, 40, 0.08);
      }
      .chart-title {
        font-weight: 700;
        font-size: 13px;
        margin-bottom: 6px;
      }
      canvas {
        width: 100% !important;
        height: 160px !important;
      }
      #centerLabel {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        pointer-events: none;
        background: rgba(0, 0, 0, 0.75);
        color: #fff;
        padding: 10px 14px;
        border-radius: 8px;
        font-weight: 700;
        font-size: 16px;
        z-index: 800;
        display: none;
        white-space: nowrap;
        max-width: 70%;
        text-overflow: ellipsis;
        overflow: hidden;
        text-align: center;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
        transition: opacity 120ms ease;
        opacity: 0;
      }
      #centerLabel.show {
        display: block;
        opacity: 1;
      }
      .leaflet-interactive {
        transition: fill-opacity 260ms ease, stroke 260ms ease,
          stroke-width 220ms ease, transform 260ms ease;
        transform-origin: center;
      }
      .leaflet-interactive.pulse {
        animation: pulseScale 500ms ease-in-out forwards;
        filter: drop-shadow(0 6px 10px rgba(43, 124, 255, 0.18));
      }
      @keyframes pulseScale {
        0% {
          transform: scale(1);
        }
        50% {
          transform: scale(1.001);
        }
        /* 100% {
          transform: scale(1);
        } */
      }
      .app-content {
        min-height: calc(100vh - 8rem);
        margin-block-end: 0;
        margin-block-start: 4.25rem;
        margin-inline-start: 15rem;
        transition: all 0.05s ease;}
      #map3d {
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        display: none;
        z-index: 400;
      }
      .map3d-visible {
        display: block;
      }
      .row-3d {
        display: flex;
        gap: 8px;
        margin-top: 8px;
        align-items: center;
      }
      .small-note {
        font-size: 12px;
        color: var(--muted);
      }
      .slider {
        width: 140px;
      }
      @media (max-width: 1000px) {
        #container {
          flex-direction: column;
          padding: 8px;
        }
        #panel {
          width: 100%;
          max-height: auto !important;
        }
        #mapWrap {
          height: calc(100vh - 46vh);
          min-height: 360px;
        }
        canvas {
          height: 150px !important;
        }
      }


    .legend {
        background-color: #ffffff;
        border-radius: 3px;
        bottom: 30px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        color: #fff ;
        font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif;
        padding: 10px;
        position: absolute;
        right: 10px;
        z-index: 1000;
    }
    .legend h4 {
        margin: 0 0 10px;
    }
    .legend div span {
        border-radius: 50%;
        display: inline-block;
        height: 10px;
        margin-right: 5px;
        /* width: 10px; */
        width: auto;
        line-height: 15px !important;
    }
    .legend-item{
      color: black;
      font-size: 9px !important;
      font-weight: 400;
    }

    /* Animación de pulso para la clase 'pulse' */
@keyframes pulse {
    0% {
        stroke-width: 2px; /* Grosor del borde */
        stroke-opacity: 1; /* Opacidad del borde */
    }
    50% {
        stroke-width: 5px; /* Pulso a un grosor mayor */
        stroke-opacity: 0.8; /* Opacidad ligeramente menor */
    }
    100% {
        stroke-width: 2px;
        stroke-opacity: 1;
    }
}

.leaflet-zoom-animated .pulse {
    animation: pulse 1.5s infinite alternate; /* Animación de 1.5 segundos, infinita y alterna */
}

/* Loader overlay */
/* #loader-overlay { 
  position: fixed; 
  width: 100% !important;
  height: 100% !important;
  top:0; 
  left:0; 
  right:0; 
  bottom:0; 
  display:flex; 
  align-items:center; 
  justify-content:center; 
  background: rgb(255, 255, 255); 
  z-index:100000; }
#loader-overlay.loader-hidden { display:none; } */

/* Spinner */
.loader {
  width: 48px;
  height: 48px;
  border: 5px solid rgba(0,0,0,0.12);
  border-top-color: #1f77b4;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}



    .toolbar { padding: 10px; background: #f6f7f9; border-bottom: 1px solid #e5e7eb; display: flex; gap: 8px; flex-wrap: wrap; }
    #map { width: 100%; }
    .legend { background: #fff; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 13px; min-width: 200px; }
    .legend-title { font-weight: 600;
    margin-bottom: 6px;
    color: black;
    text-transform: uppercase;
    text-align: center; }
    .legend-item { display: flex; align-items: center; gap: 8px; margin: 4px 0; cursor: pointer; user-select: none; }
    .legend-item .swatch { width: 14px; height: 14px; border: 1px solid #cbd5e1; border-radius: 3px; flex-shrink: 0; }
    .legend-item.active { font-weight: 600; }
    .legend-hint { color: #6b7280; font-size: 12px; margin-top: 6px; }
   
    


      .feature-modal { position:fixed; inset:0; z-index:200000; display:flex; align-items:center; justify-content:center; padding:16px; }
  .feature-modal-backdrop { position:absolute; inset:0; background:rgba(2,6,23,0.6); }
  .feature-modal-content { position:relative; background:#fff; border-radius:10px; box-shadow:0 10px 40px rgba(2,6,23,0.4); width:100%; max-width:900px; padding:30px !important; z-index:2; }
  .feature-modal-header { display:flex; align-items:center; justify-content:space-between; }
  .feature-modal-close { background:transparent;border:none;font-size:18px;cursor:pointer;color:#475569; }
  .feature-modal-body table { width:100%; border-collapse:collapse; font-size:13px; }
  .feature-modal-body th { text-align:left; padding:8px; background:#dfe0e1; border-bottom:1px solid #e2e8f0; width:35%; }
  .feature-modal-body td { padding:8px; border-bottom:1px solid #dfe0e1; color:#0f172a; vertical-align:top; }
  .feature-modal-body pre { white-space:pre-wrap; word-break:break-word; margin:0; font-family:monospace;font-size:13px; }
  #feature-modal-title{
    width: 100% !important;
    margin-top: -20px !important;
    font-weight: bold;
  }
  @media (max-width: 720px) {
    #feature-modal-main-grid { grid-template-columns: 1fr; }
    #feature-modal-map-wrap { width:100%; height:220px; }
  }

  #map {
    width: 100%;
    height: -webkit-fill-available;
  }

  #panel {
    /* padding: 25px; */
  }

  #mapWrap {
    position: relative;
  }

  #map3d {
    display: none;
  }

  /* Leyenda fuera del mapa */

  .legend-container {
    /* margin-top: 8px; */
    border: 1px solid #e6e6e6;
    border-radius: 0px !important;
    background: #fff;
    padding: 15px;
    max-height: 680px !important;
    overflow: auto;
    /* box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06); */
    font-family: 'Oswald', sans-serif !important;
    font-size: 13px;
    color: #0f172a;
  }

      #legendContainer .legend-item.active {
    background: rgba(0,0,0,0.06);
    box-shadow: 0 2px 8px rgba(2,6,23,0.06);
    outline: 2px solid rgba(11,116,255,0.22);
    }

      /* Leyenda: items con scroll si excede altura */
    #legendContainer .legend-items {
      /* max-height: 320px; */
      max-height: 680px;
      overflow-y: auto;
      padding-right: 8px;       /* espacio para scrollbar */
    }
    #legendContainer .legend-items::-webkit-scrollbar { width: 10px; height: 10px; }
    #legendContainer .legend-items::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 6px; }
    #legendContainer .legend-items::-webkit-scrollbar-track { background: transparent; }


  .legend-container .legend-title {
    font-weight: 700;
    margin-bottom: 8px;
  }

  .legend-container .legend-inner .legend-items {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .legend-container .legend-item {
    display: flex !important;
    align-items: center !important;
    gap: 1px !important;
    padding: 0px !important;
    cursor: pointer !important;
    border-radius: 0px !important;
    user-select: none !important;
    background-color: white !important;
    padding-top: 5px !important;
    border: 1px solid #e3e3e3 !important;
  }

  .legend-container .legend-item .swatch {
    width: 18px;
    height: 12px;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin-right: 8px;
  }

  .legend-container .legend-item.active {
    background: #eef6ff;
    outline: 2px solid rgba(59, 130, 246, 0.12);
  }

  .legend-container .legend-item:focus {
    outline: 2px dashed rgba(59, 130, 246, 0.16);
  }
  canvas {
    height: 500px !important;
  }

  #data-dictionary-container {
    margin-top: 20px;
  }
  .data-table-container {
    margin-top: 20px;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
  }
  #legend-nav-next, #legend-nav-prev{
    background-color: #6dabb2 !important;
  }

