/* Pakistan EV charging map — CarvoltX (distinct from flat white map UIs) */

.ev-cmap-body .site-footer {
  margin-top: 0;
}

.ev-cmap {
  --cmap-ink: #e8f1f2;
  --cmap-muted: rgba(232, 241, 242, 0.62);
  --cmap-line: rgba(232, 241, 242, 0.12);
  --cmap-panel: rgba(8, 18, 22, 0.88);
  --cmap-teal: #2dd4bf;
  --cmap-teal-deep: #0f766e;
  --cmap-coral: #fb923c;
  --cmap-violet: #a78bfa;
  color: var(--cmap-ink);
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(45, 212, 191, 0.18), transparent 55%),
    radial-gradient(720px 380px at 92% 8%, rgba(251, 146, 60, 0.14), transparent 50%),
    linear-gradient(168deg, #050a0c 0%, #0b171c 46%, #0a2f2e 130%);
  min-height: 70vh;
}

.ev-cmap-hero {
  padding: clamp(1.75rem, 4vw, 2.75rem) 0 1.25rem;
}

.ev-cmap-hero-inner {
  display: grid;
  gap: 1.25rem;
}

.ev-cmap-crumbs {
  margin: 0;
}

.ev-cmap-crumbs a {
  color: var(--cmap-teal);
}

.ev-cmap-crumbs span {
  color: var(--cmap-muted);
}

.ev-cmap-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cmap-teal);
}

.ev-cmap-title {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3.15rem);
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: #fff;
}

.ev-cmap-lead {
  margin: 0.75rem 0 0;
  max-width: none;
  width: 100%;
  color: var(--cmap-muted);
  font-size: 1.02rem;
  line-height: 1.55;
  font-weight: 500;
}

.ev-cmap-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.ev-cmap-stat {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--cmap-line);
  background: linear-gradient(160deg, rgba(20, 40, 46, 0.9), rgba(10, 22, 26, 0.75));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ev-cmap-stat-val {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.ev-cmap-stat-label {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--cmap-muted);
  font-weight: 600;
}

.ev-cmap-workspace {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 0;
  min-height: min(78vh, 860px);
  border-top: 1px solid var(--cmap-line);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 0.75rem 1.5rem;
}

.ev-cmap-rail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem 0.85rem 1rem;
  background: var(--cmap-panel);
  border: 1px solid var(--cmap-line);
  border-right: none;
  border-radius: 18px 0 0 18px;
  backdrop-filter: none;
  min-height: 0;
  max-height: min(78vh, 860px);
  overflow: hidden;
}

.ev-cmap-rail-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.ev-cmap-search input {
  width: 100%;
  border: 1px solid var(--cmap-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  padding: 0.65rem 0.8rem;
  font: inherit;
  font-size: 0.92rem;
}

.ev-cmap-search input::placeholder {
  color: rgba(232, 241, 242, 0.4);
}

.ev-cmap-search input:focus {
  outline: 2px solid rgba(45, 212, 191, 0.45);
  outline-offset: 1px;
}

.ev-cmap .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ev-cmap-near {
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.35);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0 0.85rem;
  white-space: nowrap;
  cursor: pointer;
}

.ev-cmap-near:hover,
.ev-cmap-near.is-on {
  background: rgba(45, 212, 191, 0.28);
}

.ev-cmap-city {
  position: relative;
  z-index: 6;
  display: grid;
  gap: 0.3rem;
  flex-shrink: 0;
}

.ev-cmap-dd-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border: 1px solid var(--cmap-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  padding: 0.65rem 0.8rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.ev-cmap-dd-btn::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid rgba(232, 241, 242, 0.65);
  border-bottom: 2px solid rgba(232, 241, 242, 0.65);
  transform: rotate(45deg);
  margin-top: -0.2rem;
  flex-shrink: 0;
}

.ev-cmap-dd-btn[aria-expanded="true"]::after {
  transform: rotate(-135deg);
  margin-top: 0.15rem;
}

.ev-cmap-dd-btn:focus {
  outline: 2px solid rgba(45, 212, 191, 0.45);
  outline-offset: 1px;
}

.ev-cmap-dd-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 20;
  max-height: min(240px, 40vh);
  overflow: auto;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid rgba(45, 212, 191, 0.28);
  background: #0d1a1e;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 0.2rem;
}

.ev-cmap-dd-menu[hidden] {
  display: none !important;
}

.ev-cmap-dd-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--cmap-ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
}

.ev-cmap-dd-menu button:hover,
.ev-cmap-dd-menu button.is-on {
  background: rgba(45, 212, 191, 0.16);
  color: #fff;
}

.ev-cmap-dd-count {
  color: var(--cmap-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.ev-cmap-filters {
  display: grid;
  gap: 0.55rem;
  flex-shrink: 0;
}

.ev-cmap-filter-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cmap-muted);
}

.ev-cmap-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ev-cmap-chip {
  border: 1px solid var(--cmap-line);
  border-radius: 999px;
  background: transparent;
  color: var(--cmap-muted);
  font-size: 0.75rem;
  font-weight: 650;
  padding: 0.28rem 0.65rem;
  cursor: pointer;
}

.ev-cmap-chip.is-on {
  color: #042f2e;
  background: var(--cmap-teal);
  border-color: transparent;
}

.ev-cmap-list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--cmap-muted);
  font-weight: 600;
  flex-shrink: 0;
}

.ev-cmap-chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ev-cmap-list {
  flex: 1;
  overflow: auto;
  display: grid;
  gap: 0.45rem;
  padding-right: 0.15rem;
  min-height: 0;
}

