/* General Layout */
body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
#app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

.main-content {
  display: flex;
  flex-grow: 1;
  overflow: hidden;
}

/* Sidebar & Legend */
.sidebar {
  width: 320px;
  background: #fff;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

#sidebar-left {
  border-right: 2px solid #ddd;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

#sidebar-right {
  border-left: 2px solid #ddd;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
}

.brand {
  background: #dc3545;
  color: white;
  padding: 20px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}
.brand h2 {
  margin: 0 0 5px 0;
  font-size: 22px;
}
#legend {
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
}
.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
}
.legend-icon {
  width: 24px;
  height: 24px;
  margin-right: 15px;
  object-fit: contain;
}
.legend-line {
  width: 24px;
  height: 4px;
  margin-right: 15px;
  background: #333;
  border-top: 2px solid white;
  border-bottom: 2px solid white;
  box-shadow: 0 0 0 1px #333;
}
.legend-poly {
  width: 24px;
  height: 16px;
  margin-right: 15px;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 2px,
    #ffcc00 2px,
    #ffcc00 4px
  );
  border: 2px solid #ffcc00;
}

/* Map Container */
#map {
  flex-grow: 1;
  height: 100%;
  background: #f8f9fa;
}

/* Label Styling: LSGD (Always visible, Halo effect) */
.lsgd-label {
  background: transparent;
  border: none;
  box-shadow: none;
  font-size: 16px;
  font-weight: bold;
  color: #1a202c;
  /* CSS Halo Effect */
  text-shadow:
    -2px -2px 0 #fff,
    2px -2px 0 #fff,
    -2px 2px 0 #fff,
    2px 2px 0 #fff;
}

/* Label Styling: Projects (Shows on Hover) */
.project-label {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #ccc;
  font-weight: 600;
  font-size: 13px;
  color: #333;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  padding: 4px 8px;
  border-radius: 4px;
}
/* Keep Road label rules as they were */
.road-label-text {
  fill: #333;
  font-weight: bold;
  font-size: 12px;
  text-shadow: 1px 1px 0 #fff;
  opacity: 0;
  transition: opacity 0.3s;
}
.zoomed-in .road-label-text {
  opacity: 1;
}
