/* ================================================================
   MapSearch App — App-Specific Styles
   Extracted from design prototype inline styles.
   Requires: design-system.css, layout.css, components.css loaded first.
   ================================================================ */

/* ================================================================
   Accent Color Override
   Teal/Cyan accent that pops on dark map tiles
   ================================================================ */

:root,
[data-theme="light"],
[data-theme="dark"],
[data-theme="system"] {
  /* Emerald — primary actions (Search button, CTA, links) */
  --accent-400: #34d399;
  --accent-500: #10b981;
  --accent-600: #059669;

  /* Violet — secondary accent (filters, toggles, badges) */
  --violet-400: #a78bfa;
  --violet-500: #8b5cf6;
  --violet-600: #7c3aed;

  /* Amber — warm accent (credits, stars, warnings) — muted */
  --amber-400: #e2a336;
  --amber-500: #c4892a;
  --amber-600: #a16f22;

  /* Rose — status accent (errors, "no" states, alerts) */
  --rose-400: #fb7185;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;

  /* Sky — info accent (map pins, info badges) */
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
}

:root,
[data-theme="light"] {
  --interactive-bg:        var(--accent-600);
  --interactive-bg-hover:  var(--accent-500);
  --interactive-bg-active: var(--accent-600);
  --border-focus:          var(--violet-500);
  --text-link:             var(--accent-600);
  --text-link-hover:       var(--accent-500);
  --shadow-focus:          0 0 0 3px rgba(139, 92, 246, 0.25);
  --table-sort-active:     var(--violet-600);
  --map-pin-default:       var(--rose-500);
  --map-pin-cluster:       var(--violet-500);
  --color-primary-500:     var(--accent-500);
  --color-primary-600:     var(--accent-600);
}

[data-theme="dark"] {
  --interactive-bg:        var(--accent-500);
  --interactive-bg-hover:  var(--accent-400);
  --interactive-bg-active: var(--accent-600);
  --border-focus:          var(--violet-400);
  --text-link:             var(--accent-400);
  --text-link-hover:       var(--accent-300, #6ee7b7);
  --shadow-focus:          0 0 0 3px rgba(139, 92, 246, 0.35);
  --table-sort-active:     var(--violet-400);
  --map-pin-default:       var(--rose-400);
  --map-pin-cluster:       var(--violet-400);
  --color-primary-500:     var(--accent-500);
  --color-primary-400:     var(--accent-400);
}

@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    --interactive-bg:        var(--accent-500);
    --interactive-bg-hover:  var(--accent-400);
    --interactive-bg-active: var(--accent-600);
    --border-focus:          var(--violet-400);
    --text-link:             var(--accent-400);
    --text-link-hover:       var(--accent-300, #6ee7b7);
    --shadow-focus:          0 0 0 3px rgba(139, 92, 246, 0.35);
    --table-sort-active:     var(--violet-400);
    --map-pin-default:       var(--rose-400);
    --map-pin-cluster:       var(--violet-400);
    --color-primary-500:     var(--accent-500);
    --color-primary-400:     var(--accent-400);
  }
}

/* ================================================================
   Header: frosted glass floating over the map
   ================================================================ */
.header--glass {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-5);
  background: rgba(12, 13, 15, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.header--glass::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(16, 185, 129, 0.4) 20%, rgba(139, 92, 246, 0.25) 50%, rgba(16, 185, 129, 0.4) 80%, transparent 100%);
}

[data-theme="light"] .header--glass {
  background: rgba(255, 255, 255, 0.72);
  border-bottom-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .header--glass::after {
  background: linear-gradient(90deg, transparent 0%, rgba(5, 150, 105, 0.3) 20%, rgba(124, 58, 237, 0.15) 50%, rgba(5, 150, 105, 0.3) 80%, transparent 100%);
}

.header--glass .header__logo {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.header--glass .header__logo svg {
  color: var(--accent-400);
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.4));
}

