  html,
  body {
      margin: 0;
      height: 100%;
      font-family: Arial, sans-serif;
  }


  header {
      display: flex;
      align-items: center;
      justify-content: center;
      background-image: url("/static/Images/back-img1.jpg");
      background-size: cover;
      background-position: center;
      padding: 0px;
      position: relative;
      flex-wrap: wrap;
      text-align: center;
      border-bottom: 1.5px solid #006400;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
      /* ⬅ More pronounced */
  }

  header img {
      height: 60px;
      margin-right: auto;
      margin-left: 10px;
  }

  .header-text {
      flex-grow: 1;
  }

  .container {
      display: flex;
      flex-direction: row;
      height: calc(100% - 110px);
  }



  .container {
    display: flex;
    height: 100vh;
}

#sidebar {
    width: 300px; /* starting width */
    min-width: 0; /* allow collapse to 0 */
    max-width: 500px;
    background: #f8f8f8;
    border-right: 1px solid #ccc;
    position: relative;
    overflow: hidden; /* hide contents when collapsed */
    transition: width 0.2s ease; /* smooth collapse */
}

#sidebar-resizer {
    width: 5px;
    background: #ccc;
    cursor: ew-resize;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 10;
}

#map {
    flex: 1;
}






  .title {
      /* font-family:Verdana, Geneva, Tahoma, sans-serif; */
      font-family: "Georgia Bold";
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
      /* X, Y, blur, color */
  }


  #sidebar {
      width: 250px;
      background: linear-gradient(to bottom, #e6f5d0, #a8cf45);
      box-shadow: 2px 0 6px rgba(0, 0, 0, 0.2);
      /* border-right: 2px solid #2e4e1e; */
      color: black;
      padding: 15px;
      /* box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);*/
      overflow-y: auto;
      flex-shrink: 0;
  }

  /* #map {
      flex-grow: 1;
      height: 898px;
      z-index: 1;
      position: relative;
  } */
    #map {
    flex-grow: 1;
    height: calc(100vh - 145px); /*subtract header height if needed */
    z-index: 1;
    position: relative;
} 

  h3 {
      margin-top: 0;
  }

  /* enable finding shortest distance */
  .leaflet-control-distance-btn {
      background-color: white;
      border: 2px solid #ccc;
      padding: 5px 10px;
      cursor: pointer;
      font-weight: bold;
  }

  /* sidebar button for show state boundries */
  #toggleStateBoundary {
      margin-right: 5px;
  }

  label {
      font-weight: 500;
      display: block;
      margin: 10px 0;
  }

  /* layers accordion stack  */
  .accordion-wrapper {
      width: 100%;
      max-width: 600px;
      background-color: #316f4d;
  }

  .accordion-item {
      border-bottom: 1px solid #333;
  }

  .accordion-header {
      width: 100%;
      padding: 16px;
      font-size: 1.1rem;
      background: none;
      color: #fff;
      border: none;
      text-align: left;
      cursor: pointer;
      outline: none;
      transition: background 0.3s ease;
  }

  .accordion-header:hover {
      background: #275a3e;
  }

  .accordion-content {
      max-height: 0;
      overflow: hidden;
      padding: 0 16px;
      transition: max-height 0.4s ease, padding 0.3s ease;
      color: #ccc;
  }

  .accordion-item.active .accordion-content {
      max-height: 886px;
      padding: 12px 16px 16px;
  }

  /* i icon */
  .info-cursor {
      cursor: url("/static/icons/info_cursor.png") 8 8, help;
      cursor: help;
  }

  /* Also apply to SVG paths inside the map */
  .info-cursor path {
      cursor: help !important;
  }

  /* state label at map */
  .leaflet-tooltip.state-label {
      font-size: 11px;
      font-weight: bold;
      color: rgb(49, 17, 230);
      background: transparent;
      /* rgba(0, 0, 0, 0.6);  dark semi-transparent background */
      border: none;
      box-shadow: none;
      padding: 2px 6px;
      border-radius: 4px;
      text-align: center;
      pointer-events: none;
      /* Prevents blocking clicks on map */
  }

  /* district labels on map */
  .district-label {
    font-size: 12px;
    font-weight: bold;
    color: orangered;
    text-shadow: 1px 1px 2px white;
    white-space: nowrap;
}


  /* info icon */
  .leaflet-control.info-icon {
      background-color: white;
      padding: 8px 5px;
      border-radius: 4px;
      box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
      cursor: pointer;
      font-size: 18px;
      font-weight: bold;
      line-height: 1;
  }

  /* legands style */
 .legend-child {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 22px; /* indent to show it's under checkbox */
    font-size: 13px;
    margin-bottom: 5px;
}

.legend-zigzag {
    width: 30px;
    height: 6px;
}

.beat-label {
    font-size: 12px;
    font-weight: bold;
    color: #FF5733;
    text-shadow: 1px 1px 2px #fff;
    pointer-events: none;
}

   /* sidebar firepoints menus */
.tree ul {
  list-style-type: none;
  padding-left: 20px;
}

.tree li {
  margin: 4px 0;
  line-height: 1.4em;
}

.caret {
  cursor: pointer;
  user-select: none;
  font-weight: bold;
  color: #f9faf9;
}

.caret::before {
  content: "\25B6"; /* triangle right */
  color: #f5f7f5;
  display: inline-block;
  margin-right: 6px;
  transition: transform 0.2s;
}

.caret-down::before {
  transform: rotate(90deg); /* triangle down */
}

.nested {
  display: none;
  margin-left: 12px;
}

.active {
  display: block;
}

label input[type="checkbox"] {
  margin-right: 6px;
}

/* important links */
#links {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    margin-top: 2px;
    height: 22px;
}

#links i {
    color: #0078d7;
}

#links a {
    text-decoration: none;
    color: #0066cc;
    font-weight: 500;
}

#links a:hover {
    text-decoration: underline;
}

#links .crumb {
    color: #444;
    font-weight: bold;
}



  /* Responsive design for smaller screens */
  @media (max-width: 768px) {
      .container {
          flex-direction: column;
          height: auto;
      }

      #sidebar {
          width: 100%;
          box-shadow: none;
          border-bottom: 1px solid #ddd;
      }

      #map {
            height: 70vh;
            flex-grow: 1;
            height: calc(100vh - 145px); /*subtract header height if needed */
            z-index: 1;
            position: relative;
        } 


      header {
          flex-direction: column;
          align-items: center;
          gap: 3px;
      }

      header img {
          margin: 0 auto;
      }

      .header-text {
          height: 55px;
          width: 300px;
      }

      #ashok-logo {
          margin-bottom: 6px;
      }

      .title {
          font-size: 1.4rem;
          /* acts like h3 on mobile */
      }

      #links {
        flex-wrap: wrap;
        font-size: 13px;
        padding-left: 4px;
        padding-right: 4px;
    }
  }