/* FuelDash V364 — one canonical route/history presentation layer. */

:root {
  --fd-route-red: #ff3b30;
  --fd-route-green: #31d158;
  --fd-route-yellow: #ffcc66;
  --fd-route-surface: #141414;
  --fd-route-field: #09090b;
  --fd-route-border: #292929;
  --fd-route-muted: #9c9ca2;
}

html body #app .fd-route-planner {
  display: grid !important;
  gap: 16px !important;
  padding: 4px 0 28px !important;
  color: #fff !important;
  font-family: inherit !important;
}

html body #app .fd-route-planner > [hidden],
html body #app .fd-route-status[hidden],
html body #app .fd-route-map-section[hidden],
html body #app .fd-route-summary[hidden],
html body #app .fd-route-results[hidden] {
  display: none !important;
}

html body #app .fd-route-status:empty {
  display: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* Typography follows Search/Tankbuch: strong white titles, quiet metadata. */
html body #app .fd-route-heading h1,
html body #app .fd-route-results > header h2,
html body #app .fd-route-history-head h2 {
  color: #fff !important;
  font-size: 20px !important;
  font-weight: 740 !important;
  line-height: 1.15 !important;
  letter-spacing: -.35px !important;
}

html body #app .fd-route-form-head strong {
  color: #fff !important;
  font-size: 17px !important;
  font-weight: 720 !important;
  line-height: 1.2 !important;
}

html body #app :is(.fd-route-heading, .fd-route-form-head, .fd-route-results > header) small,
html body #app .fd-route-history-head > span {
  color: #909096 !important;
  font-size: 11px !important;
  font-weight: 550 !important;
  line-height: 1.3 !important;
}

html body #app .fd-route-control-group > small {
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

html body #app :is(.fd-route-form, .fd-route-controls, .fd-route-summary) {
  border: 1px solid var(--fd-route-border) !important;
  border-radius: 18px !important;
  background: var(--fd-route-surface) !important;
  background-image: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Start/Ziel fields reuse the global FuelDash focus contract. */
html body #app .fd-route-location-field label {
  color: #f2f2f4 !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

html body #app .fd-route-input-wrap {
  box-sizing: border-box !important;
  border: 1px solid var(--fd-border-strong, #26262b) !important;
  border-radius: var(--fd-r124-radius-control, 13px) !important;
  background: var(--fd-field, #09090b) !important;
  background-image: none !important;
  box-shadow: none !important;
}

html body #app .fd-route-input-wrap:focus-within {
  border-color: var(--fd-focus-ring, #ff3b30) !important;
  outline: 0 !important;
  box-shadow: inset 0 0 0 1px var(--fd-focus-ring, #ff3b30) !important;
}

html body #app .fd-route-input-wrap input:is(:focus, :focus-visible) {
  border: 0 !important;
  outline: 0 !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
  -webkit-focus-ring-color: transparent !important;
}

html body #app .fd-route-suggestions {
  overflow: hidden !important;
  border: 1px solid #26262b !important;
  border-radius: 12px !important;
  background: #09090b !important;
  background-image: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html body #app .fd-route-suggestions button {
  min-height: 44px !important;
  color: #fff !important;
  border-bottom-color: #222226 !important;
  background: transparent !important;
}

html body #app .fd-route-suggestions button:active { background: #151517 !important; }
html body #app .fd-route-suggestions strong { color: #fff !important; font-size: 12.5px !important; font-weight: 630 !important; }
html body #app .fd-route-suggestions small { color: #85858c !important; font-size: 10px !important; }

/* Clear control hierarchy without extra nested tiles. */
html body #app .fd-route-controls { gap: 14px !important; padding: 15px !important; }
html body #app .fd-route-control-line { gap: 14px !important; }
html body #app .fd-route-control-group { gap: 7px !important; }
html body #app .fd-route-segmented { gap: 6px !important; }

html body #app .fd-route-segmented button {
  min-height: 40px !important;
  color: #b0b0b5 !important;
  border: 1px solid #303035 !important;
  border-radius: 11px !important;
  background: #080808 !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  box-shadow: none !important;
}

