/* ===========================================================
   FUEL DADDY — CLEAN STYLESHEET
   Deduplicated and organized with Dark Theme Support
=========================================================== */

/* ---------------------------------
   ROOT VARIABLES
---------------------------------- */
:root {
  --fd-orange-1: #ee793b;
  --fd-orange-2: #ff9001;
  --fd-green: #00c147;
  --fd-text-dark: #1c1c1c;
  --fd-radius: 28px;
  --app-height: 100vh;
  
  /* Light theme colors (default) */
  --fd-bg-primary: rgba(255,255,255,0.65);
  --fd-bg-secondary: rgba(255,255,255,0.6);
  --fd-bg-tertiary: rgba(255,255,255,0.95);
  --fd-bg-solid: #fff;
  --fd-bg-input: rgba(255,255,255,0.65);
  --fd-text-primary: #111;
  --fd-text-secondary: #333;
  --fd-text-tertiary: #666;
  --fd-text-muted: rgba(0,0,0,0.55);
  --fd-border-color: rgba(0,0,0,0.08);
  --fd-shadow-color: rgba(0,0,0,0.1);
  --fd-shadow-inset: rgba(255,255,255,0.5);
  --fd-card-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  --fd-grab-handle: rgba(0,0,0,0.18);
  --fd-close-btn-bg: rgba(0,0,0,0.06);
  --fd-switch-off: #e5e5e5;
  --fd-toggle-bg: rgba(0,0,0,0.08);
  --fd-toggle-active-bg: white;
  --fd-toggle-active-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Dark theme variables */
body.dark-theme {
  --fd-bg-primary: rgba(30,30,35,0.92);
  --fd-bg-secondary: rgba(45,45,52,0.85);
  --fd-bg-tertiary: rgba(35,35,42,0.98);
  --fd-bg-solid: #1e1e23;
  --fd-bg-input: rgba(60,60,70,0.8);
  --fd-text-primary: #f0f0f2;
  --fd-text-secondary: #d0d0d5;
  --fd-text-tertiary: #a0a0a8;
  --fd-text-muted: rgba(255,255,255,0.55);
  --fd-border-color: rgba(255,255,255,0.1);
  --fd-shadow-color: rgba(0,0,0,0.3);
  --fd-shadow-inset: rgba(255,255,255,0.05);
  --fd-card-shadow: 0 -4px 40px rgba(0,0,0,0.3);
  --fd-grab-handle: rgba(255,255,255,0.25);
  --fd-close-btn-bg: rgba(255,255,255,0.1);
  --fd-switch-off: #3a3a42;
  --fd-toggle-bg: rgba(255,255,255,0.1);
  --fd-toggle-active-bg: rgba(80,80,90,1);
  --fd-toggle-active-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

@supports (height: 100dvh) { :root { --app-height: 100dvh; } }
@supports (-webkit-touch-callout: none) { :root { --app-height: -webkit-fill-available; } }

/* ---------------------------------
   BASE RESET
---------------------------------- */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #fff !important;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  transition: background 0.3s ease;
}

body.dark-theme {
  background: #121215;
}

#app-container {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  height: var(--app-height);
  width: 100%;
  padding-bottom: env(safe-area-inset-bottom);
  overflow: hidden;
  background: #fff !important;
  transition: background 0.3s ease;
}

body.dark-theme #app-container {
  background: #121215;
}

#map, #map > div, #map canvas {
  width: 100%;
  height: 100%;
}

/* ---------------------------------
   USER LOCATION DOT — blue pulsing
---------------------------------- */
#map { position: relative; }
#user-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1e88ff;
  border: 2px solid #fff;
  box-shadow: 0 0 0 0 rgba(30, 136, 255, 0.6);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
  display: none; /* shown via JS once userLocation is set */
}
/* Custom dot intentionally suppressed — Apple MapKit's native
   showsUserLocation handles the blue pulsing dot now. */
#user-dot.is-visible {
  display: none;
}
@keyframes fd-user-dot-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(30, 136, 255, 0.55); }
  70%  { box-shadow: 0 0 0 18px rgba(30, 136, 255, 0); }
  100% { box-shadow: 0 0 0 0   rgba(30, 136, 255, 0); }
}

/* ---------------------------------
   WEATHER WIDGET
---------------------------------- */
.weather-widget {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 12px;
  z-index: 5000;
  font-size: 14px;
  font-weight: 600;
  color: var(--fd-text-secondary);
  padding: 4px 6px;
  background: var(--fd-bg-primary);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 8px var(--fd-shadow-color);
  transition: all 0.3s ease;
}
.weather-widget .weather-icon { font-size: 12px; }
.weather-widget .weather-temp { font-size: 14px; font-weight: 600; }

/* ---------------------------------
   TOP SEARCH BAR
---------------------------------- */
.top-search-container {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  width: 100%;
  padding: 0 16px;
  box-sizing: border-box;
  z-index: 9998;
  pointer-events: none;
  display: flex;
  justify-content: center;
}
.top-search-container * { pointer-events: auto; }

.search-bar-combined {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 460px;
  gap: 8px;
  padding: 8px 10px;
  background: var(--fd-bg-primary);
  backdrop-filter: blur(16px);
  border-radius: 50px;
  box-shadow: 0 4px 8px var(--fd-shadow-color);
  transition: all 0.3s ease;
}