[data-theme="light"] .header--glass .header__logo svg {
  color: var(--accent-600);
  filter: drop-shadow(0 0 4px rgba(5, 150, 105, 0.3));
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ================================================================
   Language selector styled as ghost button
   ================================================================ */
.lang-select {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  padding: var(--space-1) var(--space-2);
  cursor: pointer;
  transition: all 200ms;
}
.lang-select:hover {
  background: var(--surface-tertiary);
  color: var(--text-primary);
}
.lang-select:focus {
  outline: none;
  box-shadow: var(--shadow-focus);
}
.lang-select option {
  background: var(--surface-elevated);
  color: var(--text-primary);
}

/* ================================================================
   Credits pill
   ================================================================ */
.credits-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--amber-400);
  white-space: nowrap;
  cursor: pointer;
  transition: all 200ms;
}
.credits-pill:hover {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.4);
}
[data-theme="light"] .credits-pill {
  color: var(--amber-600);
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
}
.credits-pill svg {
  width: 14px;
  height: 14px;
}

/* ================================================================
   Sign in button in header
   ================================================================ */
.btn--signin {
  height: 32px;
  padding: 0 14px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--accent-400);
  border: 1px solid var(--accent-500);
  cursor: pointer;
  transition: all 200ms;
}
.btn--signin:hover {
  background: var(--accent-500);
  color: #fff;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
}

/* ================================================================
   Full-screen map
   ================================================================ */
#map {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* Map gradient overlay — real div over Leaflet tiles */
.map-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, rgba(16, 185, 129, 0.28) 0%, transparent 60%),
    radial-gradient(ellipse 80% 65% at 20% 60%, rgba(139, 92, 246, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 70% 55% at 80% 30%, rgba(56, 189, 248, 0.20) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 65% 75%, rgba(244, 63, 94, 0.15) 0%, transparent 45%),
    radial-gradient(ellipse 50% 40% at 35% 25%, rgba(251, 191, 36, 0.10) 0%, transparent 40%);
}
[data-theme="light"] .map-overlay {
  background:
    radial-gradient(ellipse 90% 70% at 50% 45%, rgba(16, 185, 129, 0.06) 0%, transparent 65%),
    radial-gradient(ellipse 70% 60% at 25% 65%, rgba(139, 92, 246, 0.04) 0%, transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.2) 100%);
}

/* ================================================================
   Search card floating over map
   ================================================================ */
.search-float {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-search-bar);
  width: calc(100% - 32px);
  max-width: 640px;
  transition: all 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.search-float.search-float--collapsed {
  top: 64px;
  max-width: 480px;
}

@property --card-angle {
  syntax: '<angle>';
  initial-value: 135deg;
  inherits: false;
}

@keyframes rotate-gradient {
  0%   { --card-angle: 0deg; }
  100% { --card-angle: 360deg; }
}

.search-card {
  position: relative;
  background: rgba(12, 13, 15, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.05),
    0 0 80px -20px rgba(16, 185, 129, 0.08);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.search-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from var(--card-angle), rgba(16, 185, 129, 0.6), rgba(139, 92, 246, 0.45), rgba(56, 189, 248, 0.35), rgba(244, 63, 94, 0.3), rgba(16, 185, 129, 0.6));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 300ms;
  animation: rotate-gradient 8s linear infinite;
}
.search-card:hover::before {
  opacity: 1;
}
.search-card:hover {
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.06),
    0 0 100px -15px rgba(16, 185, 129, 0.12);
}

[data-theme="light"] .search-card {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 0 60px -20px rgba(5, 150, 105, 0.06);
}

.search-card__row {
  display: flex;
  gap: var(--space-3);
}

@media (max-width: 639px) {
  .search-card__row {
    flex-direction: column;
    gap: var(--space-2);
  }
}

.search-card__input-group {
  flex: 1;
  position: relative;
}

.search-card__input-group svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 38px;
  background: var(--surface-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}
.search-input::placeholder {
  color: var(--text-disabled);
}
.search-input:focus {
  border-color: var(--accent-500);
  box-shadow: var(--shadow-focus);
}

[data-theme="dark"] .search-input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .search-input:focus {
  border-color: var(--accent-400);
}

.search-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@keyframes btn-breathe {
  0%, 100% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.3), 0 0 50px rgba(16, 185, 129, 0.1); }
  50% { box-shadow: 0 0 28px rgba(16, 185, 129, 0.45), 0 0 70px rgba(16, 185, 129, 0.18); }
}

