/* Header Components - Search, Settings, Toolbar */

/* Search Row */
.search-row {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 8px 12px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.1);
  min-width: 300px;
  max-width: 500px;
}

.search-field {
  flex: 1;
  min-width: 0;
}

.search-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
}

.search-actions {
  display: flex;
  gap: 4px;
}

.search-actions button {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

#btnSearch {
  background: #007bff;
  color: white;
}

#btnNear {
  background: #28a745;
  color: white;
}

.btn-icon {
  background: #6c757d;
  color: white;
  padding: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Settings Toggle */
.settings-toggle {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  font-size: 18px;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.settings-toggle:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 1);
}

/* Map Layers Toggle */
.map-layers-toggle {
  position: fixed;
  top: 60px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  font-size: 16px;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.map-layers-toggle:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 1);
}

.map-layers-toggle.active {
  background: #007bff;
  color: white;
  box-shadow: 0 4px 20px rgba(0, 123, 255, 0.3);
}

.map-layers-toggle.active:hover {
  background: #0056b3;
}

/* Toolbar (Map Controls) */
.toolbar {
  position: fixed;
  top: 120px;
  right: 12px;
  z-index: 1000;
  display: none; /* Hidden by default */
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.toolbar.show {
  display: flex; /* Show when active */
  opacity: 1;
  transform: translateY(0);
}

.toolbar .group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toolbar .btn {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
  min-width: 80px;
  text-align: left;
}

.toolbar .btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
}

.toolbar .btn.active {
  background: #007bff;
  color: white;
}

/* Satellite Options */
.satellite-options {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.option-label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  margin-bottom: 6px;
  text-align: center;
}

.radio-option {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  margin: 2px 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 13px;
}

.radio-option:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

.radio-option input[type="radio"] {
  margin: 0 8px 0 0;
  cursor: pointer;
}

.radio-option input[type="radio"]:checked + .radio-text {
  font-weight: 600;
  color: #007bff;
}

.radio-text {
  flex: 1;
  color: #333;
}

/* Professional Satellite Labels Styling */
.satellite-labels-overlay {
  /* Clean white text with subtle dark outline */
  filter: drop-shadow(1px 1px 0px rgba(0, 0, 0, 0.9)) 
          drop-shadow(-1px -1px 0px rgba(0, 0, 0, 0.9))
          drop-shadow(1px -1px 0px rgba(0, 0, 0, 0.9))
          drop-shadow(-1px 1px 0px rgba(0, 0, 0, 0.9))
          brightness(1.2)
          contrast(1.3);
  
  /* Clean typewriter-style font */
  font-family: 'Courier New', 'Monaco', 'Consolas', 'Lucida Console', monospace !important;
  font-weight: 600 !important;
  font-variant: small-caps !important; /* Makes text appear in small capitals */
  text-rendering: optimizeLegibility;
  
  /* Clean, crisp rendering */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Enhanced label contrast and readability */
.leaflet-tile-pane .satellite-labels-overlay {
  mix-blend-mode: normal;
  opacity: 1 !important;
}

/* Additional styling for better label visibility */
.leaflet-container .satellite-labels-overlay {
  /* Ensure labels are crisp and readable */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  
  /* Force pure snow white text */
  color: #ffffff !important;
  
  /* Text transformation for clean appearance */
  text-transform: capitalize !important; /* Makes first letter of each word uppercase */
  letter-spacing: 0.5px; /* Slight spacing for typewriter effect */
}

/* Override any default text colors */
.satellite-labels-overlay * {
  color: #ffffff !important;
  fill: #ffffff !important;
  stroke: #000000 !important;
  stroke-width: 1px !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .search-row {
    top: 8px;
    left: 8px;
    right: 8px;
    transform: none;
    min-width: auto;
    max-width: none;
  }
  
  .settings-toggle {
    top: 8px;
    right: 8px;
  }
  
  .map-layers-toggle {
    top: 56px;
    right: 8px;
  }
  
  .toolbar {
    top: 116px;
    right: 8px;
  }
}