.search-input-wrapper {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - 110px);
}

.search-bar-combined input {
  width: 85%;
  border: none;
  background: var(--fd-bg-input);
  outline: none;
  font-size: 16px;
  padding: 8px 32px 8px 28px;
  border-radius: 20px 8px 8px 20px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
  color: var(--fd-text-primary);
  transition: all 0.3s ease;
}

body.dark-theme .search-bar-combined input::placeholder {
  color: var(--fd-text-tertiary);
}

.search-bar-combined i.fa-search {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fd-text-tertiary);
  pointer-events: none;
  font-size: 0.8rem;
}

/* Clear Button */
.search-clear-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: none;
  background: rgba(0,0,0,0.15);
  border-radius: 50%;
  color: var(--fd-text-tertiary);
  font-size: 12px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: background 0.2s ease;
}
.search-clear-btn:hover { background: rgba(0,0,0,0.25); }
.search-clear-btn.visible { display: flex; }

body.dark-theme .search-clear-btn {
  background: rgba(255,255,255,0.15);
}
body.dark-theme .search-clear-btn:hover {
  background: rgba(255,255,255,0.25);
}

/* Search Suggestions */
/* Search Suggestions */
#search-suggestions {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 460px;
  margin: 0;
  padding: 0;
  background: var(--fd-bg-tertiary);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  box-shadow: 0 8px 8px var(--fd-shadow-color);
  list-style: none;
  max-height: 60vh;
  overflow-y: auto;
  z-index: 9999;
  display: none;
  transition: all 0.3s ease;
}

#search-suggestions.active { display: block; }
#search-suggestions li {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--fd-border-color);
  color: var(--fd-text-primary);
}
#search-suggestions li:hover { 
  background: var(--fd-toggle-bg);
}
#search-suggestions li:last-child { border-bottom: none; }

/* FUEL DROPDOWN block removed (Plan 02) — replaced by connector chip row in Plan 03 */

/* EV charger map markers — colored pin with white lightning bolt, no number */
.fd-ev-marker {
  position: relative;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.fd-ev-marker .fd-ev-pin {
  width: 36px; height: 36px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25), 0 0 0 2px rgba(255,255,255,0.9) inset;
  display: flex; align-items: center; justify-content: center;
}
/* 3-tier color scheme by max kW:
   - standard: 2-30 kW   → orange
   - mid:      31-119 kW → teal
   - ultra:    120+ kW   → teal blending into electric blue */
