/* Isolated visual proposal only. Load after existing shared styles and add
   ev-map-proposal to <body>. No production stylesheet or map code is changed. */
body.ev-map-proposal {
  --map-proposal-lime: #cfff58;
  --map-proposal-orange: #ff9c44;
  --map-proposal-purple: #b68cff;
}
.ev-map-proposal .map-filter-handle { width: 38px; height: 4px; border-radius: 5px; background: #77947b; margin: -7px auto 15px; }
.ev-map-proposal .map-filter-header p { margin: 5px 0 0; color: #b4c9bc; font-size: 12px; }
.ev-map-proposal .map-filter-content > h3 { margin: 18px 0 10px; font-size: 15px; color: #eaf2e6; }
.ev-map-proposal .map-filter-content > h3:first-child { margin-top: 0; }
.ev-map-proposal .map-filter-hint { margin: -5px 0 12px; font-size: 11px; color: #adc6b5; }
.ev-map-proposal .map-filter-description { margin: 18px 0 0; color: #aac3b4; font-size: 11px; }
.ev-map-proposal .map-filter-trigger { position: relative; }
.ev-map-proposal .map-filter-trigger.active { color: #cfff58; border-color: #cfff58; }
.ev-map-proposal .map-filter-badge { position: absolute; right: -4px; top: -5px; min-width: 17px; height: 17px; padding: 1px 4px; border-radius: 12px; background: #cfff58; color: #14220c; font-size: 10px; }
.ev-map-proposal .map-power-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ev-map-proposal .map-power-offline { display: none; }

/* Preserve the approved wordmark. One compact row replaces the old two buttons:
   online count on the left, the existing green balance button on the right. */
.ev-map-proposal .map-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand brand" "network wallet";
  align-items: center;
  gap: 10px 12px;
  top: 14px;
  left: 14px;
  right: 14px;
  max-width: none;
}
.ev-map-proposal .ev-map-brand { grid-area: brand; padding: 0 2px; }
.ev-map-proposal .ev-map-brand .evcar-logo { width: 120px; }
.ev-map-proposal .map-top .map-list { display: none; }
.ev-map-proposal .map-top .map-caption {
  grid-area: network;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  max-width: 100%;
  padding: 10px 13px;
  border: 1px solid #6d9c79;
  border-radius: 18px;
  background: #062d20ed;
  box-shadow: inset 0 1px 0 #d6f5c518, 0 3px 14px #00190c40;
  color: #f0f6ec;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
.ev-map-proposal .map-top .map-caption::before {
  content: "";
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--map-proposal-lime);
  box-shadow: 0 0 9px #b1ef5b4a;
}
.ev-map-proposal .map-caption > span { padding: 0; border: 0; background: none; }
.ev-map-proposal #map-wallet { grid-area: wallet; width: auto; min-width: 0; }
.ev-map-proposal #map-wallet .map-balance-amount {
  position: relative;
  width: auto;
  min-width: 130px;
  height: 38px;
  min-height: 38px;
  margin: 0;
  padding: 6px 12px;
  border-radius: 18px;
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}
/* The visible pill is 38px; its transparent hit area remains 44px tall. */
.ev-map-proposal #map-wallet .map-balance-amount::before {
  content: "";
  position: absolute;
  inset: -3px 0;
  border-radius: inherit;
}
/* Financial/offline warnings retain their full text instead of being forced
   into the compact normal-balance slot. */
.ev-map-proposal .map-top:has(#map-wallet .home-balance, #map-wallet .connection-notice) {
  grid-template-areas: "brand brand" "network network" "wallet wallet";
}
.ev-map-proposal .map-top #map-wallet .home-balance,
.ev-map-proposal .map-top #map-wallet .connection-notice { margin: 0; }

/* A small legend stays bottom-left. Existing marker art/colors are untouched;
   filter/location/zoom return bottom-right with their 44px touch targets. */
.ev-map-proposal .map-bottom { left: 14px; right: 74px; bottom: 28px; }
.ev-map-proposal .map-shell .map-controls,
.ev-map-proposal .map-shell:has(.home-balance) .map-controls {
  top: auto;
  right: 14px;
  bottom: 32px;
  gap: 8px;
}
.ev-map-proposal .map-controls > button,
.ev-map-proposal .zoom-controls {
  background: #062d20f2;
  border-color: #6d9c79;
  border-radius: 17px;
  box-shadow: inset 0 1px 0 #d6f5c518, 0 3px 14px #00190c40;
}
.ev-map-proposal .map-controls button { width: 44px; height: 44px; color: #f0f6ec; }
.ev-map-proposal .zoom-controls button + button { border-top-color: #547f61; }
.ev-map-proposal .map-power-legend {
  display: grid;
  gap: 5px;
  width: fit-content;
  max-width: min(100%, calc(100vw - 88px));
  padding: 7px 9px;
  border: 1px solid #577f60;
  border-radius: 13px;
  background: #052b20f5;
  box-shadow: inset 0 1px 0 #d6f5c510, 0 2px 10px #00190c40;
  color: #eff7eb;
}
.ev-map-proposal .map-power-title {
  margin: 0 0 1px;
  color: #c4d8c8;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.2;
}
.ev-map-proposal .map-power-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ev-map-proposal .map-power-items > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.ev-map-proposal .map-power-legend i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #ffffff35;
}
.ev-map-proposal .map-power-legend :is(.lime, .power-lime) { background: var(--map-proposal-lime); }
.ev-map-proposal .map-power-legend :is(.orange, .power-orange) { background: var(--map-proposal-orange); }
.ev-map-proposal .map-power-legend :is(.purple, .power-purple) { background: var(--map-proposal-purple); }

@media (max-width: 350px) {
  .ev-map-proposal .map-top { left: 10px; right: 10px; gap: 9px 8px; }
  .ev-map-proposal .map-top .map-caption { padding-inline: 10px; font-size: 11px; }
  .ev-map-proposal #map-wallet .map-balance-amount { min-width: 126px; padding-inline: 11px; font-size: 17px; }
  .ev-map-proposal .map-bottom { left: 10px; right: 65px; }
  .ev-map-proposal .map-shell .map-controls { right: 10px; }
  .ev-map-proposal .map-power-legend { max-width: min(100%, calc(100vw - 75px)); padding-inline: 7px; gap: 4px; }
  .ev-map-proposal .map-power-items { gap: 6px; }
  .ev-map-proposal .map-power-items > span { font-size: 9px; gap: 3px; }
}
@media (min-width: 700px) {
  .ev-map-proposal .map-top { max-width: 440px; }
  .ev-map-proposal .map-bottom { max-width: 440px; }
}

/* Filter occupies the former bottom-right QR action position. */
.ev-map-proposal .map-filter-trigger { position: relative; }
.ev-map-proposal .map-filter-trigger.has-filters {
  color: #14220c;
  border-color: var(--map-proposal-lime);
  background: var(--map-proposal-lime);
}
.ev-map-proposal .map-filter-trigger.has-filters::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #14220c;
}
.ev-map-proposal .map-filter-overlay {
  position: fixed;
  z-index: 2200;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: #00180f8c;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.ev-map-proposal .map-filter-overlay[hidden] { display: none !important; }
.ev-map-proposal .map-filter-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  max-height: 66dvh;
  min-height: 0;
  padding: 18px 18px max(18px, env(safe-area-inset-bottom));
  border: 1px solid #6b9571;
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  color: #f3f8ee;
  background: linear-gradient(145deg, #0b3d29, #03281d 58%, #03241a);
  box-shadow: inset 0 1px 0 #d6f5c522, 0 -15px 50px #00130f55;
  font-family: inherit;
  overflow: hidden;
}
.ev-map-proposal .map-filter-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin-bottom: 16px;
}
.ev-map-proposal .map-filter-header h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -.55px;
  font-weight: 800;
}
.ev-map-proposal .map-filter-close {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #709277;
  border-radius: 15px;
  background: #0c3929;
  color: #f3f8ee;
}
.ev-map-proposal .map-filter-close .icon { width: 20px; height: 20px; }
.ev-map-proposal .map-filter-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1px 1px 3px;
  scrollbar-width: thin;
  scrollbar-color: #6c9c65 transparent;
}
.ev-map-proposal .map-filter-group + .map-filter-group { margin-top: 20px; }
.ev-map-proposal .map-filter-group h3 {
  margin: 0 0 10px;
  color: #d6e7d4;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
}
.ev-map-proposal .map-filter-options { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-map-proposal .map-filter-chip {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  max-width: 100%;
  padding: 10px 13px;
  border: 1px solid #6b9274;
  border-radius: 15px;
  background: #0d3a2a;
  box-shadow: inset 0 1px 0 #c9e8c20b;
  color: #f0f5ec;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}
.ev-map-proposal .map-filter-chip:is(.selected, [aria-pressed="true"]) {
  color: #14220c;
  border-color: var(--map-proposal-lime);
  background: var(--map-proposal-lime);
  box-shadow: inset 0 1px 0 #f9ffb575, 0 0 14px #b6f45818;
}
.ev-map-proposal .map-filter-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  gap: 10px;
  margin-top: 20px;
}
.ev-map-proposal .map-filter-actions > button {
  min-width: 0;
  min-height: 48px;
  padding: 12px 15px;
  border: 1px solid #7b9d7a;
  border-radius: 16px;
  background: #123f2b;
  color: #f3f8ee;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
}
.ev-map-proposal .map-filter-actions .map-filter-apply {
  flex: 1 1 auto;
  border-color: var(--map-proposal-lime);
  background: var(--map-proposal-lime);
  color: #14220c;
}
.ev-map-proposal :is(.map-filter-close, .map-filter-chip, .map-filter-actions > button):focus-visible {
  outline: 3px solid #efffc6;
  outline-offset: 2px;
}
@media (max-width: 350px) {
  .ev-map-proposal .map-filter-panel { padding-inline: 14px; }
  .ev-map-proposal .map-filter-header h2 { font-size: 21px; }
  .ev-map-proposal .map-filter-chip { padding-inline: 11px; font-size: 11px; }
  .ev-map-proposal .map-filter-actions > button { padding-inline: 12px; font-size: 12px; }
}
