/* GLOBAL RESET */
html,
body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: "Avenir Next", Helvetica, Arial, sans-serif;
  overflow: hidden; /* Prevent full page bounce */
}

.navbar {
  z-index: 1050;
  background-color: #212529 !important;
}

/* SIDEBAR LAYOUT */
#sidebarCol {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* THIS SECTION ENFORCES THE SCROLLBAR */
.panel-content {
  flex: 1 1 auto; /* Grow and shrink as needed */
  overflow-y: auto !important; /* Force scrollbar when content exceeds height */
  min-height: 0; /* Critical for flexbox scrolling */
  background-color: #fff;
  padding: 15px;
}

/* CUSTOM SCROLLBAR FOR MODERN LOOK */
.panel-content::-webkit-scrollbar {
  width: 10px;
}
.panel-content::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 5px;
}

/* FEATURE WIDGET WRAPPERS */
.feature-block {
  margin-bottom: 25px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.esri-feature {
  background-color: transparent;
  padding: 12px;
}

.esri-feature__title {
  display: none;
} /* Use our custom header instead */

.esri-widget__table {
  width: 100%;
  font-size: 0.85rem;
  margin-top: 10px;
}

/* MOBILE SPLIT (Maintains your working 50/50 split) */
@media (max-width: 991.98px) {
  #sidebarCol {
    height: 50% !important;
    order: 2;
  }
  #mapCol {
    height: 50% !important;
    order: 1;
  }

  /* Ensure widgets stay within map half on mobile */
  .esri-ui-top-right {
    max-height: 100%;
  }
  .esri-expand__content--expanded {
    max-height: 40vh !important;
  }
}