.fd-ev-marker .fd-ev-pin.standard {
  background: linear-gradient(135deg, #ff9b01, #ff6e00);
}
.fd-ev-marker .fd-ev-pin.mid {
  background: linear-gradient(135deg, #00d4aa, #00a884);
}
.fd-ev-marker .fd-ev-pin.ultra {
  /* 85deg in CSS — the pin is rotated -45deg, so this renders as ~40deg on
     screen (the angle the user wants). Lower angle = sweep is more horizontal. */
  background: linear-gradient(85deg, #00d4aa 0%, #00a8a8 22%, #1e7af0 70%, #0d52d6 100%);
}
.fd-ev-marker .fd-ev-bolt {
  transform: rotate(45deg);
  color: #ffffff;
  font-size: 16px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  transform-origin: 50% 50%;
}

/* (EV disclaimer banner removed — see plan quick/1, task 4. Disclaimer
   now lives inside the EV feature card body via .fc-ev-disclaimer.) */

/* EV feature card variant — operator + connection types instead of price */
.fd-ev-card-meta {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.fd-ev-card-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(0,168,132,0.1);
  border: 1px solid rgba(0,168,132,0.2);
  color: #00855f;
  padding: 4px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
}
.fd-ev-card-tag.fast { background: rgba(0,168,132,0.15); color: #006d4e; }

/* ---------------------------------
   EV FEATURE CARD (mirrors fuel feature card)
---------------------------------- */
/* Header circular badge with white bolt — replaces brand logo for EV.
   Color tier matches the marker on the map (highest kW wins). */
.fc-logo-wrapper.fc-ev-header-badge {
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9b01, #ff6e00); /* default = standard */
}
.fc-logo-wrapper.fc-ev-header-badge--standard {
  background: linear-gradient(135deg, #ff9b01, #ff6e00);
}
.fc-logo-wrapper.fc-ev-header-badge--mid {
  background: linear-gradient(135deg, #00d4aa, #00a884);
}
.fc-logo-wrapper.fc-ev-header-badge--ultra {
  background: linear-gradient(40deg, #00d4aa 0%, #00a8a8 22%, #1e7af0 70%, #0d52d6 100%);
}
.fc-ev-header-bolt {
  color: #fff;
  font-size: 24px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.18);
}

/* kW pill badge — color tier mirrors the marker. One badge per unique kW
   level a station offers (e.g. 22kW + 75kW shown as two badges). */
.fc-ev-kw-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #ff9b01, #ff6e00); /* default = standard */
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.fc-ev-kw-badge.fc-ev-kw-badge--standard {
  background: linear-gradient(135deg, #ff9b01, #ff6e00);
}
.fc-ev-kw-badge.fc-ev-kw-badge--mid {
  background: linear-gradient(135deg, #00d4aa, #00a884);
}
.fc-ev-kw-badge.fc-ev-kw-badge--ultra {
  background: linear-gradient(40deg, #00d4aa 0%, #00a8a8 22%, #1e7af0 70%, #0d52d6 100%);
}

/* Operator badge — neutral pill */
.fc-ev-op-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(0,0,0,0.06);
  color: var(--fd-text-secondary);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
body.dark-theme .fc-ev-op-badge {
  background: rgba(255,255,255,0.08);
  color: var(--fd-text-secondary);
}

/* Connectors here panel rows */
.fc-ev-conns {
  /* inherits .fc-fuels styling */
}
/* Drop the border-top above the "Connectors here" title in EV cards. */
.fc-ev-conns .fc-fuels-title {
  border-top: none;
  padding-top: 6px;
}
.fc-ev-conn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 2px;
  gap: 10px;
}
.fc-ev-conn-name {
  font-size: 14px;
  color: var(--fd-text-primary);
  font-weight: 500;
  flex: 1 1 auto;
  min-width: 0;
}
.fc-ev-conn-current {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  background: rgba(0,0,0,0.06);
  color: var(--fd-text-secondary);
  vertical-align: 1px;
}
body.dark-theme .fc-ev-conn-current {
  background: rgba(255,255,255,0.08);
  color: var(--fd-text-secondary);
}
/* Quantity pill — colored to match the row's kW tier. */
.fc-ev-conn-count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff9b01, #ff6e00); /* default = standard */
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
}
.fc-ev-conn-count.fc-ev-conn-count--standard {
  background: linear-gradient(135deg, #ff9b01, #ff6e00);
}
.fc-ev-conn-count.fc-ev-conn-count--mid {
  background: linear-gradient(135deg, #00d4aa, #00a884);
}
.fc-ev-conn-count.fc-ev-conn-count--ultra {
  background: linear-gradient(40deg, #00d4aa 0%, #00a8a8 22%, #1e7af0 70%, #0d52d6 100%);
}

/* Disclaimer footer inside the card body */
.fc-ev-disclaimer {
  margin: 0;
  padding: 10px 20px 18px 20px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--fd-text-tertiary);
}
.fc-ev-disclaimer a {
  color: #00a884;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.fc-ev-disclaimer a:hover {
  color: #008569;
}

/* ---------------------------------
   SIDE CONTROLS
---------------------------------- */
.side-controls {
  position: fixed;
  top: 35%;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 5000;
}

.map-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--fd-bg-primary);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  box-shadow: 0 2px 6px var(--fd-shadow-color);
  color: var(--fd-text-primary);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.map-btn:hover {
  background: var(--fd-bg-secondary);
}


/* ---------------------------------
   SHARED CARD STYLES
---------------------------------- */
.card-grab-handle {
  width: 50px;
  height: 5px;
  background: var(--fd-grab-handle);
  border-radius: 3px;
  margin: 12px auto 0;
  cursor: grab;
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.card-close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  background: var(--fd-close-btn-bg);
  border: none;
  font-size: 1.2rem;
  color: var(--fd-text-muted);
  cursor: pointer;
  line-height: 1;
  z-index: 10;
  transition: all 0.3s ease;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-close-btn:hover { 
  opacity: 0.7;
  background: var(--fd-toggle-bg);
}

/* Card Header - Consistent styling */
.card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
  flex-shrink: 0;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin: 12px 0 16px;
  text-align: left;
  color: var(--fd-text-primary);
}

/* ---------------------------------
   FILTERS CARD
---------------------------------- */
.filters-card {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  transition: transform .3s ease, background 0.3s ease;
  width: 100%;
  max-width: 560px;
  height: 95vh;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  background: var(--fd-bg-primary);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--fd-card-shadow);
  padding: 0px 20px 0px;
  z-index: 9999;
  box-sizing: border-box;
}
.filters-card.active { 
  transform: translateX(-50%) translateY(0); 
}

.filters-heading {
  font-size: 18px;
  font-weight: 700;
  margin: 16px 0 16px;
  padding-left: 8px;
  text-align: left;
  color: var(--fd-text-primary);
}

.filters-scroll {
  overflow-y: auto;
  flex: 1;
  padding-bottom: 10px;
}

.filters-section {
  margin: 0 0 16px;
  padding: 16px;
  border-radius: 18px;
  background: var(--fd-bg-secondary);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 3px var(--fd-shadow-inset), 0 4px 12px var(--fd-shadow-color);
  transition: all 0.3s ease;
  z-index: 999 !important;
}

/* Section Labels - Consistent styling with icons */
.filters-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--fd-text-secondary);
}

.filters-label i {
  font-size: 14px;
  color: var(--fd-text-tertiary);
  width: 18px;
  text-align: center;
}

.filters-sublabel {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--fd-text-secondary);
}

.filters-sublabel i {
  font-size: 14px;
  color: var(--fd-text-tertiary);
  width: 18px;
  text-align: center;
}

.filters-description {
  font-size: 12px;
  color: var(--fd-text-tertiary);
  opacity: 0.8;
  margin: 4px 0 12px;
  line-height: 1.4;
}

/* Divider */
.filters-divider {
  height: 1px;
  background: var(--fd-border-color);
  margin: 16px 0;
}

/* Map Mode Toggle */
.map-mode-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 12px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--fd-border-color);
}
.map-mode-toggle-row span { 
  display: flex;
  align-items: center;
  font-size: 14px; 
  font-weight: 600; 
  color: var(--fd-text-secondary);
}
.map-mode-toggle-row #text {
  margin: 0 0 4px 0;
}
  
.map-mode-toggle-row span i {
  font-size: 14px;
  color: var(--fd-text-tertiary);
}

.map-mode-toggle {
  display: flex;
  background: var(--fd-toggle-bg);
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
  transition: background 0.3s ease;
}

.map-mode-btn {
  padding: 6px 12px;
  border: none;
  background: transparent;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--fd-text-tertiary);
}
.map-mode-btn.active {
  background: var(--fd-toggle-active-bg);
  color: var(--fd-text-primary);
  box-shadow: var(--fd-toggle-active-shadow);
}
.map-mode-btn i { margin-right: 4px; }

