/* Search Modal Overlay */
.search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 3000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(2px);
}

.search-modal.active {
  display: flex;
}

.search-modal-content {
  background: #2b2b2b;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border: 1px solid #444;
}

.search-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #444;
}

.search-modal-header h3 {
  margin: 0;
  color: #e0e0e0;
  font-size: 1.2em;
}

.search-modal-close {
  background: none;
  border: none;
  color: #e0e0e0;
  font-size: 2em;
  cursor: pointer;
  padding: 0 5px;
  line-height: 1;
}

.search-modal-close:hover {
  color: #fff;
}

.search-modal-tabs {
  display: flex;
  border-bottom: 1px solid #444;
}

.search-tab {
  flex: 1;
  padding: 12px;
  background: #333;
  border: none;
  color: #aaa;
  cursor: pointer;
  font-size: 1em;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.search-tab.active {
  background: #2b2b2b;
  color: #fff;
  border-bottom-color: #4a90d9;
}

.search-tab:hover:not(.active) {
  background: #3a3a3a;
  color: #e0e0e0;
}

.search-modal-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

.search-tab-content {
  display: none;
}

.search-tab-content.active {
  display: block;
}

.search-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.search-input {
  flex: 1;
  padding: 10px 12px;
  background: #333;
  border: 1px solid #555;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 1em;
}

.search-input:focus {
  outline: none;
  border-color: #4a90d9;
  box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.2);
}

.search-btn {
  padding: 10px 20px;
  background: #4a90d9;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-size: 1em;
  white-space: nowrap;
}

.search-btn:hover {
  background: #3a7bc8;
}

.search-btn:disabled {
  background: #555;
  cursor: not-allowed;
}

.search-results {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #444;
  border-radius: 4px;
  background: #333;
}

.search-result-item {
  padding: 12px 15px;
  border-bottom: 1px solid #444;
  cursor: pointer;
  transition: background 0.2s;
}

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

.search-result-item:hover {
  background: #3a3a3a;
}

.search-result-item .result-name {
  font-weight: bold;
  color: #fff;
  margin-bottom: 4px;
}

.search-result-item .result-details {
  font-size: 0.9em;
  color: #aaa;
}

.search-result-item .result-type {
  font-size: 0.8em;
  color: #888;
  margin-top: 4px;
}

/* Loading state */
.search-loading {
  padding: 20px;
  text-align: center;
  color: #aaa;
}

/* No results */
.search-no-results {
  padding: 20px;
  text-align: center;
  color: #aaa;
}

.temp-search-marker {
  cursor: pointer;
}

.temp-marker-popup button {
  background: #4a90d9;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.temp-marker-popup button:hover {
  background: #3a7bc8;
}

/* POI type filter group */
.poi-filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.poi-filter-group label {
  color: #aaa;
  font-size: 0.9em;
  white-space: nowrap;
}

.poi-type-select {
  flex: 1;
  padding: 8px 10px;
  background: #333;
  border: 1px solid #555;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 0.9em;
  cursor: pointer;
}

.poi-type-select:focus {
  outline: none;
  border-color: #4a90d9;
}

.poi-type-select option,
.poi-type-select optgroup {
  background: #2b2b2b;
  color: #e0e0e0;
}

.browse-btn {
  background: #4a7a4a;  /* Distinct green color to differentiate from Search */
  white-space: nowrap;
}

.browse-btn:hover {
  background: #3a6a3a;
}

.browse-btn:disabled {
  background: #555;
  cursor: not-allowed;
}