html body #app .fd-route-segmented button.is-active {
  color: #fff !important;
  border-color: var(--fd-route-red) !important;
  background: var(--fd-route-red) !important;
}

html body #app :is(.fd-route-mode-note, .fd-route-help) {
  color: #9a9aa0 !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

html body #app .fd-route-detour-control {
  padding-top: 13px !important;
  border-top: 1px solid var(--fd-route-border) !important;
}

/* Complete, readable route with subordinate metrics and one compact pin action. */
html body #app .fd-route-summary {
  display: grid !important;
  gap: 13px !important;
  padding: 16px !important;
}

html body #app .fd-route-summary-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 36px !important;
  align-items: start !important;
  gap: 12px !important;
}

html body #app .fd-route-summary-route {
  display: grid !important;
  gap: 5px !important;
  min-width: 0 !important;
}

html body #app .fd-route-summary-route > small {
  color: #909096 !important;
  font-size: 11px !important;
  font-weight: 550 !important;
}

html body #app .fd-route-summary-route strong {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  gap: 3px 7px !important;
  min-width: 0 !important;
  overflow: visible !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 710 !important;
  line-height: 1.28 !important;
  letter-spacing: -.18px !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

html body #app :is(.fd-route-summary-start, .fd-route-summary-destination) {
  min-width: 0 !important;
  color: #fff !important;
  overflow-wrap: anywhere !important;
}

html body #app .fd-route-summary-arrow { color: var(--fd-route-red) !important; }

html body #app .fd-route-summary-distance {
  color: #9c9ca2 !important;
  font-size: 12px !important;
  font-weight: 550 !important;
  line-height: 1.3 !important;
}

html body #app .fd-route-summary-actions { display: flex !important; align-items: start !important; }

html body #app .fd-route-summary-pin {
  display: grid !important;
  place-items: center !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #d0d0d4 !important;
  border: 1px solid #36363b !important;
  border-radius: 10px !important;
  background: #080808 !important;
  box-shadow: none !important;
}

html body #app .fd-route-pin-icon {
  width: 18px !important;
  height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body #app .fd-route-summary-pin[aria-pressed="true"] {
  color: var(--fd-route-red) !important;
  border-color: var(--fd-route-red) !important;
  background: rgba(255, 59, 48, .08) !important;
}

html body #app .fd-route-summary-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0 !important;
  padding-top: 12px !important;
  border-top: 1px solid var(--fd-route-border) !important;
}

html body #app .fd-route-summary-meta span {
  padding: 0 !important;
  color: var(--fd-route-muted) !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
}

html body #app .fd-route-summary-meta span + span::before {
  content: '·' !important;
  padding: 0 7px !important;
  color: #5d5d63 !important;
}

html body #app .fd-route-best-note {
  gap: 10px !important;
  padding-top: 13px !important;
  border-top: 1px solid #292929 !important;
}

html body #app .fd-route-best-note strong { color: var(--fd-route-green) !important; font-size: 14px !important; font-weight: 700 !important; }

/* Search-card surface plus one status edge; no glow and no competing inner outline. */
html body #app .fd-route-result-list { gap: 10px !important; }

html body #app .fd-route-result-row {
  box-sizing: border-box !important;
  overflow: hidden !important;
  border: 1px solid #2b2b2b !important;
  border-radius: var(--fd-r124-radius-card, 22px) !important;
  background-color: transparent !important;
  background-image: var(--fd-r124-card-dark, linear-gradient(145deg, rgba(20, 20, 22, .92), rgba(7, 7, 9, .96))) !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: blur(24px) saturate(126%) !important;
  backdrop-filter: blur(24px) saturate(126%) !important;
}

html body #app .fd-route-result-row.is-best {
  border-color: var(--fd-route-green) !important;
  box-shadow: inset 0 0 0 1px var(--fd-route-green) !important;
}

html body #app .fd-route-result-row.is-second {
  border-color: var(--fd-route-yellow) !important;
  box-shadow: inset 0 0 0 1px var(--fd-route-yellow) !important;
}

