:root {
  --radar-accent: #6366f1;
  --radar-surface: #111827;
}

.radar-body {
  --accent: var(--radar-accent);
}

.radar-body #main {
  min-height: 0;
  flex: 1;
}

/* Явная высота — иначе Leaflet даёт пустое синее поле */
.radar-body #leaflet-map {
  flex: 1;
  width: 100%;
  min-height: 200px;
  height: calc(100dvh - var(--header-h) - var(--city-bar-h));
}

.radar-body .leaflet-control-attribution a[href*="leafletjs.com"] {
  display: none !important;
}

.radar-city-bar .radar-classic-link,
.radar-city-bar .map-old-link,
.radar-city-bar .map-app-link {
  margin-left: 6px;
  flex-shrink: 0;
  color: #64748b;
  text-decoration: none;
  white-space: nowrap;
  font-size: 12px;
  opacity: 0.9;
}

.radar-city-bar .radar-classic-link:hover,
.radar-city-bar .map-old-link:hover,
.radar-city-bar .map-app-link:hover {
  color: #94a3b8;
  text-decoration: underline;
  opacity: 1;
}

.radar-body #loading {
  top: calc(var(--header-h) + var(--city-bar-h) + 12px);
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  max-width: min(420px, calc(100% - 24px));
}

.radar-loading-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 2px;
}

.radar-loading-form input[type="email"] {
  flex: 1 1 160px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 13px;
}

