/* ============================================
   MAP CONTAINER & CONTROLS
   ============================================ */

/* Map wrapper */
#map-wrapper {
  position: relative;
  margin: 20px 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

/* Map canvas */
#map {
  width: 100%;
  height: 500px;
  position: relative;
}

/* Map controls panel */
#map-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-width: 280px;
  max-height: 480px;
  overflow-y: auto;
  z-index: 1000;
}

/* Layer control buttons (Show All / Hide All) */
.layer-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: #374151;
}

.layer-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.layer-btn:active {
  background: #e5e7eb;
}

/* Checkboxes container */
.layer-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Individual layer item */
.layer-item {
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 13px;
  line-height: 1.4;
}

.layer-item:hover {
  background: #f3f4f6;
}

/* Checkbox */
.layer-checkbox {
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
}

/* Style preview line */
.style-preview {
  flex-shrink: 0;
}

/* Map labels (tooltips) */
.leaflet-tooltip.map-label {
  background: rgba(17, 24, 39, 0.85);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.leaflet-tooltip.map-label::before {
  display: none; /* Remove arrow */
}

/* Mobile adjustments */
@media (max-width: 768px) {
  #map {
    height: 400px;
  }
  
  #map-controls {
    display: none; /* Κρύβεται στο mobile - δεν χρειάζεται */
  }
  
  #map-wrapper {
    flex-direction: column;
  }
}

/* Scrollbar styling for controls */
#map-controls::-webkit-scrollbar {
  width: 6px;
}

#map-controls::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 3px;
}

#map-controls::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

#map-controls::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Control header */
#map-controls h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Hierarchy badge */
.hierarchy-badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f3f4f6;
  color: #6b7280;
  margin-left: 4px;
  font-weight: 600;
  text-transform: uppercase;
}