/* Switch Rows - Closer together */
.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 14px;
  color: var(--fd-text-secondary);
}

.switch-row + .switch-row {
  padding-top: 4px;
}

/* FD Switch Toggle */
.fd-switch {
  --fd-on: #00c147;
  position: relative;
  width: 48px;
  height: 24px;
  border-radius: 14px;
  background: var(--fd-switch-off);
  cursor: pointer;
  transition: background 0.25s ease;
  flex-shrink: 0;
}
.fd-switch.on { background: var(--fd-on); }

.fd-switch-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, #f8f8f8);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15), 0 4px 8px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.8);
  transition: left 0.25s ease;
}
.fd-switch.on .fd-switch-slider { left: calc(100% - 21px); }

/* Brand Icon Grid */
.brand-icon-grid,
#brand-icon-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 8px 0;
  justify-items: center;
}

.brand-select {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--fd-bg-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px var(--fd-shadow-color);
  cursor: pointer;
  transition: all 0.2s ease;
}
.brand-select.selected { box-shadow: 0 0 0 3px #00c147; }
.brand-select img { width: 85%; height: 85%; object-fit: contain; }

/* Sticky Footer */
.filters-sticky-footer {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 0;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  background: var(--fd-bg-tertiary);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--fd-border-color);
  margin: 0 -20px -20px;
  margin-top: auto;
  z-index: 10;
  transition: all 0.3s ease;
}

.filters-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 0 30px;
}

/* Pushable Buttons */
.pushable {
  position: relative;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  width: 45%;
}

.pushable.reset-btn {
  margin-right: auto;
}

.pushable.apply-btn {
  margin-left: auto;
}

.pushable .shadow {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.15);
  filter: blur(2px);
  border-radius: 10px;
  transform: translateY(3px);
  transition: transform 0.2s ease;
}
.pushable .edge {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: rgba(0,0,0,0.25);
}
.pushable .front {
  position: relative;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateY(-3px);
  transition: all 0.2s ease;
}
.reset-btn .front { 
  background: var(--fd-bg-solid); 
  color: var(--fd-text-secondary); 
}
.apply-btn .front { background: #00c147; color: #fff; }
.pushable:active .front { transform: translateY(-1px); }
.pushable:active .shadow { transform: translateY(1px); }

/* ---------------------------------
   SEARCH CARD (Station List)
---------------------------------- */
.search-card {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  transition: transform .3s ease, background 0.3s ease;
  width: 100%;
  max-width: 560px;
  height: auto;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--fd-bg-primary);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--fd-card-shadow);
  padding: 0 20px 0 20px;
  z-index: 9999;
  box-sizing: border-box;
}
.search-card.active { 
  transform: translateX(-50%) translateY(0); 
}

.list-heading-row {
  display: flex;
  flex-direction: column;
  align-items: left;
  padding-top: 0;
  flex-shrink: 0;
}

.list-heading {
  padding-left: 8px;
  font-size: 18px;
  font-weight: 700;
  margin: 16px 0 16px;
  text-align: left;
  color: var(--fd-text-primary);
}

.card-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* Station List Box */
.station-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0 0 4px;
  background: var(--fd-bg-secondary);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 18px;
  box-shadow: inset 0 1px 3px var(--fd-shadow-inset), 0 4px 12px var(--fd-shadow-color);
  overflow: hidden;
  transition: all 0.3s ease;
}

.station-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-bottom: 1px solid var(--fd-border-color);
  cursor: pointer;
  transition: background 0.2s ease;
}
.station-item:hover {
  background: var(--fd-toggle-bg);
}
.station-item:last-child { border-bottom: none; }

/* Square Brand Icons in List */
.station-item .list-brand-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--fd-bg-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px var(--fd-shadow-color);
  flex-shrink: 0;
  transition: all 0.3s ease;
}
.station-item .list-brand-icon img.station-logo {
  width: 85%;
  height: 85%;
  object-fit: contain;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.station-details {
  flex: 1;
  min-width: 0;
}

.station-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--fd-text-primary);
  margin-bottom: 2px;
}

.station-address {
  font-size: 13px;
  color: var(--fd-text-tertiary);
}

.station-price {
  font-size: 16px;
  font-weight: 700;
  margin-left: auto;
  color: var(--fd-text-primary);
}

.no-stations {
  text-align: center;
  padding: 40px 20px;
  color: var(--fd-text-tertiary);
  font-size: 14px;
}

/* ---------------------------------
   FEATURE CARD (Station Detail Popup)
   Premium Liquid Glass Design
---------------------------------- */
.feature-card-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  pointer-events: none;
  z-index: 9999;
  background: transparent;
}