.btn--search {
  height: 40px;
  padding: 0 24px;
  background: linear-gradient(135deg, var(--accent-500), var(--accent-400));
  color: #fff;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: all 200ms;
  animation: btn-breathe 3s ease-in-out infinite;
}
.btn--search:hover {
  background: linear-gradient(135deg, var(--accent-400), var(--accent-300, #6ee7b7));
  box-shadow: 0 0 36px rgba(16, 185, 129, 0.5), 0 0 80px rgba(16, 185, 129, 0.2);
  transform: translateY(-1px);
  animation: none;
}
.btn--search:active {
  transform: translateY(0);
  animation: none;
}
.btn--search svg {
  width: 16px;
  height: 16px;
}

/* ================================================================
   Filter toggle
   ================================================================ */
.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  background: none;
  border: none;
  transition: all 200ms;
}
.filter-toggle:hover {
  color: var(--text-primary);
  background: var(--surface-tertiary);
}
.filter-toggle[aria-expanded="true"] {
  color: var(--violet-400);
  text-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}
[data-theme="light"] .filter-toggle[aria-expanded="true"] {
  color: var(--violet-600);
  text-shadow: none;
}
.filter-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 200ms;
}
.filter-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* ================================================================
   Filter panel
   ================================================================ */
.filters-panel {
  display: none;
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
[data-theme="light"] .filters-panel {
  border-top-color: rgba(0, 0, 0, 0.06);
}
.filters-panel.is-open {
  display: block;
  animation: slide-up 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3) var(--space-4);
}
@media (min-width: 640px) {
  .filters-grid { grid-template-columns: repeat(3, 1fr); }
}

.filter-item label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.filter-select {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  appearance: none;
  cursor: pointer;
  transition: all 150ms;
}
.filter-select:focus {
  border-color: var(--accent-400);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  outline: none;
}
[data-theme="light"] .filter-select {
  background: var(--surface-primary);
  border-color: var(--border-primary);
}
.filter-select option {
  background: var(--surface-elevated);
  color: var(--text-primary);
}

/* ================================================================
   Toggle switch for near-me mode
   ================================================================ */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch__track {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 200ms;
}
.switch__track::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: all 200ms;
}
.switch input:checked + .switch__track {
  background: var(--accent-500);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}
.switch input:checked + .switch__track::after {
  transform: translateX(16px);
  background: #fff;
}
[data-theme="light"] .switch__track {
  background: var(--border-primary);
}

/* ================================================================
   Three-way toggle (Yes / No / Any)
   ================================================================ */
.tri-toggle--wide {
  width: 100%;
}
.tri-toggle--wide .tri-toggle__btn {
  flex: 1;
  text-align: center;
}

.tri-toggle {
  display: inline-flex;
  background: var(--surface-tertiary);
  border-radius: var(--radius-md);
  padding: 2px;
  gap: 2px;
}
[data-theme="dark"] .tri-toggle {
  background: rgba(255, 255, 255, 0.06);
}
.tri-toggle__btn {
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border: none;
  background: none;
  color: var(--text-tertiary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 150ms;
}
.tri-toggle__btn:hover {
  color: var(--text-primary);
}
.tri-toggle__btn.is-active {
  background: rgba(139, 92, 246, 0.15);
  color: var(--violet-400);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.15), var(--shadow-xs);
}
.tri-toggle__btn[data-value="yes"].is-active {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-400);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.25);
}
.tri-toggle__btn[data-value="no"].is-active {
  background: rgba(244, 63, 94, 0.18);
  color: var(--rose-400);
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.25);
}
[data-theme="light"] .tri-toggle__btn.is-active {
  background: rgba(124, 58, 237, 0.08);
  color: var(--violet-600);
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.1);
}
[data-theme="light"] .tri-toggle__btn[data-value="yes"].is-active {
  background: rgba(5, 150, 105, 0.12);
  color: var(--accent-600);
  box-shadow: 0 0 10px rgba(5, 150, 105, 0.15);
}
[data-theme="light"] .tri-toggle__btn[data-value="no"].is-active {
  background: rgba(225, 29, 72, 0.1);
  color: var(--rose-600);
  box-shadow: 0 0 10px rgba(225, 29, 72, 0.15);
}