.radar-loading-form button[type="submit"] {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.radar-loading-form button[type="submit"]:hover {
  background: rgba(99, 102, 241, 0.3);
}

.radar-loading-form-status {
  width: 100%;
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
}

.radar-loading-form-status[data-state="success"] { color: #86efac; }
.radar-loading-form-status[data-state="error"] { color: #fca5a5; }

.radar-loading-form .subscribe-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.radar-loading-anim {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 56px;
  height: 22px;
  flex-shrink: 0;
}

.radar-loading-pump {
  position: absolute;
  left: 0;
  font-size: 16px;
  line-height: 1;
  z-index: 1;
}

.radar-loading-track {
  position: absolute;
  left: 18px;
  right: 0;
  top: 0;
  bottom: 0;
  overflow: hidden;
}

.radar-loading-car {
  position: absolute;
  top: 1px;
  left: 0;
  font-size: 15px;
  line-height: 1;
  animation: radar-car-refuel 2.4s ease-in-out infinite;
}

.radar-loading-text {
  white-space: normal;
  max-width: min(320px, 70vw);
  line-height: 1.35;
}

@keyframes radar-car-refuel {
  0% {
    transform: translateX(28px);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  45% {
    transform: translateX(0);
  }
  55% {
    transform: translateX(0) translateY(0);
  }
  60% {
    transform: translateX(0) translateY(-2px);
  }
  65% {
    transform: translateX(0) translateY(0);
  }
  70% {
    transform: translateX(0);
  }
  88% {
    opacity: 1;
    transform: translateX(-4px);
  }
  100% {
    opacity: 0;
    transform: translateX(-10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .radar-loading-car {
    animation: none;
    left: 8px;
    opacity: 1;
  }
}

.radar-header {
  gap: 8px;
}

.radar-header h1 {
  font-size: 15px;
}

.radar-beta {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  flex-shrink: 0;
}

.radar-sources-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--radar-surface);
  border-bottom: 1px solid #334155;
  font-size: 12px;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}

.radar-sources-bar::-webkit-scrollbar {
  display: none;
}

.radar-sources-label {
  color: var(--muted);
  white-space: nowrap;
}

.radar-source-chip {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #334155;
  white-space: nowrap;
  font-size: 11px;
}

.radar-source-chip.bank {
  border-color: rgba(255, 149, 0, 0.45);
  color: #ffb347;
  background: linear-gradient(90deg, rgba(255, 149, 0, 0.12), rgba(64, 224, 208, 0.12));
}

.radar-source-chip.yandex { border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }
.radar-source-chip.alfa { border-color: rgba(239, 68, 68, 0.35); color: #f87171; }
.radar-source-chip.dgis { border-color: rgba(25, 170, 30, 0.5); color: #4ade80; }

.radar-source-chip.benzin {
  border-color: rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

.radar-signal-source.yandex { color: #fca5a5; }
.radar-signal-source.alfa { color: #f87171; }
.radar-signal-source.dgis { color: #4ade80; }
.radar-signal-source.benzin { color: #93c5fd; }

.bank-word--tbank { color: #ff9500; font-weight: 700; }
.bank-word--sber { color: #40e0d0; font-weight: 700; }

.radar-signal.bank-signal {
  border-color: rgba(100, 116, 139, 0.5);
}

.radar-signal-source.tbank,
.radar-signal-source.sber {
  color: #e2e8f0;
}

.radar-badge.notify {
  border-color: rgba(99, 102, 241, 0.5);
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.12);
}

.radar-classic-link {
  margin-left: auto;
  color: #a5b4fc;
  text-decoration: none;
  white-space: nowrap;
}

.radar-classic-link:hover {
  text-decoration: underline;
}

.radar-legend {
  top: auto;
  bottom: 16px;
  left: 12px;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.radar-legend-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.radar-legend-toggle::after {
  content: '▾';
  font-size: 11px;
  color: #94a3b8;
}

.radar-legend.is-open .radar-legend-toggle::after {
  content: '▴';
}

.radar-legend-body {
  position: relative;
  padding: 10px 12px 12px;
}

.radar-legend .map-legend-close {
  top: 6px;
  right: 6px;
}

.radar-legend .map-legend-sep {
  height: 1px;
  background: #334155;
  margin: 4px 0;
}

.radar-legend .map-legend-ico {
  width: 14px;
  text-align: center;
  font-size: 11px;
  line-height: 1;
}

.radar-legend .legend-bank-fresh {
  filter: saturate(1.15) brightness(1.05)
    drop-shadow(0 0 1.5px rgba(34, 197, 94, 0.55));
}

.radar-filter-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #334155;
  color: #cbd5e1;
  font-size: 11px;
  cursor: pointer;
}

@media (max-width: 640px) {
  .radar-legend {
    max-width: min(200px, calc(100vw - 24px));
    bottom: 12px;
    left: 10px;
  }

  .radar-legend-toggle {
    display: flex;
  }

  .radar-legend:not(.is-open) .radar-legend-body {
    display: none;
  }

  .radar-legend.is-open .radar-legend-body {
    display: block;
    padding-top: 4px;
  }

  .radar-legend:not(.is-open) {
    padding: 0;
  }
}

@media (min-width: 641px) {
  .radar-legend-body {
    display: block !important;
  }

  .radar-legend .map-legend-close {
    display: none;
  }
}

.radar-filter-toggle input {
  width: 15px;
  height: 15px;
  accent-color: var(--radar-accent);
  cursor: pointer;
  flex-shrink: 0;
}

.radar-hint {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  line-height: 1.4;
}

.radar-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.radar-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #334155;
}

.radar-badge.conflict {
  border-color: rgba(234, 179, 8, 0.5);
  color: #fde047;
  background: rgba(234, 179, 8, 0.1);
}

.radar-badge.confirmed {
  border-color: rgba(34, 197, 94, 0.5);
  color: #86efac;
  background: rgba(34, 197, 94, 0.1);
}

.radar-signals {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.radar-layer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radar-layer-head h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}

.radar-layer-latest {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.radar-layer-facts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radar-fact-note {
  margin: 8px 0 0;
  padding: 8px;
  border-radius: 6px;
  background: #020617;
  border: 1px solid #1e293b;
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 140px;
  overflow: auto;
}

.radar-signal.layer-payment {
  border-color: rgba(255, 149, 0, 0.25);
}

.radar-signal.layer-crowd {
  border-color: rgba(59, 130, 246, 0.25);
}

.radar-signal-source.provider-gdebenz { color: #93c5fd; }
.radar-signal-source.provider-benzin-live { color: #60a5fa; }
.radar-signal-source.provider-dgis { color: #4ade80; }

.radar-signal {
  padding: 10px 12px;
  border-radius: 10px;
  background: #0f172a;
  border: 1px solid #334155;
}

.radar-signal.stale {
  opacity: 0.65;
}

.radar-signal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.radar-signal-source {
  font-weight: 600;
  font-size: 13px;
}

.radar-signal-source.benzin { color: #93c5fd; }

.radar-signal-status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
}

.radar-fact.secondary {
  opacity: 0.85;
  border-style: dashed;
}

.radar-signal-status.available { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.radar-signal-status.likely { background: rgba(163, 230, 53, 0.2); color: #bef264; }
.radar-signal-status.empty { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.radar-signal-status.unreliable { background: rgba(251, 146, 60, 0.2); color: #fdba74; }
.radar-signal-status.limit { background: rgba(234, 179, 8, 0.2); color: #fde047; }
.radar-signal-status.queue { background: rgba(234, 179, 8, 0.2); color: #fde047; }
.radar-signal-status.unknown { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }

.radar-signal-meta {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.radar-open-map {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
  text-decoration: none;
  font-size: 13px;
}

.radar-open-map:hover {
  background: rgba(99, 102, 241, 0.25);
}

.radar-marker-conflict {
  display: none;
}

.radar-marker-confirmed {
  display: none;
}

.radar-marker-badges {
  position: absolute;
  left: 22px;
  top: -6px;
  display: flex;
  flex-direction: row;
  gap: 3px;
  pointer-events: none;
  line-height: 1;
}

.radar-marker-badge {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  filter: drop-shadow(0 0 1px rgba(15, 23, 42, 0.9));
}

.radar-marker-badge.bank {
  filter: grayscale(0.55) drop-shadow(0 0 1px rgba(15, 23, 42, 0.9));
  opacity: 0.85;
}

.radar-marker-badge.bank.fresh {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  /* лёгкий зеленоватый оттенок, без кислотного фильтра */
  filter: saturate(1.15) brightness(1.05)
    drop-shadow(0 0 1.5px rgba(34, 197, 94, 0.55))
    drop-shadow(0 0 1px rgba(15, 23, 42, 0.75));
  opacity: 1;
}

.radar-marker-badge.crowd,
.radar-marker-badge.queue,
.radar-marker-badge.warn {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.radar-body .station-marker-dot-wrap {
  position: relative;
  width: 22px;
  height: 22px;
}

.radar-body .station-marker-dot {
  width: 22px;
  height: 22px;
}

.radar-body .station-marker-dot--unknown {
  border-width: 3px;
}

.radar-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.radar-summary-reason {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0;
}

.radar-summary-reason.warn {
  color: #fde68a;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: 8px;
  padding: 8px 10px;
}

.radar-layer-card.bank-fresh {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(22, 101, 52, 0.22);
}

.radar-panel-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.radar-panel-header .brand {
  margin-top: 4px;
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.35;
}

.radar-status-block {
  margin-top: 14px;
}

.radar-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
}

.radar-status-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.radar-status-title.available { color: #4ade80; }
.radar-status-title.likely { color: #a3e635; }
.radar-status-title.empty { color: #f87171; }
.radar-status-title.unreliable { color: #fb923c; }
.radar-status-title.limit { color: #fbbf24; }
.radar-status-title.queue { color: #fbbf24; }
.radar-status-title.unknown { color: #94a3b8; }

.radar-status-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #94a3b8;
}

.radar-fuel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.radar-share-btn {
  margin-top: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
}

.radar-share-btn:hover {
  color: #e2e8f0;
  border-color: #475569;
}

.radar-share-btn.copied {
  border-color: #22c55e;
  color: #86efac;
}

.radar-panel .radar-fuel-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 64px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0f172a;
  box-sizing: border-box;
}

.radar-panel .radar-fuel-name {
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
  line-height: 1.2;
}

.radar-panel .radar-fuel-state {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.2;
}

.radar-panel .radar-fuel-chip.on {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(34, 197, 94, 0.12);
}

.radar-panel .radar-fuel-chip.on .radar-fuel-state {
  color: #86efac;
}

.radar-panel .radar-fuel-chip.off {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(239, 68, 68, 0.1);
}

.radar-panel .radar-fuel-chip.off .radar-fuel-state {
  color: #fca5a5;
}

.radar-panel .radar-fuel-chip.other {
  opacity: 0.85;
}

.radar-load-meta {
  position: absolute;
  bottom: 16px;
  right: 12px;
  top: auto;
  z-index: 500;
  font-size: 11px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.92);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #334155;
  pointer-events: none;
  max-width: min(320px, calc(100% - 24px));
}

.radar-body .marker-cluster-small,
.radar-body .marker-cluster-medium,
.radar-body .marker-cluster-large {
  background: transparent !important;
}

.radar-body .marker-cluster-small div,
.radar-body .marker-cluster-medium div,
.radar-body .marker-cluster-large div {
  background: transparent !important;
}

.radar-body .station-cluster-icon {
  background: transparent;
  border: none;
}

.radar-body .cluster-marker {
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  box-sizing: border-box;
}

.radar-layer-card {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: #0f172a;
}

.radar-layer-card-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-bottom: 4px;
}

.radar-layer-card-value {
  font-size: 15px;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.35;
}

.radar-panel-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radar-footer-note {
  margin: 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}

.radar-correct-link {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: #94a3b8;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  cursor: pointer;
}

.radar-correct-link:hover {
  color: #e2e8f0;
}

.radar-report {
  border: 1px solid #334155;
  border-radius: 12px;
  background: #0f172a;
  padding: 12px;
}

.radar-report h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #cbd5e1;
}

.radar-report-form .status-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: #94a3b8;
}

.radar-report-form .status-buttons {
  margin-bottom: 12px;
}

.radar-report-form .submit-btn {
  margin-top: 4px;
}

.radar-report-status {
  margin: 8px 0 0;
  font-size: 12px;
  color: #86efac;
}

.radar-report-highlight {
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.45);
  transition: box-shadow 0.3s ease;
}

.radar-open-map {
  text-align: center;
}

.radar-history {
  border: 1px solid #334155;
  border-radius: 12px;
  background: #0f172a;
  padding: 0 12px 10px;
}

.radar-history > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}

.radar-history > summary::-webkit-details-marker {
  display: none;
}

.radar-history > summary::after {
  content: '▾';
  float: right;
  color: #64748b;
}

.radar-history[open] > summary::after {
  content: '▴';
}

.radar-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.radar-timeline-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #1e293b;
  background: #020617;
}

.radar-timeline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.radar-timeline-kind {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.radar-timeline-kind.crowd {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
}

.radar-timeline-kind.bank {
  color: #ffb347;
  background: rgba(255, 149, 0, 0.12);
}

.radar-timeline-item .radar-signal-meta {
  margin: 0;
}

.radar-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.radar-trust-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

.radar-trust-badge.onsite {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.radar-trust-badge.reliable {
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

@media (max-width: 640px) {
  .radar-sources-bar {
    font-size: 11px;
  }
}

/* Список «Рядом» — как на старой карте */
.radar-body .nearby-panel {
  bottom: 56px;
  z-index: 960;
}

.radar-body .locate-btn.geo-active {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.18);
}