/* FC Overlay — cinematic dim */
.fc-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 0;
  transition: opacity 0.35s ease-out;
  overscroll-behavior: contain;
}
.fc-overlay.fc-visible { opacity: 1; }

/* FC Card — liquid glass */
.fc-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: 82vh;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-radius: 28px;
  box-shadow:
    0 0 0 0.5px rgba(0,0,0,0.06),
    0 1px 2px rgba(0,0,0,0.04),
    0 4px 12px rgba(0,0,0,0.06),
    0 16px 48px rgba(0,0,0,0.12),
    0 32px 80px rgba(0,0,0,0.08),
    inset 0 0.5px 0 rgba(255,255,255,0.7);
  overflow: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateY(40px) scale(0.92);
  opacity: 0;
  transition:
    transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.4s ease-out;
  border: 0 !important;
}
body.dark-theme .fc-card {
  background: rgba(30,30,35,0.92);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.08),
    0 4px 12px rgba(0,0,0,0.2),
    0 16px 48px rgba(0,0,0,0.3),
    0 32px 80px rgba(0,0,0,0.2),
    inset 0 0.5px 0 rgba(255,255,255,0.06);
}
.fc-overlay.fc-visible .fc-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fc-overlay { transition: opacity 0.15s ease; }
  .fc-card { transition: opacity 0.15s ease; transform: none !important; }
  .fc-overlay.fc-visible .fc-card { transform: none !important; }
}

/* FC Controls */
.fc-controls { display: none; }
.fc-grab { display: none; }
.fc-grab:active { display: none; }

/* FC Close — subtle, minimal */
.fc-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.05);
  color: var(--fd-text-tertiary);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-out;
  z-index: 10;
}
.fc-close:hover {
  background: rgba(0,0,0,0.1);
  color: var(--fd-text-primary);
  transform: scale(1.08);
}
.fc-close:active { transform: scale(0.92); }
body.dark-theme .fc-close { background: rgba(255,255,255,0.08); }
body.dark-theme .fc-close:hover { background: rgba(255,255,255,0.15); }

/* FC Header — generous spacing */
.fc-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 14px 20px;
  margin-right: 28px;
}