/* ================================================================
   Range slider
   ================================================================ */
.range-slider {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.range-slider input[type="range"] {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--surface-tertiary);
  border-radius: 2px;
  outline: none;
}
[data-theme="dark"] .range-slider input[type="range"] {
  background: rgba(255, 255, 255, 0.1);
}
.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--amber-400);
  cursor: pointer;
  border: 2px solid var(--surface-elevated);
  box-shadow: 0 0 12px rgba(226, 163, 54, 0.45), 0 0 24px rgba(226, 163, 54, 0.15), 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: box-shadow 200ms;
}
.range-slider input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 18px rgba(226, 163, 54, 0.6), 0 0 36px rgba(226, 163, 54, 0.2), 0 1px 4px rgba(0, 0, 0, 0.3);
}
.range-slider input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--amber-400);
  cursor: pointer;
  border: 2px solid var(--surface-elevated);
  box-shadow: 0 0 12px rgba(226, 163, 54, 0.45), 0 0 24px rgba(226, 163, 54, 0.15), 0 1px 4px rgba(0, 0, 0, 0.3);
}
.range-value {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--amber-400);
  min-width: 28px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
[data-theme="light"] .range-value {
  color: var(--amber-600);
}

/* ================================================================
   More filters link
   ================================================================ */
.more-filters-row {
  grid-column: 1 / -1;
  padding-top: var(--space-2);
}
.more-filters-btn {
  font-size: var(--text-xs);
  color: var(--accent-400);
  cursor: pointer;
  background: none;
  border: none;
  font-weight: var(--weight-medium);
  padding: 0;
}
[data-theme="light"] .more-filters-btn {
  color: var(--accent-600);
}
.more-filters-btn:hover {
  text-decoration: underline;
}

/* ================================================================
   Results Panel — slides in from left
   ================================================================ */
.results-panel {
  position: fixed;
  top: 56px;
  left: 0;
  bottom: 0;
  width: 62%;
  min-width: 600px;
  max-width: 900px;
  z-index: var(--z-filter);
  background: var(--surface-primary);
  border-right: 1px solid var(--border-secondary);
  display: none;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 767px) {
  .results-panel {
    width: 100%;
    min-width: unset;
    max-width: unset;
  }
}

.results-panel.is-visible {
  display: flex;
}
.results-panel.is-open {
  transform: translateX(0);
}

/* Results toolbar */
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--border-secondary);
  flex-shrink: 0;
  min-height: 44px;
  gap: var(--space-3);
}

.results-toolbar__left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.results-count {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  white-space: nowrap;
}
.results-count strong {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.results-toolbar__right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.btn--export {
  height: 32px;
  padding: 0 12px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 200ms;
}
.btn--export:hover {
  background: var(--surface-tertiary);
  border-color: var(--accent-400);
  color: var(--accent-400);
}
.btn--export svg {
  width: 14px;
  height: 14px;
}

/* Columns dropdown */
.columns-dropdown {
  position: relative;
}
.columns-dropdown__trigger {
  height: 32px;
  width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-primary);
  cursor: pointer;
  transition: all 200ms;
}
.columns-dropdown__trigger:hover {
  background: var(--surface-tertiary);
  color: var(--text-primary);
}
.columns-dropdown__trigger svg {
  width: 14px;
  height: 14px;
}

/* Back button in results */
.btn--back {
  height: 32px;
  width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  transition: all 200ms;
  flex-shrink: 0;
}
.btn--back:hover {
  background: var(--surface-tertiary);
  color: var(--text-primary);
}
.btn--back svg {
  width: 16px;
  height: 16px;
}

/* ================================================================
   Data table in results
   ================================================================ */
.results-table-wrap {
  flex: 1;
  overflow: auto;
  min-height: 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table th {
  background-color: var(--table-header-bg);
  color: var(--text-tertiary);
  font-weight: var(--weight-medium);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 12px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--table-border);
  cursor: pointer;
  user-select: none;
  transition: color 150ms;
}
.data-table th:hover {
  color: var(--text-primary);
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--table-border);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  vertical-align: middle;
}

.data-table tbody tr {
  background: var(--table-row-bg);
  transition: background-color 100ms;
  cursor: pointer;
}