.ev-cmap-card {
  text-align: left;
  width: 100%;
  border: 1px solid var(--cmap-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.ev-cmap-card:hover,
.ev-cmap-card.is-active {
  border-color: rgba(45, 212, 191, 0.55);
  background: rgba(45, 212, 191, 0.08);
  transform: translateY(-1px);
}

.ev-cmap-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
}

.ev-cmap-card-name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: #fff;
}

.ev-cmap-card-power {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--cmap-coral);
}

.ev-cmap-card-meta {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--cmap-muted);
  line-height: 1.35;
}

.ev-cmap-card-bar {
  margin-top: 0.5rem;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.ev-cmap-card-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cmap-teal-deep), var(--cmap-teal));
}

.ev-cmap-empty {
  padding: 1.25rem 0.5rem;
  text-align: center;
  color: var(--cmap-muted);
  font-size: 0.9rem;
}

.ev-cmap-stage {
  position: relative;
  min-height: min(78vh, 860px);
  border: 1px solid var(--cmap-line);
  border-radius: 0 18px 18px 0;
  overflow: hidden;
  background: #0a1215;
}

.ev-cmap-map {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Darken free OSM tiles (no third-party map API key). */
.ev-cmap-map .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.95) saturate(0.65);
}

.ev-cmap-map .leaflet-marker-pane,
.ev-cmap-map .leaflet-tooltip-pane,
.ev-cmap-map .leaflet-overlay-pane {
  filter: none;
}

.ev-cmap-stage-actions {
  position: absolute;
  z-index: 5;
  left: 0.75rem;
  bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ev-cmap-linkout {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(8, 18, 22, 0.82);
  border: 1px solid var(--cmap-line);
  color: var(--cmap-ink);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(8px);
}

.ev-cmap-linkout:hover {
  color: #fff;
  border-color: rgba(45, 212, 191, 0.5);
}

.ev-cmap-drawer {
  position: absolute;
  z-index: 8;
  right: 1.1rem;
  top: 1.1rem;
  width: min(360px, calc(100% - 2rem));
  max-height: calc(100% - 2.2rem);
  overflow: auto;
  padding: 1rem 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(45, 212, 191, 0.28);
  background:
    linear-gradient(165deg, rgba(12, 28, 32, 0.96), rgba(8, 16, 20, 0.94));
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
  animation: evCmapDrawerIn 0.28s ease;
}

.ev-cmap-drawer[hidden] {
  display: none !important;
}

@keyframes evCmapDrawerIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.ev-cmap-drawer-close {
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.ev-cmap-drawer-title {
  margin: 0 1.5rem 0.25rem 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.ev-cmap-drawer-sub {
  margin: 0;
  color: var(--cmap-muted);
  font-size: 0.86rem;
}

.ev-cmap-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.85rem 0;
}

.ev-cmap-badge {
  font-size: 0.72rem;
  font-weight: 750;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--cmap-line);
  color: var(--cmap-ink);
}

.ev-cmap-badge.is-dc {
  background: rgba(251, 146, 60, 0.18);
  border-color: rgba(251, 146, 60, 0.35);
  color: #fdba74;
}

.ev-cmap-badge.is-ac {
  background: rgba(45, 212, 191, 0.14);
  border-color: rgba(45, 212, 191, 0.35);
  color: #5eead4;
}

.ev-cmap-drawer-note {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--cmap-muted);
  line-height: 1.45;
}

.ev-cmap-drawer-actions {
  display: grid;
  gap: 0.45rem;
}

.ev-cmap-drawer-actions a,
.ev-cmap-drawer-actions button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  font-weight: 750;
  font-size: 0.88rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

.ev-cmap-btn-primary {
  background: linear-gradient(120deg, #0f766e, #14b8a6);
  color: #042f2e;
}

.ev-cmap-btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid var(--cmap-line) !important;
}

.ev-cmap-pin {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
}

.ev-cmap-pin-price {
  order: -1;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: rgba(8, 18, 22, 0.92);
  border: 1px solid rgba(232, 241, 242, 0.18);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.ev-cmap-marker {
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

.ev-cmap-marker.is-dc {
  background: linear-gradient(145deg, #fb923c, #ea580c);
}

.ev-cmap-marker.is-ac {
  background: linear-gradient(145deg, #2dd4bf, #0f766e);
}

.ev-cmap-marker.is-active {
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.35), 0 8px 18px rgba(0, 0, 0, 0.4);
}

.ev-cmap-badge.is-price {
  background: rgba(251, 146, 60, 0.18);
  color: #fdba74;
}

.ev-cmap .leaflet-control-zoom a {
  background: rgba(8, 18, 22, 0.9) !important;
  color: #fff !important;
  border-color: var(--cmap-line) !important;
}

.ev-cmap .leaflet-control-attribution {
  background: rgba(8, 18, 22, 0.75) !important;
  color: rgba(232, 241, 242, 0.55) !important;
  font-size: 10px !important;
}

.ev-cmap .leaflet-control-attribution a {
  color: rgba(45, 212, 191, 0.85) !important;
}

@media (max-width: 980px) {
  .ev-cmap-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ev-cmap-workspace {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-bottom: 1rem;
  }

  .ev-cmap-rail {
    border-radius: 18px 18px 0 0;
    border-right: 1px solid var(--cmap-line);
    max-height: none;
  }

  .ev-cmap-list {
    max-height: 280px;
  }

  .ev-cmap-stage {
    min-height: 52vh;
    border-radius: 0 0 18px 18px;
  }

  .ev-cmap-drawer {
    right: 0.6rem;
    left: 0.6rem;
    width: auto;
    top: auto;
    bottom: 0.6rem;
    max-height: 46%;
  }
}