/* FC Logo — elevated with soft ring */
.fc-logo-wrapper {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow:
    0 0 0 0.5px rgba(0,0,0,0.06),
    0 2px 8px rgba(0,0,0,0.06),
    0 8px 24px rgba(0,0,0,0.04);
  overflow: hidden;
  transition: all 0.3s ease-out;
}
body.dark-theme .fc-logo-wrapper {
  background: rgba(255,255,255,0.08);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.1),
    0 2px 8px rgba(0,0,0,0.2);
}
.fc-logo-wrapper .fc-logo {
  width: 85%;
  height: 85%;
  object-fit: contain;
  border: none;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

/* FC Info */
.fc-info { flex: 1; min-width: 0; }
.fc-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--fd-text-primary);
  margin: 0 0 2px 0;
  line-height: 1.25;
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-address {
  font-size: 13px;
  color: var(--fd-text-tertiary);
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fc-address-link {
  text-decoration: underline;
  text-decoration-color: rgba(0,0,0,0.12);
  text-underline-offset: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.fc-address-link:hover {
  color: #ee793b;
  text-decoration-color: #ee793b;
}
body.dark-theme .fc-address-link { text-decoration-color: rgba(255,255,255,0.12); }
body.dark-theme .fc-address-link:hover { color: #ff9f47; text-decoration-color: #ff9f47; }

/* FC Action Buttons — pill style */
.fc-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.fc-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  background: rgba(0,0,0,0.04);
  color: var(--fd-text-tertiary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease-out;
}
.fc-action-btn:hover {
  background: rgba(238,121,59,0.1);
  color: #ee793b;
  transform: translateY(-1px);
}
.fc-action-btn:active {
  transform: scale(0.92);
}
body.dark-theme .fc-action-btn {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.45);
}
body.dark-theme .fc-action-btn:hover {
  background: rgba(238,121,59,0.15);
  color: #ff9001;
}

/* FC Navigate Modal */
.fc-nav-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.fc-nav-modal-content {
  background: #fff;
  border-radius: 22px;
  padding: 24px;
  width: 260px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.25);
  text-align: center;
}
.fc-nav-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  margin: 0 0 16px 0;
}
.fc-nav-modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 8px;
  transition: all 0.2s ease-out;
}
.fc-nav-modal-btn.apple { background: #000; color: #fff; }
.fc-nav-modal-btn.apple:hover { background: #1a1a1a; transform: translateY(-1px); }
.fc-nav-modal-btn.google { background: #4285f4; color: #fff; }
.fc-nav-modal-btn.google:hover { background: #3574d4; transform: translateY(-1px); }
.fc-nav-modal-btn.cancel { background: rgba(0,0,0,0.05); color: #666; margin-bottom: 0; }
.fc-nav-modal-btn.cancel:hover { background: rgba(0,0,0,0.08); }
body.dark-theme .fc-nav-modal-content {
  background: rgba(30,30,35,0.95);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}
body.dark-theme .fc-nav-modal-title { color: #fff; }
body.dark-theme .fc-nav-modal-btn.cancel { background: rgba(255,255,255,0.08); color: #aaa; }

/* FC Info Button */
.fc-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 4px;
  color: #ee793b;
  font-size: 15px;
  text-decoration: none;
  vertical-align: middle;
  opacity: 0.6;
  transition: all 0.2s ease-out;
  flex-shrink: 0;
}
.fc-info-btn:hover { opacity: 1; }
body.dark-theme .fc-info-btn { color: #ff9f47; }

/* FC Badges — inside frosted tray */
.fc-badges {
  display: flex;
  gap: 6px;
  padding: 0 20px 12px;
  flex-wrap: wrap;
}
.fc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.3s ease;
}
.fc-badge i { font-size: 9px; }
.fc-badge-cheapest {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #15803d;
}
.fc-badge-discount {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #b45309;
}
.fc-badge-member {
  background: linear-gradient(135deg, #fecdd3 0%, #fda4af 100%);
  color: #be123c;
}
body.dark-theme .fc-badge-cheapest { background: rgba(0,193,71,0.18); color: #4ade80; }
body.dark-theme .fc-badge-discount { background: rgba(251,191,36,0.18); color: #fbbf24; }
body.dark-theme .fc-badge-member { background: rgba(225,131,145,0.25); color: #fda4af; }

/* FC Fuels List — clean rows */
.fc-fuels {
  padding: 0 20px 20px;
  max-height: 400px;
  overflow-y: auto;
  margin: 0;
}
.fc-fuels-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--fd-text-tertiary);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin: 0 0 8px 4px;
  padding-top: 14px;
  border-top: 1px solid var(--fd-border-color);
  opacity: 0.7;
}

.fc-fuel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 12px;
  margin: 2px 0;
  border-radius: 12px;
  transition: background 0.2s ease-out;
}
.fc-fuel-row:hover { background: rgba(0,0,0,0.02); }
body.dark-theme .fc-fuel-row:hover { background: rgba(255,255,255,0.03); }

.fc-fuel-row:last-child { margin-bottom: 0; }
.fc-fuel-row.fc-current {
  background: linear-gradient(135deg, rgba(238,121,59,0.06), rgba(255,144,1,0.04));
  border-left: 3px solid #ee793b;
}
body.dark-theme .fc-fuel-row.fc-current {
  background: linear-gradient(135deg, rgba(238,121,59,0.1), rgba(255,144,1,0.06));
}

.fc-fuel-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fc-fuel-info .fc-fuel-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
}

.fc-fuel-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--fd-text-secondary);
}
.fc-fuel-row.fc-current .fc-fuel-name {
  font-weight: 600;
  color: var(--fd-text-primary);
}

.fc-fuel-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--fd-text-primary);
  letter-spacing: -0.2px;
}
.fc-fuel-row.fc-current .fc-fuel-price {
  color: #ee793b;
}

/* FC Price Hero — removed, prices shown in list */
.fc-price-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  margin: 0 20px 4px;
  background: linear-gradient(135deg, rgba(238,121,59,0.05), rgba(255,144,1,0.03));
  border-radius: 14px;
  border: 1px solid rgba(238,121,59,0.08);
}
body.dark-theme .fc-price-hero {
  background: linear-gradient(135deg, rgba(238,121,59,0.08), rgba(255,144,1,0.04));
  border-color: rgba(238,121,59,0.12);
}
.fc-price-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--fd-text-secondary);
}
.fc-price-label .fc-fuel-icon { font-size: 18px; }
.fc-price-main {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.fc-price-value {
  font-size: 22px;
  font-weight: 800;
  color: #ee793b;
  line-height: 1;
  letter-spacing: -0.5px;
}
.fc-price-unit { display: none; }

/* FC Navigate Link */
.fc-navigate-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 0;
  border: none;
  background: none;
  color: #ee793b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-out;
}
.fc-navigate-link:hover { color: #ff9001; }
.fc-navigate-link i { font-size: 12px; }
body.dark-theme .fc-navigate-link { color: #ff9f47; }
body.dark-theme .fc-navigate-link:hover { color: #ffb366; }

/* Station info icon in list items */
.station-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  color: var(--fd-text-tertiary);
  font-size: 13px;
  text-decoration: none;
  opacity: 0.4;
  transition: all 0.2s ease;
  margin-left: 6px;
}
.station-info-btn:hover {
  color: #ee793b;
  opacity: 1;
}
body.dark-theme .station-info-btn:hover {
  color: #ff9f47;
}

/* ---------------------------------
   LIST BADGES
---------------------------------- */
.list-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

.list-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  background: var(--fd-bg-secondary);
  color: var(--fd-text-secondary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.list-badge i {
  font-size: 8px;
}

.list-badge-cheapest {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}

.list-badge-discount {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.list-badge-member {
  background: #ffa5a5;
  color: #e31837;
  border-color: #d54848;
}

body.dark-theme .list-badge-cheapest {
  background: rgba(0,193,71,0.2);
  color: #4ade80;
  border-color: rgba(0,193,71,0.3);
}

body.dark-theme .list-badge-discount {
  background: rgba(251,191,36,0.2);
  color: #fbbf24;
  border-color: rgba(251,191,36,0.3);
}

/* ---------------------------------
   DISCOUNT BADGES
---------------------------------- */
.discount-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  background: rgba(56,124,194,0.12);
  color: #387cc2;
  font-size: 13px;
  font-weight: 600;
  border-radius: 12px;
  white-space: nowrap;
}

.discount-pill {
  background: #00C147;
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------------------------------
   MOBILE RESPONSIVE
---------------------------------- */
@media (max-width: 600px) {
  .weather-widget { top: 80px; }
  
  #filters-card, #search-card, .filters-card, .search-card {
    height: auto;
    max-height: 70vh;
    max-width: 100%;
    left: 0;
    right: 0;
    transform: translateX(0) translateY(100%);
  }
  #search-card .search-card {
    height: auto;
    max-height: 95vh;
    max-width: 100%;
    left: 0;
    right: 0;
    transform: translateX(0) translateY(100%);
  }  
  
  #filters-card.active, #search-card.active, 
  .filters-card.active, .search-card.active {
    transform: translateX(0) translateY(0);
  }

  .side-controls {
    display: flex;
    flex-direction: column;
    position: static;
    height: 0;
    width: 0;
    pointer-events: auto;
  }
  
  #options-btn, #list-btn, #recenter-btn {
    position: fixed;
    z-index: 6000;
  }
  #list-btn {
    bottom: calc(env(safe-area-inset-bottom) + 30px);
    left: 16px;
  }
  #recenter-btn {
    bottom: calc(env(safe-area-inset-bottom) + 30px);
    right: 16px;
  }
  #options-btn {
    top: calc(6rem + env(safe-area-inset-top));
    right: 16px;
  }
  .fc-card {
    max-width: 100%;
    max-height: 88vh;
    border-radius: 24px;
    margin: 0 8px;
  }
  
  .search-bar-combined input {
    width: 76%;
  }
}

