/* 🌐 Reset & Base Styling */
html, body {
  height: 100%;                /* Full viewport height */
  margin: 0;
  padding: 0;
  overflow-x: hidden;          /* Prevent horizontal scroll */
  overflow-y: auto;            /* Allow vertical scroll */
  background-color: #f8f9fa;   /* Light gray base */
}

/* 🧱 App Layout - Main Flex Container */
.main-row {
  display: flex;
  flex-wrap: nowrap;              /* Keep sidebar & map in one row */
  height: calc(100vh - 56px);     /* Full height minus navbar */
}

/* 📐 Side Columns Setup */
.sidebar-col, .right-col {
  height: 100%;           /* Stretch to full height */
  overflow-y: auto;       /* Scrollable if content overflows */
}

/* 🗺️ Map Area Styling */
#map {
  width: 100%;
  height: 100%;
  flex-grow: 1;           /* Allow map to expand as much as possible */
}

/* 📊 Right Attribute Panel */
#attr-panel {
  min-height: 200px;              /* Minimum height for usability */
  border-left: 1px solid #ddd;    /* Separator from map */
  background-color: #f8f9fa;
  padding: 10px;
}

/* ➕ Add Layer Button */
#addUrlBtn {
  bottom: 20px;
  right: 20px;
  z-index: 1000;         /* Always on top */
}

/* 📍 Feature Info Box */
#featureInfo {
  border: 2px dashed #007bff;  /* Blue dotted border */
  padding: 10px;
  min-height: 100px;
  background-color: #fff;
}

/* 🎚️ Symbology & Controls */
.form-check-label {
  cursor: move;          /* Indicate draggable label */
}

/* ❗ Highlight invalid inputs */
.is-invalid {
  border: 2px solid red !important;
}

/* 📱 Mobile Responsiveness */
@media (max-width: 768px) {
  .main-row {
    display: block;
    height: auto;           /* Let height grow naturally */
  }

  .sidebar-col, .right-col {
    height: auto;
    border: none;
  }

  #map-wrapper {
    height: auto !important;
  }

  #map {
    height: 300px;          /* Fixed height for mobile */
  }

  #attr-panel {
    margin-top: 10px;
    border-top: 1px solid #ddd;
    border-left: none;
  }

  #addUrlBtn {
    right: 10px;
    bottom: 10px;
  }
}

div.dt-buttons {
  margin-bottom: 10px;
}

.leaflet-control-fullscreen {
  display: block !important;
  background-color: white;
}

/* ℹ️ Info Button Icon */
.btn-info-layer {
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 18px;
  text-align: center;
  line-height: 1;
}

/* ⚙️ Dropdown Tool Menu */
#layerToolMenu {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  font-size: 14px;
  user-select: none;
}
#layerToolMenu .list-group-item {
  cursor: pointer;
}
#layerToolMenu .list-group-item:hover {
  background-color: #f8f9fa;
}

/* 🌟 Floating Layer Tool Popup */
.tool-popup-box {
  position: absolute;
  z-index: 9999;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0.5rem;
  width: 180px;
  font-size: 0.85rem;
  max-height: 200px;       /* 🔁 Prevent overflow */
  overflow-y: auto;
}

/* 🧭 Tool Buttons inside the Popup */
.tool-popup-box button {
  width: 100%;
  margin-bottom: 6px;
  padding: 6px 10px;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.85rem;
  text-align: left;
  transition: all 0.2s ease-in-out;
}

/* 🎯 Hover Behavior for Tools */
.tool-popup-box button:hover {
  background-color: #e2e6ea;
  color: #000;
  cursor: pointer;
  transform: scale(1.02);      /* Subtle animation */
}

/* ❌ Style for Delete Button */
.tool-popup-box button:last-child {
  margin-bottom: 0;
  background-color: #ffecec;
  border-color: #f5c2c7;
  color: #dc3545;
}
.tool-popup-box button:last-child:hover {
  background-color: #f8d7da;
  color: #a30000;
}



