/**
 * Location Picker Styles
 *
 * Styles for MapBox location picker component
 * Phase 6: Location Features
 */

/* Location search container */
.location-search-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.location-search-container input {
  flex: 1;
}

.location-search-container .btn-sm {
  white-space: nowrap;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

/* Map container */
.map-container {
  margin-top: 0.75rem;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
}

.location-map {
  width: 100%;
  height: 300px;
  min-height: 200px;
}

/* Map controls */
.map-controls {
  padding: 1rem;
  background: white;
  border-top: 1px solid var(--border-color, #ddd);
}

.form-label-sm {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary, #333);
}

.radius-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #4CAF50 0%, #FFC107 50%, #FF6B6B 100%);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.radius-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2196F3;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.radius-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2196F3;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Location display (when location is set) */
.location-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #E3F2FD;
  border: 1px solid #2196F3;
  border-radius: 8px;
  margin-top: 0.75rem;
}

.location-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.location-info strong {
  color: #1976D2;
  font-size: 0.95rem;
}

.location-info small {
  color: #555;
  font-size: 0.85rem;
}

.location-display .btn-icon {
  flex-shrink: 0;
  padding: 0.25rem 0.5rem;
  color: #1976D2;
}

.location-display .btn-icon:hover {
  background: rgba(33, 150, 243, 0.1);
}

/* MapBox marker customization */
.mapboxgl-marker {
  cursor: move;
}

.mapboxgl-popup-content {
  padding: 0.75rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .location-search-container {
    flex-direction: column;
  }

  .location-search-container .btn-sm {
    width: 100%;
  }

  .location-map {
    height: 250px;
  }
}

/* Dark mode support (if implemented later) */
@media (prefers-color-scheme: dark) {
  .map-container {
    border-color: #444;
    background: #2a2a2a;
  }

  .map-controls {
    background: #1e1e1e;
    border-top-color: #444;
  }

  .location-display {
    background: #1a237e;
    border-color: #3949AB;
  }

  .location-info strong {
    color: #64B5F6;
  }

  .location-info small {
    color: #ccc;
  }

  .form-label-sm {
    color: #eee;
  }
}