@media (min-width: 900px) {
  .filters-card, #filters-card {
    max-height: 840px;
    overflow-y: auto;
  }
  .filters-scroll {
    max-height: calc(620px - 120px);
    overflow-y: auto;
  }
}

/* ---------------------------------
   CLUSTER MARKER STYLES
---------------------------------- */
.fd-cluster-marker {
  position: relative;
}

.fd-cluster-pin.fd-marker-pin {
  width: 36px;
  height: 36px;
}

.fd-cluster-count {
  font-family: 'Fugaz One', cursive;
  font-size: 18px;
  color: white;
  line-height: 1;
  transform: rotate(45deg);
  position: relative;
  left: -1px;
  z-index: 1;
}

/* ---------------------------------
   CUSTOM MARKER STYLES (teardrop with logo)
---------------------------------- */
.fd-custom-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
  position: relative;
}

.fd-crown {
  position: absolute;
  top: -15px;
  left: -3px;
  color: #FFD700;
  font-size: 19px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
  z-index: 9999;
  transform: rotate(-18deg);
}

.fd-crown i {
  -webkit-text-stroke: 0.7px white;
}

.fd-member-badge {
  display: none;
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 10;
  border: 1px solid #e94560;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fd-marker-pin {
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Match EV marker style: drop shadow + inset white ring (no solid border). */
  box-shadow: 0 4px 12px rgba(0,0,0,0.25), 0 0 0 2px rgba(255,255,255,0.9) inset;
  position: relative;
  overflow: hidden;
}

/* Diagonal sheen matching the EV pin gradient — lighter on the upper-left
   in pin-local frame, fading to ~18% black at the lower-right. After the
   pin's -45deg rotation this lands as darkening on the right side of the
   marker in screen-space, mirroring the EV marker. */
.fd-marker-pin::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 40%, rgba(0,0,0,0.18) 100%);
  pointer-events: none;
}