.data-table tbody tr:hover {
  background: var(--table-row-hover);
}

.data-table tbody tr.is-highlighted {
  background: rgba(6, 182, 212, 0.08);
}
[data-theme="light"] .data-table tbody tr.is-highlighted {
  background: rgba(6, 182, 212, 0.06);
}

/* Table link */
.table-link {
  color: var(--accent-400);
  text-decoration: none;
  font-weight: var(--weight-medium);
}
[data-theme="light"] .table-link {
  color: var(--accent-700);
}
.table-link:hover {
  text-decoration: underline;
}

/* Rating stars in table */
.rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rating__value {
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}
.rating__stars {
  color: #fbbf24;
  font-size: 11px;
  letter-spacing: -1px;
}

/* Badge in table */
.td-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: var(--weight-medium);
  border-radius: var(--radius-full);
}
.td-badge--yes {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.td-badge--no {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

/* ================================================================
   Pagination
   ================================================================ */
.results-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-secondary);
  flex-shrink: 0;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 2px;
}
.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 150ms;
  font-variant-numeric: tabular-nums;
}
.pagination__btn:hover {
  background: var(--surface-tertiary);
  color: var(--text-primary);
}
.pagination__btn.is-active {
  background: var(--accent-500);
  color: #fff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}
.pagination__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.pagination__btn svg {
  width: 14px;
  height: 14px;
}
.results-footer__info {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* ================================================================
   Signup / Auth Modal
   ================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms;
}
.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
[data-theme="light"] .modal-backdrop {
  background: rgba(0, 0, 0, 0.3);
}

.modal-content {
  position: relative;
  background: var(--surface-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  width: 100%;
  max-width: 420px;
  padding: var(--space-8) var(--space-6);
  transform: scale(0.95) translateY(10px);
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-overlay.is-open .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 200ms;
}
.modal-close:hover {
  background: var(--surface-tertiary);
  color: var(--text-primary);
}
.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  text-align: center;
  margin-bottom: var(--space-2);
}
.modal-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--space-6);
  line-height: var(--leading-relaxed);
}
.modal-subtitle strong {
  color: var(--accent-400);
  font-weight: var(--weight-semibold);
}
[data-theme="light"] .modal-subtitle strong {
  color: var(--accent-600);
}

/* Google OAuth button */
.btn--google {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  background: var(--surface-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 200ms;
}
.btn--google:hover {
  background: var(--surface-secondary);
  border-color: var(--accent-400);
}
.btn--google svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Divider */
.modal-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0;
}
.modal-divider::before,
.modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-secondary);
}
.modal-divider span {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: var(--weight-medium);
}

/* Form fields in modal */
.form-group {
  margin-bottom: var(--space-3);
}
.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  background: var(--surface-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}
[data-theme="dark"] .form-input {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}
.form-input::placeholder {
  color: var(--text-disabled);
}
.form-input:focus {
  border-color: var(--accent-500);
  box-shadow: var(--shadow-focus);
}

.btn--submit {
  width: 100%;
  height: 44px;
  background: var(--accent-500);
  color: #fff;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 200ms;
  margin-top: var(--space-4);
}
.btn--submit:hover {
  background: var(--accent-400);
}

.modal-footer-text {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-top: var(--space-4);
}
.modal-footer-text a {
  color: var(--accent-400);
  font-weight: var(--weight-medium);
  cursor: pointer;
}
[data-theme="light"] .modal-footer-text a {
  color: var(--accent-600);
}

/* ================================================================
   Map Pins
   ================================================================ */
.map-pin {
  width: 12px;
  height: 12px;
  background: var(--accent-400);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.4);
}
.map-pin--active {
  width: 16px;
  height: 16px;
  background: var(--accent-300);
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.2), 0 2px 12px rgba(6, 182, 212, 0.5);
  animation: pin-pulse 1.5s ease-in-out infinite;
}

@keyframes pin-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.2), 0 2px 12px rgba(6, 182, 212, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(6, 182, 212, 0.08), 0 2px 12px rgba(6, 182, 212, 0.3); }
}

