 html,
 body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden; /* 🔑 Prevent unwanted scrollbars */
    box-sizing: border-box;
    
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
 }

 #main-container {
    display: flex;
    flex-direction: row;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

 #map {
    position: relative;
    left: 0%;
    width: 100%;
    height: 100%;
    border-style: solid;
    border-color: black;
    border-width: thin;
    transition: width 0.3s ease; /* Add this line */
}

/* Add a new class to shrink the map width when legend is open */
#map.shrunk {
    width:70%;
}

#map .btn {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: red !important; /* 🔴 Red text */
  font-weight: bold;
  text-transform: uppercase;
  padding: 4px 8px;
  cursor: pointer;
}

#map .btn:hover {
  text-decoration: underline;
}

 .floating-title {
    position: absolute;
    top: 1%;  /* Adjust as needed */
    left: 50%;
    transform: translateX(-50%);
    z-index: 999; /* Make sure it stays on top */
    background-color: rgba(255, 255, 255, 0.3); /* Transparent background */
    padding: 5px 10px;
    border-radius: 0px;
    font-size: 25px;
    font-weight: bolder;
    text-align: center;
}

#logo {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 135px;
    height: auto;
    z-index: 1001;
}

#logo1 {
    position: absolute;
    top: 10px;
    left: 40px;
    width: 150px;
    height: auto;
    z-index: 1001;
}

#query_tab {
    padding: 0.5% 0%;
    font-size: 10px;
    width: 0%;
    height: 100%;
    border-style: solid;
    border-color: black;
    border-width: thin;
    overflow-y: auto;
    z-index: 1000;
    transition: width 0.3s ease;
}

 #nav-tabContent {
    font-size: 12px;  
 }

 #legend {
    width: 0%;
    transition: width 0.3s ease;
    overflow-y: auto;
    background-color: #ffffff;
    font-weight: lighter;
    border-left: 1px solid grey;
    padding: 4px;
    z-index: 1;
}

#legend p strong { font-weight: 700 !important; }

#legend.visible-legend {
    width: 30%;
}

#legend-title {
    font-weight: bold; /* Make the title bold */
}

#layer {
     position: relative;
     width: 85%;
 }

 #attributes {
     position: relative;
     width: 85%;
 }

 #operator {
     position: relative;
     width: 85%;
 }

 #value {
     position: relative;
     width: 85%;
 }

 #layer1 {
     position: relative;
     width: 85%;
 }

 #draw_type {
     position: relative;
     width: 85%;
 }

 #table_data {
    position: absolute;
    bottom: 0%;
    overflow-x: auto;
    overflow-y: auto;
    height: 0%;
    border: 1px solid #4CAF50;
    box-sizing: border-box;
    transition: all 0.3s ease;
}


 #table {
     white-space: nowrap;
     grid-template-areas: "head-fixed""body-scrollable";
 }


 #table th {
     position: -webkit-sticky;
     /* for Safari */
     position: sticky;
     top: 0px;
     background-color: rgb(122, 209, 100);
 }

 #wms_layers_btn {
     position: absolute;
     z-index: 600;
     top: 10%;
     left: 25%;
 }

 #query_panel_btn {
     position: absolute;
     z-index: 600;
     top: 10%;
     left: 5%;
 }

 #legend_btn {
     position: absolute;
     z-index: 600;
     bottom: 6%;
     right: 0%;
 }

 #perception_btn {
    position: absolute;
    bottom: 7.5%;
    left: 1%;
    z-index: 600;
 }

#table_wms_layers {
    width: 100%;
    table-layout: auto; /* allow automatic sizing */
    border-collapse: collapse;
}

#table_wms_layers th, 
#table_wms_layers td {
    padding: 8px;
    border: 1px solid #ccc;
    text-align: left;
    vertical-align: top;
    word-wrap: break-word;
    white-space: normal;  /* ✅ allow text to wrap */
}

#table_wms_layers th {
    position: sticky;
    top: 0;
    background-color: rgb(122, 209, 100);
    z-index: 1;
}

 .modal-dialog {
     max-width: 60% !important;
     height: 60% !important;
     top: 18% !important;

 }

 #wms_layers_window {
    position: fixed; /* Keep the modal fixed on the viewport */
    z-index: 1060; /* Higher z-index to be above other elements */
}

 
 #clear_btn {
     position: absolute;
     z-index: 500;
     top: 10%;
     left: 50%;

 }

 
 #measuretype {
     position: absolute;
     z-index: 600;
     top: 10%;
     left: 60%;
     width: 15%;
 }

 #scale_bar {

     position: absolute;
     z-index: 500;
     bottom: 5%;
     left: 20%;
 }

 
 .ol-popup {
    position: absolute;
    background-color: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #cccccc;
    bottom: 12px;
    left: -50px;
    max-width: 400px;
    max-height: 400px;
  }
  
  
  .ol-popup:after, .ol-popup:before {
    top: 100%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
  }
  .ol-popup:after {
    border-top-color: white;
    border-width: 10px;
    left: 48px;
    margin-left: -10px;
  }
  .ol-popup:before {
    border-top-color: #cccccc;
    border-width: 11px;
    left: 48px;
    margin-left: -11px;
  }
  .ol-popup-closer {
    text-decoration: none;
    position: absolute;
    top: 2px;
    right: 8px;
  }
  .ol-popup-closer:after {
    content: "✖";
  }