.fd-marker-logo {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  transform: rotate(45deg);
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.fd-marker-price {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #333;
  text-shadow: 
    -1px -1px 0 white,
    1px -1px 0 white,
    -1px 1px 0 white,
    1px 1px 0 white,
    0 0 3px white;
  z-index: 9;
}

body.dark-theme .fd-marker-price {
  color: #fff;
  text-shadow:
    -1.5px -1px 0 #42545f,
     1.5px -1px 0 #42545f,
    -1.5px  1px 0 #42545f,
     1.5px  1px 0 #42545f,
     0  0  4px #42545f;
}


body.dark-theme .fd-marker-pin {
  box-shadow: 0 4px 12px rgba(0,0,0,0.45), 0 0 0 2px #42545f inset;
}

body.dark-theme .fd-crown i {
  -webkit-text-stroke: 0.7px #42545f;
}

.filters-card:not(.active),
.search-card:not(.active) {
  box-shadow: none;
}

.card-content {
  padding: 6px 12px 12px 12px;
  margin: -6px -12px -12px -12px;
}

.filters-scroll {
  padding: 6px 12px 12px 12px;
  margin: -6px -12px -12px -12px;
}

/* ---------------------------------
   FD DIRECTIONS MODAL (Apple / Google / Waze)
---------------------------------- */
.fd-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none; /* set to flex via JS */
  align-items: center;
  justify-content: center;
  z-index: 11000; /* above .fc-overlay (10000) */
  padding: 16px;
  box-sizing: border-box;
}
.fd-modal {
  position: relative;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-radius: 16px;
  padding: 24px;
  max-width: 320px;
  width: 90vw;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  color: var(--fd-text-primary);
}
body.dark-theme .fd-modal {
  background: rgba(30,30,35,0.98);
}
.fd-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #888;
  cursor: pointer;
  padding: 4px 8px;
}
.fd-modal-close:hover { color: var(--fd-text-primary); }
.fd-modal-title {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--fd-text-primary);
}
.fd-modal-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fd-modal-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  color: var(--fd-text-primary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.fd-modal-option:hover { background: #f5f5f5; }
.fd-modal-option:active { transform: scale(0.98); }
body.dark-theme .fd-modal-option {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: var(--fd-text-primary);
}
body.dark-theme .fd-modal-option:hover { background: rgba(255,255,255,0.12); }

/* ============================================================
   EV iframe additions: chip row, kW dropdown, operator list,
   bottom-sheet EV rows. Top-search bar hidden (suburb pages
   deferred to a later phase).
============================================================ */

/* Connector-type dropdown — same shape as the old fuel-type dropdown,
   sits inside .search-bar-combined next to the suburb search input. */
.ev-connector-dropdown {
  flex: 0 0 auto;
  position: relative;
  min-width: 110px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 3px;
  z-index: 99999 !important;
}
.ev-connector-selected {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  width: 100%;
  padding: 0 10px;
  border-radius: 18px;
  background: var(--fd-bg-input);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
  font-size: 14px;
  font-weight: 600;
  color: var(--fd-text-primary);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}
.ev-connector-selected:hover { background: rgba(0,0,0,0.04); }
body.dark-theme .ev-connector-selected:hover { background: rgba(255,255,255,0.06); }
.ev-connector-icon {
  font-size: 13px;
  background: linear-gradient(135deg, #00d4aa, #00a884);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ev-connector-caret {
  font-size: 10px;
  color: var(--fd-text-tertiary);
  transition: transform 0.2s ease;
}
.ev-connector-dropdown.is-open .ev-connector-caret { transform: rotate(180deg); }
.ev-connector-list {
  position: absolute;
  top: 40px;
  right: 0;
  margin: 0;
  padding: 6px;
  min-width: 160px;
  list-style: none;
  background: var(--fd-bg-tertiary);
  border: 1px solid var(--fd-border-color);
  border-radius: 12px;
  box-shadow: 0 8px 24px var(--fd-shadow-color);
  z-index: 100000 !important;
}
.ev-connector-list li {
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fd-text-primary);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.ev-connector-list li:hover { background: rgba(0,0,0,0.05); }
body.dark-theme .ev-connector-list li:hover { background: rgba(255,255,255,0.06); }
.ev-connector-list li.is-selected {
  background: rgba(0,168,132,0.12);
  color: #00855f;
}
body.dark-theme .ev-connector-list li.is-selected {
  background: rgba(0,212,170,0.18);
  color: #4ade80;
}

.filters-section h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--fd-text-primary);
  letter-spacing: 0.2px;
}
.filters-section-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--fd-text-tertiary);
}

.ev-kw-select { position: relative; }
.ev-kw-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--fd-border-color);
  border-radius: 12px;
  background: var(--fd-bg-input);
  color: var(--fd-text-primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.ev-kw-trigger i { font-size: 12px; color: var(--fd-text-tertiary); margin-left: 8px; }
.ev-kw-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--fd-bg-tertiary);
  border: 1px solid var(--fd-border-color);
  border-radius: 12px;
  box-shadow: 0 8px 24px var(--fd-shadow-color);
  z-index: 100;
}
.ev-kw-options li {
  padding: 10px 12px;
  font-size: 15px;
  color: var(--fd-text-primary);
  border-radius: 8px;
  cursor: pointer;
}
.ev-kw-options li:hover { background: rgba(0,0,0,0.05); }
body.dark-theme .ev-kw-options li:hover { background: rgba(255,255,255,0.06); }
.ev-kw-options li.is-selected {
  background: rgba(0,168,132,0.12);
  color: #00855f;
  font-weight: 700;
}
body.dark-theme .ev-kw-options li.is-selected { background: rgba(0,212,170,0.18); color: #4ade80; }

.ev-operator-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 280px;
  overflow-y: auto;
}
.ev-operator-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 15px;
  color: var(--fd-text-primary);
  cursor: pointer;
  transition: background 0.18s ease;
}
.ev-operator-row:hover { background: rgba(0,0,0,0.04); }
body.dark-theme .ev-operator-row:hover { background: rgba(255,255,255,0.05); }
.ev-operator-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #00a884;
  cursor: pointer;
}

.station-item.ev-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.18s ease;
}
.station-item.ev-row:hover { background: rgba(0,0,0,0.04); }
body.dark-theme .station-item.ev-row:hover { background: rgba(255,255,255,0.05); }
.ev-row-main { flex: 1 1 auto; min-width: 0; }
.ev-row-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--fd-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ev-row-meta {
  display: flex;
  gap: 8px;
  margin-top: 2px;
  font-size: 12px;
  color: var(--fd-text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ev-row-op { font-weight: 600; }
.ev-row-conns { opacity: 0.85; }
.ev-row-side {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.ev-row-kw { font-size: 12px; }
.ev-row-dist { font-size: 12px; color: var(--fd-text-tertiary); font-variant-numeric: tabular-nums; }
.station-item.is-empty {
  padding: 18px;
  text-align: center;
  color: var(--fd-text-tertiary);
  font-size: 14px;
}