/* Location Picker Styles */

/* Modal customization */
#locationPickerModal .modal-content {
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

#locationPickerModal .modal-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e5e5e5;
  padding: 1.5rem;
}

#locationPickerModal .modal-title {
  font-weight: 600;
  color: #0E0E0E;
}

#locationPickerModal .modal-body {
  padding: 1.5rem;
}

/* Search box styling */
.location-search-box {
  position: relative;
}

.location-search-box .input-group {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.location-search-box .form-control {
  border: 1px solid #e5e5e5;
  padding: 12px 16px;
  font-size: 14px;
  border-right: none;
}

.location-search-box .form-control:focus {
  border-color: #C5A05E;
  box-shadow: none;
}

.location-search-box .btn-primary {
  background-color: #C5A05E;
  border-color: #C5A05E;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
}

.location-search-box .btn-primary:hover {
  background-color: #b08f4f;
  border-color: #b08f4f;
}

/* Search results dropdown */
.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  margin-top: 8px;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid #f5f5f5;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: #f8f9fa;
}

.search-result-item .result-icon {
  width: 36px;
  height: 36px;
  background-color: #f0f0f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.search-result-item .result-icon i {
  color: #C5A05E;
  font-size: 16px;
}

.search-result-item .result-text {
  flex: 1;
}

.search-result-item .result-name {
  font-size: 14px;
  color: #0E0E0E;
  margin-bottom: 0;
  line-height: 1.4;
}

.search-result-item .result-name strong {
  color: #C5A05E;
  font-weight: 600;
}

/* Map container */
#map {
  border: 1px solid #e5e5e5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Leaflet marker customization */
.leaflet-marker-icon {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Selected address display */
.selected-address {
  background-color: #f8f9fa;
  padding: 16px;
  border-radius: 8px;
  border-left: 4px solid #C5A05E;
}

.selected-address strong {
  color: #0E0E0E;
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.selected-address p {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

/* Location picker input styling */
.location-picker-input {
  cursor: text !important;
  background-color: white !important;
}

/* Ensure suggestion container can absolute-position relative to input */
.search-inputs {
  position: relative;
}

/* Per-input suggestions dropdown */
.lp-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  margin-top: 8px;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.lp-result-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
}

.lp-result-item:last-child { border-bottom: none; }

.lp-result-item .result-icon { width: 36px; height: 36px; display:flex;align-items:center;justify-content:center;margin-right:10px; }
.lp-result-item .result-name { font-size: 14px; color: #0E0E0E; }
.lp-result-item:hover, .lp-result-item.active { background-color: #f8f9fa; }

.location-picker-input:hover {
  border-color: #C5A05E !important;
}

/* Modal footer */
#locationPickerModal .modal-footer {
  border-top: 1px solid #e5e5e5;
  padding: 1rem 1.5rem;
}

#locationPickerModal .modal-footer .btn {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
}

#locationPickerModal .modal-footer .btn-secondary {
  background-color: #6c757d;
  border-color: #6c757d;
}

#locationPickerModal .modal-footer .btn-primary {
  background-color: #C5A05E;
  border-color: #C5A05E;
}

#locationPickerModal .modal-footer .btn-primary:hover {
  background-color: #b08f4f;
  border-color: #b08f4f;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #locationPickerModal .modal-dialog {
    margin: 1rem;
  }
  
  #map {
    height: 300px !important;
  }
  
  .search-results-dropdown {
    max-height: 200px;
  }
}

/* Scrollbar styling for search results */
.search-results-dropdown::-webkit-scrollbar {
  width: 8px;
}

.search-results-dropdown::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.search-results-dropdown::-webkit-scrollbar-thumb {
  background: #C5A05E;
  border-radius: 4px;
}

.search-results-dropdown::-webkit-scrollbar-thumb:hover {
  background: #b08f4f;
}