html body #app .fd-route-result-row.is-other {
  border-color: var(--fd-route-red) !important;
  box-shadow: inset 0 0 0 1px var(--fd-route-red) !important;
}

html body #app .fd-route-result-copy > strong {
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 680 !important;
  line-height: 1.2 !important;
}

html body #app .fd-route-result-price {
  align-self: start !important;
  display: grid !important;
  justify-items: end !important;
  gap: 0 !important;
  min-width: 68px !important;
  text-align: right !important;
}

html body #app .fd-route-result-price strong {
  color: var(--fd-route-red) !important;
  font-size: 18px !important;
  font-weight: 760 !important;
  line-height: 1 !important;
  letter-spacing: -.35px !important;
}

html body #app .fd-route-result-price.is-best strong { color: var(--fd-route-green) !important; }
html body #app .fd-route-result-price.is-second strong { color: var(--fd-route-yellow) !important; }
html body #app .fd-route-result-price.is-other strong { color: var(--fd-route-red) !important; }

html body #app .fd-route-result-fuel {
  display: block !important;
  margin-top: 4px !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.15 !important;
  opacity: .84 !important;
}

html body #app .fd-route-result-logo {
  position: relative !important;
  isolation: isolate !important;
  display: grid !important;
  width: 44px !important;
  height: 44px !important;
  padding: 5px !important;
  place-items: center !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  border: 1px solid #e2e2e7 !important;
  border-radius: 11px !important;
  background: #f7f7f9 !important;
  box-shadow: none !important;
}

html body #app .fd-route-result-logo img {
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 34px !important;
  max-height: 34px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  object-fit: contain !important;
  object-position: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body #app .fd-route-result-logo img[hidden] {
  display: none !important;
}

html body #app .fd-route-result-main {
  grid-template-columns: 44px minmax(0, 1fr) auto !important;
}

html body #app .fd-route-logo-fallback {
  position: absolute !important;
  z-index: 2 !important;
  inset: 5px !important;
  width: auto !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 7px !important;
}

html body #app .fd-route-logo-fallback[hidden] {
  display: none !important;
}

html body #app .fd-route-result-actions {
  grid-template-columns: repeat(2, minmax(112px, 138px)) !important;
  justify-content: start !important;
  gap: 8px !important;
  padding: 0 13px 13px 67px !important;
}

html body #app .fd-route-result-actions a {
  min-height: 36px !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;
  color: #d0d0d5 !important;
  border-color: #34343a !important;
  border-radius: 10px !important;
  background: #09090b !important;
  font-size: 11px !important;
  font-weight: 650 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

html body #app .fd-route-details {
  display: inline-flex !important;
  width: max-content !important;
  margin: 2px 0 1px !important;
  padding: 0 !important;
  color: #ff554b !important;
  border: 0 !important;
  background: transparent !important;
  font: inherit !important;
  font-size: 11px !important;
  font-weight: 650 !important;
}

/* Route map = the same Carto calibration as the normal Search map. */
html body #app .fd-route-map .leaflet-container { background: #0b0c0e !important; }
html body #app .fd-route-map .leaflet-tile-pane { filter: saturate(.82) brightness(1.28) contrast(.96) !important; }
html body #app .fd-route-map .leaflet-control-attribution { display: none !important; }

html body #app .fd-route-map-legend {
  color: #818188 !important;
  font-size: 11px !important;
}

html body #app .fd-route-map-legend i {
  width: 8px !important;
  height: 8px !important;
  border: 0 !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

html body #app .fd-route-map-legend i.is-route { background: var(--fd-route-red) !important; }
html body #app .fd-route-map-legend i.is-best { background: var(--fd-route-green) !important; }
html body #app .fd-route-map-legend i.is-second { background: var(--fd-route-yellow) !important; }
html body #app .fd-route-map-legend i.is-other { background: #ff3b30 !important; }

html body #app .fd-route-endpoint.is-start,
html body #app .fd-route-endpoint.is-destination {
  color: #fff !important;
  border-color: #fff !important;
  background: #ff3b30 !important;
  box-shadow: none !important;
}