/* Pin popup content */
.pin-popup {
  min-width: 180px;
}
.pin-popup__name {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: var(--text-sm);
}
.pin-popup__category {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.pin-popup__rating {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.pin-popup__rating .rating__stars {
  color: #fbbf24;
}
.pin-popup__link {
  display: inline-block;
  margin-top: 6px;
  font-size: var(--text-xs);
  color: var(--accent-400);
  cursor: pointer;
}
[data-theme="light"] .pin-popup__link {
  color: var(--accent-600);
}

/* ================================================================
   Theme toggle in header
   ================================================================ */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  transition: all 200ms;
}
.theme-toggle:hover {
  background: var(--surface-tertiary);
  color: var(--text-primary);
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
}

/* Theme icon visibility */
[data-theme="light"] .theme-icon--light,
[data-theme="light"] .theme-icon--system { display: none; }
[data-theme="dark"] .theme-icon--dark,
[data-theme="dark"] .theme-icon--light { display: none; }
[data-theme="system"] .theme-icon--system,
[data-theme="system"] .theme-icon--dark { display: none; }

/* ================================================================
   Leaflet custom popup override for dark theme
   ================================================================ */
.leaflet-popup-content-wrapper {
  background: var(--surface-elevated) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  border: 1px solid var(--border-primary) !important;
  padding: 0 !important;
}
.leaflet-popup-content {
  margin: 12px 16px !important;
  font-family: var(--font-sans) !important;
  font-size: var(--text-sm) !important;
  line-height: 1.5 !important;
}
.leaflet-popup-tip {
  background: var(--surface-elevated) !important;
  border: 1px solid var(--border-primary) !important;
}
.leaflet-popup-close-button {
  color: var(--text-tertiary) !important;
}
.leaflet-popup-close-button:hover {
  color: var(--text-primary) !important;
}

/* Hide Leaflet default zoom on mobile to save space */
@media (max-width: 639px) {
  .leaflet-control-zoom { display: none; }
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 767px) {
  .header--glass {
    height: 48px;
    padding: 0 var(--space-3);
  }
  .header__logo {
    font-size: var(--text-sm);
  }
  .search-float {
    top: 56px;
    width: calc(100% - 16px);
  }
  .search-card {
    padding: var(--space-3);
    gap: var(--space-2);
  }
  .search-card__actions {
    flex-direction: row;
    gap: var(--space-2);
  }
  .search-input {
    height: 40px;
    font-size: 14px;
  }
  .btn--search {
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
  }
  .filters-panel {
    max-height: 50vh;
    overflow-y: auto;
  }
  .filters-grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-2) !important;
  }
  .filter-item {
    padding: var(--space-2) !important;
  }
  .tri-toggle__btn {
    padding: 6px 10px;
    font-size: 12px;
  }
  .hide-mobile { display: none !important; }
}

@media (max-width: 1023px) {
  .hide-tablet { display: none !important; }
}

/* ================================================================
   Slide-up animation (used by filters panel)
   ================================================================ */
@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Toast notifications */
#toast-container { pointer-events: none; }
.toast {
    pointer-events: auto;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: var(--text-sm);
    color: #fff;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    max-width: 400px;
}
.toast--info { background: rgba(14, 165, 233, 0.9); }
.toast--warning { background: rgba(226, 163, 54, 0.9); }
.toast--error { background: rgba(244, 63, 94, 0.9); }
.toast--success { background: rgba(16, 185, 129, 0.9); }

/* Credit purchase modal */
.credit-packs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.credit-pack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 20px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-1);
    cursor: pointer;
    transition: all 0.2s;
}
.credit-pack:hover {
    border-color: var(--accent);
    background: var(--surface-2);
    transform: translateY(-2px);
}
.credit-pack__label {
    font-weight: 600;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
}
.credit-pack__credits {
    font-size: var(--text-lg);
    font-weight: 700;
}
.credit-pack__price {
    font-size: var(--text-xl);
    font-weight: 800;
}
.credit-pack__per {
    font-size: var(--text-xs);
    opacity: 0.6;
}

/* ================================================================
   User location pulsing dot
   ================================================================ */
.user-location__dot {
    width: 16px;
    height: 16px;
    background: var(--accent-500);
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    position: relative;
}
.user-location__pulse {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.25);
    animation: user-pulse 2s ease-out infinite;
}
@keyframes user-pulse {
    0%   { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}
