* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.navbar span {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

html , body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.main {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.navbar {
    position: relative;
    z-index: 2000; /* higher than Leaflet controls */
    flex: 0 0 auto; /* fixed height section */
    background: #000000;
}

/* Make sure all Leaflet controls are above map tiles but below navbar */
.leaflet-top,
.leaflet-bottom {
    z-index: 1500; /* less than navbar */
}

.leaflet-control-zoom {
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.4) !important;
    border: none !important;
    background-color: transparent !important;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    background-color: #000000  !important;
    /* Bootstrap Primary */
    color: white !important;
    border: none !important;
    font-size: 30px !important;
    font-weight: bold;
    border-radius: 8px;
    border-top-left-radius: 6px !important;
    border-top-right-radius: 6px !important;
    border-bottom-left-radius: 6px !important;
    border-bottom-right-radius: 6px !important;
    width: 34px !important;
    height: 38px !important;
    line-height: 42px !important;
    text-align: center !important;
    margin: 2px 0;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.4) !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6) !important;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
    flex: 1 1 auto;
}

#basemap-panel {
    position: absolute;
    top: 8%;
    right: 2%;
    /* set z-index to 2 */
    z-index: 2;    
    width: 250px;
    background-color: #000000;
    border-radius: 8px;
    color: white;
}

.my-location-btn {
  position: absolute;
  top: 150px; /* Adjust below the zoom buttons */
  left: 10px;
  z-index: 2;
  background-color: #000000;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 4px;
  font-size: 20px;
  line-height: 40px;
  text-align: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4) !important;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6) !important;
  cursor: pointer;
}

.my-location-btn:hover {
  background-color: rgba(101, 133, 5, 0.9)
}

.toolbar-container {
    display: flex;
    justify-content: center;
    position: absolute;
    top: var(--navbar-height, 60px); /* fallback if variable not set */
    z-index: 1400; /* below navbar, above map */  
    width: 100%;
    pointer-events: none;
}

.toolbar-container div {
    background: #000000;
    border-radius: 5px;
    color: white;
}

.toolbar-container * {
    pointer-events: auto;
}

.toolbar-container div button {
    color: white;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    text-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
}

#data-warehouse-panel {
    max-height: calc(100vh - 150px); /* leave space for navbar and padding */
    overflow-y: auto;
    overflow-x: hidden;
}

/* scrolling style  start */
/* Works in Chrome, Edge, Safari */
#data-warehouse-panel::-webkit-scrollbar, #dataDisplay::-webkit-scrollbar {
    width: 8px; /* thin scrollbar */
}

#data-warehouse-panel::-webkit-scrollbar-track, #dataDisplay::-webkit-scrollbar-track  {
    background: #1a1a1a; /* dark track */
}

#data-warehouse-panel::-webkit-scrollbar-thumb, #dataDisplay::-webkit-scrollbar-thumb  {
    background-color: #555; /* grey handle */
    border-radius: 4px;
    border: 1px solid #222; /* subtle border */
}

#data-warehouse-panel::-webkit-scrollbar-thumb:hover, #dataDisplay::-webkit-scrollbar-thumb:hover {
    background-color: #888; /* lighter on hover */
}

/* Firefox */
#data-warehouse-panel, #dataDisplay {
    scrollbar-width: thin;
    scrollbar-color: #555 #1a1a1a;
}

/* scrolling style end  */

.card {
  /* background: #000000 !important; */
  background-color: rgba(0, 0, 0, 0.6) !important;
  color: white;
}

.card-kotegere {
  background: #000000 !important;
  color: white;
}

.dropdown-draw-tools {
    position: absolute;
    top: 100%;  /* Just below the button */
    left: 40%;
    background-color: transparent !important;
    z-index: 9999;
    padding: 5px;
    border-radius: 4px;
    display: none;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.leaflet-control-browser-print {
    display: none !important;
}

#printDropdown div {
    background: #000000 !important;
    color: white !important;
}

.folder > .child-items {
    margin-left: 15px;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    background-color: #000000 !important; /* keep same bg */
    color: white !important;           /* keep same text color */
}


/* Style all input and select fields */
.form-control,
.form-select {
    background-color: #1a1a1a; /* light black background */
    color: white; /* text color */
    border: 1px solid #444; /* subtle dark border */
}

/* Style placeholder text for inputs */
.form-control::placeholder {
    color: #bbbbbb; /* lighter placeholder for contrast */
    opacity: 1; /* full opacity */
}

/* For dropdown option styling */
.form-select option {
    background-color: #1a1a1a; /* dark dropdown background */
    color: white;
}

/* Keep dark theme when focusing */
.form-control:focus,
.form-select:focus {
    background-color: #1a1a1a !important; /* stay light black */
    color: white !important;
    border-color: #00e651; /* green border */
    box-shadow: 0 0 0 0.2rem rgba(0, 230, 81, 0.25); /* subtle green glow */
}


#map-legend {
  position: absolute;
  bottom: 80px;
  right: 20px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 10px;
  font-size: 12px;
  border-radius: 6px;
  z-index: 1000;
  display: none;
}

.legend-title {
  font-weight: bold;
  margin-bottom: 5px;
  text-align: center;
}

.legend-container {
  display: flex;
  align-items: stretch;
}

.color-bar-vertical {
  width: 20px;
  height: 150px;
  border: 1px solid #333;
  margin-right: 8px;
}
.legend-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 12px;
  text-align: left;
}

/* Make BaseMap dropdown wider and cleaner */
.basemap-container .dropdown-menu {
    min-width: 200px;         /* give enough space */
    background-color: #000000;
    color: white;
    padding: 10px 15px;       /* extra padding for cleaner look */
    border-radius: 6px;
}

.basemap-container .form-check {
    margin-bottom: 6px;       /* spacing between options */
}

.basemap-container .form-check-label {
    white-space: nowrap;      /* prevent text from wrapping */
}


.close-btn {
        position: absolute;
        top: 5px;
        right: 8px;
        background: transparent;
        border: none;
        font-size: 20px;
        font-weight: bold;
        color: #fff;
        cursor: pointer;
        z-index: 1001;
    }

    .close-btn:hover {
        color: #ff5c5c;
    }



  
@media screen and (max-width: 426px) {
  .navbar .navbar-brand {
    font-size: 14px;
    text-align: center;
  }

  .toolbar-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    top: 55px;
  }

  .toolbar-container div,
  .toolbar-container div button {
    font-size: 12px;
    padding: 4px 6px;
  }

  .toolbar-container .btn-group {
    flex-direction: column;
  }

  .export-container {
    position: relative;
  }

  #map {
    height: calc(100vh - 120px); /* Adjust height so it doesn't overflow */
  }

  #basemap-panel {
    width: 90%;
    top: auto;
    bottom: 60px;
    right: 5%;
  }

  .my-location-btn {
    top: 110px;
    left: 5px;
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  .card,
  .query-container,
  #wms-input-panel,
  #add-feature-panel,
  #data-warehouse-panel {
    width: 90% !important;
    left: 5% !important;
    right: auto !important;
    top: auto !important;
    bottom: 10px !important;
  }

  /* Fix dropdowns overflow */
  .dropdown-menu {
    font-size: 12px;
    min-width: auto;
  }
}

.leaflet-tooltip.district-label {
    background: transparent;
    border: none;
    box-shadow: none;
    color: white;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
}