/* Search marker geometry, with status only in edge and translucent surface. */
html body #app .fd-route-station-marker-icon {
  display: block !important;
  width: 80px !important;
  height: 38px !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
}

html body #app .fd-route-station-marker {
  position: relative !important;
  display: grid !important;
  grid-template-rows: auto auto !important;
  align-content: center !important;
  justify-items: center !important;
  gap: 1px !important;
  width: 80px !important;
  min-width: 80px !important;
  height: 32px !important;
  box-sizing: border-box !important;
  padding: 3px 5px 2px !important;
  overflow: visible !important;
  border: 1px solid var(--fd-route-red) !important;
  border-radius: 15px !important;
  background: rgba(60, 18, 17, .94) !important;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .46) !important;
  color: #fff !important;
  font: inherit !important;
  text-align: center !important;
}

html body #app .fd-route-station-marker :is(.fd-station-marker__price, .fd-station-marker__name) {
  position: relative !important;
  z-index: 1 !important;
  color: #fff !important;
}

html body #app .fd-route-station-marker .fd-station-marker__price { font-size: 11px !important; font-weight: 800 !important; line-height: 1 !important; }
html body #app .fd-route-station-marker .fd-station-marker__name { width: 100% !important; overflow: hidden !important; font-size: 8px !important; font-weight: 700 !important; line-height: 1.1 !important; text-overflow: ellipsis !important; white-space: nowrap !important; }

html body #app .fd-route-station-marker .fd-station-marker__tip {
  position: absolute !important;
  z-index: 0 !important;
  top: 27px !important;
  left: 35px !important;
  width: 10px !important;
  height: 11px !important;
  border: 0 !important;
  background: rgba(60, 18, 17, .94) !important;
  clip-path: polygon(0 0, 100% 0, 50% 100%) !important;
}

html body #app .fd-route-station-marker.is-best { border-color: var(--fd-route-green) !important; background: rgba(13, 36, 21, .94) !important; }
html body #app .fd-route-station-marker.is-best .fd-station-marker__tip { background: rgba(13, 36, 21, .94) !important; }
html body #app .fd-route-station-marker.is-second { border-color: var(--fd-route-yellow) !important; background: rgba(36, 27, 6, .94) !important; }
html body #app .fd-route-station-marker.is-second .fd-station-marker__tip { background: rgba(36, 27, 6, .94) !important; }
html body #app .fd-route-station-marker.is-other { border-color: #ff3b30 !important; background: rgba(60, 18, 17, .94) !important; }
html body #app .fd-route-station-marker.is-other .fd-station-marker__tip { background: rgba(60, 18, 17, .94) !important; }

/* Keep favorites and history surfaces flat while preserving the chart itself. */
html body #app :is(.favorites-screen-card, .favorites-block, .detail-chart) {
  background: #0a0a0a !important;
  background-image: none !important;
  border-color: #252529 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html body #app :is(.station-result .favorite-toggle, .favorites-screen-card .favorite-toggle, .detail-favorite) {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  border: 1px solid #2b2b2b !important;
  border-radius: 14px !important;
  background: #141414 !important;
  box-shadow: none !important;
  color: #e5e5e5 !important;
}

html body #app .detail-chart :is(.detail-monitoring-status, .detail-history-status, .empty-state) {
  margin: 12px 0 0 !important;
  padding: 12px 0 0 !important;
  border: 0 !important;
  border-top: 1px solid #252529 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #96969d !important;
}

@media (max-width: 390px) {
  html body #app .fd-route-result-main { grid-template-columns: 40px minmax(0, 1fr) auto !important; }
  html body #app .fd-route-result-logo { width: 40px !important; height: 40px !important; padding: 4px !important; }
  html body #app .fd-route-result-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    padding-left: 63px !important;
  }
  html body #app .fd-route-summary-route strong { font-size: 15px !important; }
  html body #app .fd-route-result-price strong { font-size: 17px !important; }
}
