/* Base Variables */
:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Light Theme */
  --bg-color: #f7f9fc;
  --surface-color: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --accent-color: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.4);

  --hazard-color: #ef4444;
  --hazard-bg: #fee2e2;
  --caution-color: #f59e0b;
  --caution-bg: #fef3c7;
  --ok-color: #10b981;
  --no-data-color: #94a3b8;
  --notable-stop-color: #eab308;
  --notable-stop-bg: #fef08a;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.5);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

[data-theme="dark"] {
  --bg-color: #0f172a;
  --surface-color: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --border-color: #334155;
  --glass-bg: rgba(30, 41, 59, 0.85);

  --hazard-bg: rgba(239, 68, 68, 0.15);
  --caution-bg: rgba(245, 158, 11, 0.15);
  --notable-stop-bg: rgba(234, 179, 8, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2.5rem;
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  z-index: 10;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-form {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
}

.input-group {
  display: flex;
  flex-direction: column;
}

.input-group label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.input-group input,
.input-group select {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  outline: none;
  transition: all 0.2s;
}

.input-group input:focus,
.input-group select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Autocomplete */
.autocomplete-wrapper {
  position: relative;
  width: 100%;
}

.autocomplete-dropdown {
  position: fixed !important;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
  max-height: 250px;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}

.autocomplete-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background-color 0.2s;
  border-bottom: 1px solid var(--border-color);
}

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

.autocomplete-item:hover {
  background-color: var(--bg-color);
  color: var(--accent-color);
}

.hidden {
  display: none !important;
}

/* Stop Pills */
.stop-pills-container {
  display: flex;
  gap: 0.5rem;
  margin-right: 1rem;
  max-width: 300px;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.stop-pill {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  animation: slide-in 0.3s ease-out;
}

.stop-pill .remove-stop {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.stop-pill .remove-stop:hover {
  opacity: 1;
  color: var(--hazard-color);
}

@keyframes slide-in {
  from {
    transform: translateX(10px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-color), #2563eb);
  color: white;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  height: 40px;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2), var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  box-shadow: 0 0 15px var(--accent-glow), var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--surface-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-secondary:hover {
  background-color: var(--bg-color);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.btn-icon {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.btn-icon:hover {
  background-color: var(--border-color);
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Main Layout */
.app-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Map Area */
.map-container {
  flex: 1;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--glass-bg);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--text-primary);
  font-weight: 600;
}

.overlay.hidden {
  display: none;
}

.spinner {
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--accent-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.banner {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--caution-bg);
  border: 1px solid var(--caution-color);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  font-weight: 500;
  font-size: 0.85rem;
}

.banner.hidden {
  display: none;
}

/* Side Panel (Glassmorphism) */
.side-panel {
  width: 380px;
  background-color: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 10;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.05);
  overflow-y: auto;
  transition: transform 0.3s ease;
}

/* Accordions */
.accordion {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 0.5rem;
}

.accordion-item {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.accordion-item:hover {
  box-shadow: var(--shadow-md);
}

.accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.2s;
}

.accordion-header:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .accordion-header:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.accordion-chevron {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
  color: var(--text-secondary);
}

.accordion-item.active .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1rem;
  background-color: var(--bg-color);
  /* slightly inset background */
}

.accordion-item.active .accordion-content {
  max-height: 2000px;
  /* arbitrary large value to let contents expand smoothly */
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

.tab-pane,
.tab-content {
  display: block;
}

/* fallback legacy overrides if any exist */

/* Timeline specific */
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.timeline-header select {
  padding: 0.25rem;
  border-radius: 4px;
  background: var(--bg-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.timeline-list {
  list-style: none;
  position: relative;
}

.timeline-list::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 15px;
  bottom: 0;
  width: 2px;
  background-color: var(--border-color);
  z-index: 0;
}

.timeline-item {
  position: relative;
  padding: 0.75rem 0.5rem 0.75rem 2.5rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  z-index: 1;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.timeline-item:hover {
  transform: translateX(4px);
  background-color: rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .timeline-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.timeline-marker {
  position: absolute;
  left: 5px;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--surface-color);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.timeline-item.hazard .timeline-marker {
  border-color: var(--hazard-color);
}

.timeline-item.caution .timeline-marker {
  border-color: var(--caution-color);
}

.timeline-time {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  display: block;
}

.timeline-loc {
  font-weight: 500;
  margin: 0.25rem 0;
}

.timeline-weather {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.timeline-weather.hazard {
  color: var(--hazard-color);
  font-weight: 600;
}

.timeline-weather.caution {
  color: var(--caution-color);
  font-weight: 600;
}

.timeline-weather.no-data {
  color: var(--no-data-color);
  font-style: italic;
}

.break-suggestion {
  background-color: var(--caution-bg);
  color: var(--caution-color);
  padding: 0.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

/* Places Cards */
.places-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.place-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--surface-color);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.place-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-color);
}

.place-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  background-color: var(--border-color);
}

.place-info {
  padding: 1rem;
}

.place-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.place-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.place-link {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  background-color: var(--accent-color);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background-color 0.2s;
}

.place-link:hover {
  background-color: var(--accent-hover);
}

/* Filter Chips */
.filter-chip {
  border-radius: 20px;
  font-size: 0.75rem;
  white-space: nowrap;
  padding: 0.4rem 0.8rem;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

.filter-chip:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background-color: rgba(59, 130, 246, 0.05);
}

.filter-chip.active {
  background-color: var(--accent-color) !important;
  color: white !important;
  border-color: var(--accent-color) !important;
}

/* Cost Summary */
.cost-summary-card {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.cost-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.cost-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 1rem 0;
}

.cost-row.total {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 0;
}

/* Modal */
.modal {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-color);
  color: var(--text-primary);
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  max-width: 400px;
  width: 90%;
  margin: auto;
  /* center in viewport */
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

/* Phase 3 UX Polish Elements */
.input-hint {
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-left: 0.25rem;
  font-style: italic;
}

.form-error {
  color: var(--hazard-color);
  background: var(--hazard-bg);
  padding: 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--hazard-color);
  max-width: 250px;
}

.form-error.hidden {
  display: none;
}

.app-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-secondary);
  background: var(--bg-color);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  margin-top: 2rem;
}

.app-empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.app-empty-state h4 {
  color: var(--text-primary);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.app-empty-state p {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.empty-state-hint {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  text-align: left;
  background: var(--surface-color);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.empty-state-hint p {
  margin: 0;
  font-size: 0.85rem;
}

/* New Highlight Interactions */
.timeline-highlight-pulse {
  animation: bg-pulse 2s ease-out;
}

@keyframes bg-pulse {
  0% {
    background-color: var(--accent-color);
    color: white;
  }

  100% {
    background-color: var(--surface-color);
  }
}

.map-marker-highlight {
  z-index: 1000 !important;
  box-shadow: 0 0 12px 6px var(--accent-color) !important;
  border-color: var(--accent-color) !important;
  transition: box-shadow 0.2s, border-color 0.2s;
}

/* Map Summary Overlay */
.map-overlay {
  position: absolute;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  padding: 0.5rem 1.5rem;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.3s, transform 0.3s;
}

.map-overlay.hidden {
  opacity: 0;
  transform: translate(-50%, -10px);
  pointer-events: none;
}

.summary-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-icon-tiny {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-tiny:hover {
  color: var(--text-primary);
}

/* Flight & Car Cards */
.flight-card {
  border-left: 4px solid var(--accent-color);
}

.car-card {
  border-left: 4px solid var(--caution-color);
}

/* Notable Stop Markers on Map */
.notable-stop-marker {
  position: absolute;
  left: 5px;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--surface-color);
  border: 3px solid var(--notable-stop-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.notable-stop-marker:hover {
  transform: scale(1.15);
  box-shadow: 0 0 12px var(--notable-stop-color);
  z-index: 1001 !important;
}

/* Place Card Hover Transition for UX */
.place-card:hover {
  border-color: var(--accent-color);
  box-shadow: var(--shadow-md);
}

/* Mobile Drawers & Responsiveness */
.mobile-only {
  display: none;
}

@media (max-width: 900px) {
  .mobile-only {
    display: inline-flex;
  }

  .side-panel {
    position: absolute;
    top: 65px;
    /* approx header height */
    bottom: 0;
    right: 0;
    height: calc(100vh - 65px);
    width: 350px;
    max-width: 90vw;
    transform: translateX(100%);
    /* hidden by default */
    z-index: 999;
  }

  .side-panel.open {
    transform: translateX(0);
  }

  /* Make header stack gracefully */
  .search-form {
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .logo {
    display: none;
    /* reclaim space if too tight, or scale down */
  }
}


/* Responsive */
@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }

  .side-panel {
    width: 100%;
    height: 50vh;
    border-left: none;
    border-top: 1px solid var(--border-color);
  }

  .search-form {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .input-group {
    flex: 1 1 45%;
  }
}

/* Inline Stops & SortableJS */
.inline-stops-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0 0.5rem;
  scrollbar-width: none;
}

.inline-stops-wrapper::-webkit-scrollbar {
  display: none;
}

.stop-pills-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stop-pill {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  cursor: grab;
  transition: all 0.2s ease;
  user-select: none;
}

.stop-pill:active {
  cursor: grabbing;
}

.stop-pill:hover {
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.sortable-ghost {
  opacity: 0.4;
  background-color: var(--bg-color);
  border: 1px dashed var(--accent-color);
}

.stop-pill .drag-handle {
  opacity: 0.4;
  cursor: grab;
  font-size: 1rem;
  margin-right: -2px;
}

.stop-pill .stop-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.stop-pill .remove-stop {
  cursor: pointer;
  opacity: 0.6;
  margin-left: 0.25rem;
  font-size: 0.8rem;
}

.stop-pill .remove-stop:hover {
  opacity: 1;
  color: #ef4444;
}

.btn-add-stop {
  height: 32px;
  width: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-color);
  border: 1px dashed var(--accent-color);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-add-stop:hover {
  background: var(--accent-color);
  color: white;
  border-style: solid;
}

/* Mobile Bottom Nav */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface-color);
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0.5rem;
  z-index: 2000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
}

.mobile-nav-item span {
  font-size: 1.2rem;
}

.mobile-nav-item.active {
  color: var(--accent-color);
}

/* ── Autocomplete Dropdown ────────────────────────────────────────────────────
   Must use position:fixed to escape overflow:hidden parents (map container).
   z-index:9999 overrides Leaflet (400–600) and mobile nav (2000).           */
.autocomplete-dropdown {
  position: fixed;
  z-index: 9999;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  max-height: 240px;
  overflow-y: auto;
  min-width: 200px;
}

.autocomplete-dropdown.hidden {
  display: none;
}

.autocomplete-item {
  padding: 0.6rem 0.875rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.12s ease;
}

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

.autocomplete-item:hover,
.autocomplete-item:focus {
  background: var(--accent-color);
  color: #fff;
  outline: none;
}

/* Map Style Switcher */
.map-style-switcher {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
  display: flex;
  gap: 4px;
  margin: 10px;
  box-shadow: var(--shadow-md);
  z-index: 1000;
}

.map-style-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.map-style-btn:hover {
  background: var(--border-color);
}

.map-style-btn.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* Mobile adjustments for map switcher */
@media (max-width: 768px) {
  .map-style-switcher {
    margin: 5px;
    padding: 2px;
  }
  .map-style-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
  }
}