.ol-popup-content {
     max-width: 400px;
     background-color: white;
     font-size: 10px;
 } 

 .ol-scale-step-text {
     color: red;
 }

 .ol-scale-text {
     color: red;
     font-weight: bold;
 }

 .ol-scale-singlebar {
    position: relative;
    height: 10px;
    z-index: 9;
    bottom:5%;
    box-sizing: border-box;
    border: 1px solid #000;
}

 .layer-switcher.shown {
     max-height: 465px;
     width: 150px ;
      }

  /* Adjust the font size for the LayerSwitcher */
  .layer-switcher .panel {
    font-size: small; /* Change to your desired font size */
}

.layerswitcher label {
    font-size: 9px; /* Adjust font size for layer labels */
}

.layerswitcher button {
    font-size: 9px; /* Adjust font size for any buttons in the LayerSwitcher */
}

.layerswitcher .group-label {
    font-size: 9px; /* Adjust font size for group labels */
}
    

 .ol-control button {
     background-color: rgba(40, 40, 40, 0.8) !important;
 }

 .ol-control button:hover {
     background-color: rgba(40, 40, 40, 1) !important;
 }

 .ol-mouse-position {
     top: 95%;
     left: 0.5%;
     position: absolute;
     font-size: 14px;

     font-weight: bold;
 }

 .ol-zoom-extent {
     top: 3.8em;
     left: 0.5em;
     position: absolute;
 }

 .ol-zoomslider {
     top: 5.8em;
     left: 0.5em;
     position: absolute;
     height: 200px;
 }

 .ol-geocoder.gcd-gl-container {
     top: 21.875em;
     left: 0.5em;
     position: absolute;
 }



 .tooltip {
     position: relative;
     background: rgba(0, 0, 0, 0.5);
     border-radius: 4px;
     color: white;
     padding: 4px 8px;
     opacity: 0.7;
     white-space: nowrap;
 }

 .tooltip-measure {
     opacity: 1;
     font-weight: bold;
 }

 .tooltip-static {
     background-color: #ffcc33;
     color: black;
     border: 1px solid white;
 }

 .tooltip-measure:before,
 .tooltip-static:before {
     border-top: 6px solid rgba(0, 0, 0, 0.5);
     border-right: 6px solid transparent;
     border-left: 6px solid transparent;
     content: "";
     position: absolute;
     bottom: -6px;
     margin-left: -7px;
     left: 50%;
 }

 .tooltip-static:before {
     border-top-color: #ffcc33;
 }

 
 .modal-body {
    max-height: 500px; /* Adjust this height as needed */
    overflow-y: auto;  /* Enable vertical scrolling */
    overflow-x: auto;  /* Enable horizontal scrolling */
}

.perception-modal {
  position: absolute;
  top: 10%;
  left: 30%;
  width: 40%;
  max-height: 60vh;               /* Set maximum height relative to viewport */
  overflow-y: auto;               /* Enable vertical scroll if content overflows */
  background-color: white;
  border: 1px solid #ccc;
  padding: 15px;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
  z-index: 9999;
}

#fullscreen-image-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.8);
  display: none; /* hidden by default */
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

#fullscreen-image-overlay img {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 15px white;
  cursor: pointer;
}

#timeLabel {
  position: absolute;
  bottom: 75px;
  right: 20px;
  background: rgba(255,255,255,0.8);
  padding: 6px 20px;
  font-weight: bold;
  font-size: 16px;
  border-radius: 4px;
  z-index: 1000;
}

#closeTimeLabel {
    position:absolute; 
    right:4px; 
    top:7px; 
    cursor:pointer; 
    font-size:18px;
}

#closeTimeLabel:hover {
  color: #000;
}

#stopContainer {
  display: none;
  position: absolute;
  bottom: 75px;
  right: 32px;
  z-index: 2000;
  background: rgba(255,255,255,0.97);
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  padding: 10px 10px 10px 10px;
  font-family: sans-serif;
  font-size: 12px;
  min-width: 150px;
}

#stopCloseBtn {
  position: absolute;
  top: 6px;
  right: 12px;
  font-size: 22px;
  color: #444;
  cursor: pointer;
  font-weight: bold;
  opacity: 0.6;
  transition: opacity 0.2s;
}
#stopCloseBtn:hover {
  opacity: 1;
  color: #000;
}

.legendRow {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.legendRow:last-child {
  margin-bottom: 0;
}

.legendCircle {
  display: inline-block;
  width: 16px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #fff;
  margin-right: 12px;
  box-shadow: 0 0 0 1.5px #aaa;
}
.legendCircle.origin {
  background: #ff0000;
}
.legendCircle.intermediate {
  background: #000;
}
.legendCircle.destination {
  background: #0000ff;
}
