.search-form { display: flex; gap: 8px; margin-bottom: 8px; position: relative; }
.search-wrap { flex: 1; position: relative; }
.search-input {
  width: 100%; background: #161b22; border: 1px solid #30363d; border-radius: 8px;
  padding: 12px 14px; color: #f0f6fc; font-size: 16px; font-weight: 500;
  font-family: inherit; outline: none;
}
.search-input:focus { border-color: #58a6ff; }
.search-input::placeholder { color: #484f58; }
.search-dropdown {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  background: #161b22; border: 1px solid #58a6ff; border-top: none;
  border-radius: 0 0 8px 8px; z-index: 100; max-height: 200px; overflow-y: auto;
}
.search-dropdown.open { display: block; }
.search-dropdown-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; font-size: 14px; color: #e6edf3; cursor: pointer;
  border-bottom: 1px solid #21262d;
}
.search-dropdown-item:last-child { border-bottom: none; }
.search-dropdown-item:hover { background: #21262d; }
.search-dropdown-item .item-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-dropdown-current { border-bottom: 1px solid #30363d; }
.search-dropdown-current .item-label { color: #58a6ff; }
.search-dropdown-item .item-delete { color: #484f58; font-size: 16px; line-height: 1; padding: 0 0 0 12px; flex-shrink: 0; }
.search-dropdown-item .item-delete:hover { color: #f85149; }
.search-btn {
  background: #21262d; border: 1px solid #30363d; border-radius: 8px;
  padding: 10px 16px; color: #e6edf3; font-size: 14px; font-family: inherit;
  cursor: pointer; align-self: flex-start; height: 46px;
}
.search-btn:hover { background: #30363d; }
.search-hint { font-size: 11px; color: #484f58; margin-bottom: 18px; }
/* Subtle top progress bar shown while a location is being looked up. */
.loading-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  z-index: 9999; overflow: hidden; pointer-events: none;
  opacity: 0; transition: opacity 0.25s ease;
}
.loading-bar.active { opacity: 1; }
.loading-bar::before {
  content: ''; position: absolute; top: 0; height: 100%; width: 35%;
  background: linear-gradient(90deg, transparent, #58a6ff, transparent);
  animation: loading-slide 1.1s infinite ease-in-out;
}
@keyframes loading-slide {
  0% { left: -35%; }
  100% { left: 100%; }
}
/* Spinner card shown over the page during a lookup (issue #35). It fades in
   after 150 ms so fast lookups don't flash, and it covers the page so a
   second tap can't start a second lookup. */
.loading-overlay {
  position: fixed; inset: 0; z-index: 9998;
  display: flex; align-items: center; justify-content: center;
  background: rgba(13, 17, 23, 0.6);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}
.loading-overlay.active {
  opacity: 1; visibility: visible;
  transition: opacity 0.2s ease 0.15s, visibility 0s linear 0s;
}
.loading-card {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 22px 28px; max-width: 80vw;
  background: #161b22; border: 1px solid #30363d; border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}
.loading-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid #30363d; border-top-color: #58a6ff;
  animation: loading-spin 0.8s linear infinite;
}
.loading-text { color: #e6edf3; font-size: 15px; line-height: 1.4; text-align: center; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
@keyframes loading-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.search-btn:disabled { opacity: 0.6; cursor: progress; }
@media (prefers-reduced-motion: reduce) {
  .loading-spinner { animation: none; border-color: #58a6ff; }
  .loading-text { animation: loading-pulse 1.6s ease-in-out infinite; }
  .loading-bar::before { animation: none; left: 0; width: 100%; opacity: 0.6; }
}
